Information Catalog Manager Programming Guide and Reference

FLGGetType

Retrieves the definition of all properties of an object type.

Authorization

Administrator or user

Syntax



APIRET  APIENTRY    FLGGetType( PSZ              pszObjTypeID,
                                PFLGHEADERAREA * ppObjTypeStruct,
                                PFLGEXTCODE      pExtCode );

Parameters

pszObjTypeID (PSZ) -- input
Points to the 6-character, system-generated unique identifier (object type ID) that was returned when the object type was registered. You can also retrieve this object type ID using either the FLGConvertID or FLGListObjTypes API call.

ppObjTypeStruct (PFLGHEADERAREA) -- output
Points to the address of the pointer to the output structure. The pointer is set to NULL if the FLGGetType fails.

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.

Output structure

FLGGetType produces an output structure containing the property specifications of the requested object type, as shown in Figure 79.

The definition area of the output structure contains the properties of the requested object type in the order in which they were specified when the object type was created.

Figure 79. FLGGetType output structure


Figure FLAA2021 not displayed.

For an explanation of the meanings of the byte offsets, see Chapter 4, The Information Catalog Manager input and output structures.

Usage

Prerequisites

The value in the pszObjTypeID parameter must refer to an existing object type ID registered in the information catalog.

Freeing memory allocated for an output structure

If FLGGetType returned data in the output structure, you must save the data returned in the output structure and then call FLGFreeMem (see FLGFreeMem). Do not use other methods, for example, C language instructions, to free memory.

Examples

Figure 80 shows the C language code required to issue the FLGGetType API call. This sample code retrieves information about the properties of the MYIMAGE object type from the information catalog.

Figure 80. Sample C language call to FLGGetType

 
 APIRET         rc;                   // Declare reason code
 UCHAR          pszObjTypeID[FLG_OBJTYPID_LEN + 1]; // Set to ID of MYIMAGE (000044)
 PFLGHEADERAREA * ppObjTypeStruct;    // Pointer to the output structure
 FLGEXTCODE     ExtCode=0;                 // Declare extended code
 
   .
   .  /* retrieving a user-defined object type - MYIMAGE  */
 strcpy (pszObjTypeID,"000044");
 
   .
 
 rc = FLGGetType (pszObjTypeID,
                 ppObjTypeStruct,
                  &ExtCode);               // Pass pointer to extended code
 

Figure 81 shows the output structure that contains the property information for the MYIMAGE object type.

Figure 81. Sample output structure for FLGGetType


Figure FLAA2022 not displayed.


[ Top of Page | Previous Page | Next Page ]