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.
PrfCreateGroup (1.2)
                                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINPROGRAMLIST
 
HPROGRAM PrfCreateGroup(hini, pszTitle, fsVisible)
HINI hini;          /* initialization-file handle */
PSZ pszTitle;       /* pointer to group title     */
UCHAR fsVisible;    /* visibility flag            */
 
The PrfCreateGroup function creates a new program-group entry in Desktop
Manager. If the program group already exists, this function returns a handle
to that group.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hini       Identifies the file to which the new group 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.
 
pszTitle   Points to the title of the new group. The maximum string size is
           defined by the MAXNAMEL constant (defined in the MS OS/2 include
           files). Strings that exceed this limit are truncated to MAXNAMEL
           characters. Leading and trailing blanks are removed. The string
           must contain at least one nonblank character and cannot contain a
           backslash (\).
 
fsVisible  Specifies the visibility of the new group. This flag can be a
           combination of the following values:
 
           Value            Meaning
           ─────────────────────────────────────────────────────────────────
           SHE_VISIBLE      The group is visible.
 
           SHE_INVISIBLE    The group is invisible and cannot be viewed.
 
           SHE_UNPROTECTED  The group is unprotected.
 
           SHE_PROTECTED    The group is protected. Programs cannot be added
                            or deleted from the group.
 
           This flag can also be set or reset by using the PrfChangeProgram
           function.
 
Return Value
 
The return value is the group handle for the group 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_INSUFF_SPACE_TO_ADD
     PMERR_INVALID_GROUP_HANDLE
     PMERR_INVALID_TARGET_HANDLE
     PMERR_INVALID_TITLE
     PMERR_MEMORY_DEALLOCATION_ERR
     PMERR_NOT_CURRENT_PL_VERSION
     PMERR_NOT_IN_IDX
 
Comments
 
The new program group is empty when created. Use the PrfAddProgram function
to add program entries to the group.
 
The PrfCreateGroup function replaces the WinCreateGroup function used in MS
OS/2 version 1.1.
 
See Also
 
PrfAddProgram, PrfChangeProgram, WinCreateGroup, WinGetLastError