win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
PrfAddProgram (1.2)
                                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINPROGRAMLIST
 
HPROGRAM PrfAddProgram(hini, pprogde, hGroup)
HINI hini;               /* initialization-file handle                    */
PPROGDETAILS pprogde;    /* address of structure with program information */
HPROGRAM hGroup;         /* program-group handle                          */
 
The PrfAddProgram function adds a program to the program list of a group in
Desktop Manager. The same program title can be used in different groups, but
the program titles within a group must each be unique.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hini       Identifies the file to which the program information is added.
           This parameter can be an initialization-file handle obtained by
           using the PrfOpenProfile function, or it can be the value
           HINI_USERPROFILE, specifying the user-profile file.
 
pprogde    Points to the PROGDETAILS structure that contains program
           information for the program being added to Desktop Manager.
 
hGroup     Identifies the program group to which the program title is added.
           If this parameter is zero and the hini parameter is
           HINI_USERPROFILE, the program is added to the first group defined
           in Desktop Manager.
 
Return Value
 
The return value is the handle for the added program if the function is
successful or NULL if an error occurs.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     PMERR_DUPLICATE_TITLE
     PMERR_GROUP_PROTECTED
     PMERR_INSUFF_SPACE_TO_ADD
     PMERR_INVALID_GROUP_HANDLE
     PMERR_INVALID_PROGRAM_CATEGORY
     PMERR_INVALID_TARGET_HANDLE
     PMERR_INVALID_TITLE
     PMERR_MEMORY_ALLOCATION_ERR
     PMERR_MEMORY_DEALLOCATION_ERR
     PMERR_NOT_CURRENT_PL_VERSION
     PMERR_NOT_IN_IDX
 
See Also
 
PrfCreateGroup, PrfOpenProfile, PrfQueryDefinition, PrfQueryProgramTitles,
WinAddProgram, PROGDETAILS