Configuration Manager
4-17
Initialization and Configuration
This function should be used with great care. Direct manipulation of the config-
uration entry data should only be attempted on informational tags, and only
when the caller holds a referenced handle to the configuration entry. This func-
tion is used in configuration service callback functions, which are called only
when the configuration is in a protected state.
Add a Reference to a Configuration Entry Handle
CfgEntryRef
Syntax
int CfgEntryRef( HANDLE hCfgEntry );
Parameter(s)
hCfgEntry
Handle to configuration entry
Return Value
Returns 0 on success, or less than 0 on an operation error. The possible errors
are:
CFGERROR_BADHANDLE
Invalid hCfgEntry handle
Description
This function adds a reference to the configuration entry handle supplied in
hCfgEntry. It is called by an application when it intends to use an configuration
entry handle beyond the scope of the function which obtained it from the con-
figuration. This normally occurs when one user function calls another and
passes it a handle.
The handle should be dereferenced when no longer needed. Configuration
entry handles are dereferenced by the calling one of the following:
-
CfgEntryDeRef() – Stop using the entry
-
CfgRemoveEntry() – Stop using entry and remove it from the configuration
-
CfgGetNextEntry() – Stop using entry and get next entry
(Re)Set Configuration Entry Data
CfgEntrySetData
Syntax
int CfgEntrySetData( HANDLE hCfgEntry, int Size, UINT8 *pData );
Parameter(s)
hCfgEntry
Handle to configuration entry
Size
Size of data buffer
pData
Pointer to data buffer
Return Value
Returns the number of bytes written, 0 on a “size error” (new size does not
match old size), or less than 0 on an operation error. The possible errors are:
CFGERROR_BADHANDLE
Invalid hCfgEntry handle
CFGERROR_BADPARAM
Invalid function parameter
Description
This function is used to replace the entry data of the configuration entry speci-
fied by the entry handle in hCfgEntry.