Modifies registration information in the information catalog for a specific object type.
This action does not update the object type itself; it updates the registration information for the object type.
Authorization
Administrator
Syntax
APIRET APIENTRY FLGUpdateReg( PFLGHEADERAREA pObjRegStruct,
PSZ pszIconFileID,
PFLGEXTCODE pExtCode );
Parameters
See Appendix D, Information Catalog Manager reason codes for an explanation of the returned reason codes.
Input structure
To use FLGUpdateReg, you must define the input structure shown in Figure 157. This structure contains only the header area and the definition area.
Figure 157. FLGUpdateReg input structure
Usage
Restrictions
Prerequisites
Before issuing an FLGUpdateReg call, you must obtain the current values of the registration information. You can either save this information from the original FLGCreateReg call, or issue an FLGGetReg call for the object type registration being modified.
Input requirements
Header area
All of the information shown in the header record is required.
Definition area
These properties are explained in FLGCreateReg.
Object area
Only the value for NAME (EXTERNAL NAME OF OBJ TYPE) can be updated. The NAME value must be unique within the local information catalog.
The remaining property values cannot be modified. CREATOR, UPDATEBY, and UPDATIME are system-generated values. DPNAME and PTNAME are the unique identifiers of the object type, and cannot be updated. Values for system-generated properties are generated when the object type itself is created or appended.
The value for DPNAME must be specified and match the DPNAME of the current object registration associated with the object type ID in the header area.
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 FLGUpdateReg completes successfully. If FLGUpdateReg does not complete successfully, you should include a call to FLGRollback (see FLGRollback).
Figure 158 shows the C language code required to invoke the FLGUpdateReg API call. This sample code updates the object type registration for the MYIMAGE object type. The update modifies the value for the external name property, NAME.
Figure 158. Sample C language call to FLGUpdateReg
APIRET rc; // Declare reason code
PFLGHEADERAREA pObjRegStruct; // Pointer to the input structure
UCHAR pszIconFileID[FLG_ICON_FILE_ID_MAXLEN+1]; // Path/File name of ICON
FLGEXTCODE ExtCode=0; // Declare extended code
.
. /* updating pObjRegStruct object type */
/* registration by providing an updated input structure */
.
strcpy (pszIconFileID,"Y:\\FLGICON2.ICO");
rc = FLGUpdateReg (pObjRegStruct, // Pointer to updated Input Structure
pszIconFileID, // Path/File name of file containing the ICON
&ExtCode); // Pass pointer to extended code
Figure 159 shows the input structure (pointed to by the pObjRegStruct pointer in the C code) that carries the property and value information for the object type registration information to be updated.
Figure 159. Sample input structure for FLGUpdateReg
In this example, the values in the object areas corresponding to system-generated properties (CREATOR, LAST CHANGED BY, and LAST CHANGED DATE AND TIME) cannot be updated and are ignored by FLGUpdateReg. One way of generating the input structure is to issue FLGGetReg to get the current definition and values and use the output structure from that API call as a template for this FLGUpdateReg input structure.
Bytes 33 through 38 of the header area contain the object type ID (000044) of the object type for which registration information is being updated.