Information Catalog Manager Programming Guide and Reference

FLGManageIcons

Creates, deletes, gets, queries, or updates representative OS/2 or Windows icons.

Authorization

Administrator; user (FLG_ACTION_GET and FLG_ACTION_QUERY only)

Syntax



APIRET  APIENTRY   FLGManageIcons( PSZ          pszObjTypeID,
                                   PSZ          pszIconFileID,
                                   FLGOPTIONS   InOptions,
                                   PFLGOPTIONS  pOutOptions,
                                   PFLGEXTCODE  pExtCode );

Parameters

pszObjTypeID (PSZ) -- input
Points to the 6-character, system-generated unique identifier (object type ID) of an object type for which you want to retrieve, query, create, update, or delete icons.

pszIconFileID (PSZ) -- input
Contains the drive, directory path, and file name (valid for a FAT or HPFS file) of the file that contains the OS/2 or Windows icon you want to retrieve, create, or update for the specified object type. This parameter is ignored for FLG_ACTION_QUERY and FLG_ACTION_DELETE.

InOptions (FLGOPTIONS) -- input
Indicates the desired action and platform options. Choose one of the following action options:
FLG_ACTION_CREATE
Adds the specified icon to the specified object type.
FLG_ACTION_DELETE
Removes the specified icon from the specified object type.
FLG_ACTION_GET
Retrieves the specified icon file.
FLG_ACTION_QUERY
Determines whether the specified icon file exists.
FLG_ACTION_UPDATE
Changes the icon for the specified object type.

Choose one of the following platform options:

FLG_PLATFORM_OS2
Manages OS/2 icons.
FLG_PLATFORM_WINDOWS
Manages Windows icons.

pOutOptions (PFLGOPTIONS) -- output
Points to the status returned by FLG_ACTION_QUERY, either:
FLG_ICON_EXIST
FLG_ICON_NOTEXIST

pExtCode (PFLGEXTCODE) -- output
Points to an extended code associated with the reason code. See Appendix D, Information Catalog Manager reason codes to see if a meaningful extended code is associated with the returned reason code.

Reason code (APIRET)
Represents the execution result of this API call.

See Appendix D, Information Catalog Manager reason codes for an explanation of the returned reason codes.

Usage

Prerequisite:

Before you can call FLGManageIcons, you need to call FLGCreateReg to register the object type for which you want to manage icons.

Controlling updates to your information catalog

To keep your program as synchronized as possible with your information catalog, you should include a call to FLGCommit (see FLGCommit) after FLGManageIcons successfully creates, updates, or deletes icons. If FLGManageIcons does not create, update, or delete icons successfully, you should include a call to FLGRollback (see FLGRollback).

Examples

Figure 123 shows the C language code required to issue the FLGManageIcons call. This sample code updates a Windows icon in the Information Catalog Manager.

Figure 123. Sample C language call to FLGManageIcons

 
 APIRET            rc;                // reason code from FLGManageIcons
 UCHAR             pszObjTypeID[FLG_OBJTYPID_LEN + 1];
 UCHAR             pszIconFileID[FLG_ICON_FILE_ID_MAXLEN + 1];
 FLGOPTIONS        Options = 0;       // initialize option
 FLGEXTCODE        xc=0;              // extended code
   .
   .  /* provide values for input parameters */
   .
 Options = Options | FLG_ACTION_UPDATE | FLG_PLATFORM_WINDOWS;
 rc = FLGManageIcons (pszObjTypeID,
                      pszIconFileID,
                      Options,
                      NULL,
                      &xc);


[ Top of Page | Previous Page | Next Page ]