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.
PrfChangeProgram (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINPROGRAMLIST
BOOL PrfChangeProgram(hini, hprog, pprogde)
HINI hini; /* initialization-file handle */
HPROGRAM hprog; /* program handle */
PPROGDETAILS pprogde; /* address of structure with replacement info. */
The PrfChangeProgram function changes the information stored in Desktop
Manager about a program or group.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hini Identifies the file that contains the program or group
information to change. 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.
hprog Identifies the program or group whose information is to change.
If this parameter is a group handle, only the progt and pszTitle
fields can be changed.
pprogde Points to the PROGDETAILS structure that contains the new program
information.
Return Value
The return value is TRUE if the function is successful or FALSE 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_INVALID_PROGRAM_CATEGORY
PMERR_INVALID_TARGET_HANDLE
PMERR_INVALID_TITLE
PMERR_MEMORY_ALLOCATION_ERR
PMERR_MEMORY_DEALLOCATION_ERR
PMERR_NOT_IN_IDX
PMERR_UNKNOWN_APIPKT
Comments
Typically, an application calls PrfQueryDefinition to retrieve current
information about the function, changes the returned structure, and calls
PrfChangeProgram to change the program information.
You cannot change the program information for any program in a protected
group. You can change only the visibility and the protected state.
See Also
PrfCreateGroup, PrfOpenProfile, PrfQueryDefinition, PROGDETAILS,
WinGetLastError
♦