CeGetDatabaseProps (EDB) (Windows CE 5.0)
This function is used to retrieve some or all of the properties from a database.
This function does not work with CEDB databases. For more information about CEDB, see CEDB Reference.
BOOL CeGetDatabaseProps (HANDLEhDatabase,LPWORDlpcPropID,CEPROPID*prgPropID,CEPROPSPEC*prgProps);
Parameters
hDatabase
[in] A handle to an open database. This handle must be obtained by calling the CeOpenDatabaseInSession (EDB) function.lpcPropID
[in/out] The number of property IDs in the prgPropID array.prgPropID
[in] A pointer to an array of property IDs that specifies the properties to be retrieved. If this parameter is NULL then the first *lpcPropID properties are returned. This allows properties to be returned without knowing the property IDs.prgProps
[in/out] The array of CEPROPSPEC (EDB) in which the property information is to be placed. If the value of this parameter is NULL, the number of properties in the database is returned in *lpcPropID. The caller must set the wVersion value of the elements of prgProps to CEPROPSPEC_VERSION before calling this function.Note that the pwszPropName field of CEPROPSPEC (EDB) must be set to point to an empty string buffer to pre-allocate necessary space for property names.
Return Values
TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. The following table lists possible values returned by GetLastError:
Return Value | Description |
---|---|
ERROR_INVALID_PARAMETER | Indicates one of the following:
|
ERROR_INVALID_HANDLE | Indicates that hDatabase is NULL or equal to INVALID_HANDLE_VALUE. |
ERROR_INSUFFICIENT_BUFFER | Indicates that the memory available for one of the property names is not sufficient to store that property name. |
Remarks
The function can be used to perform any of the following operations:
- Find the number of properties in a database (set prgProps to NULL).
- Select only a subset of properties (set required property IDs in prgPropID).
- Return properties even if their property IDs are not known (set prgPropID to NULL).
If any of the properties specified in the array prgPropID does not exist in the database then the corresponding positions in the array prgProps sets the wVersion value to 0.
Properties are added to a database by using the CeAddDatabaseProps (EDB) function and removed by using the CeRemoveDatabaseProps (EDB) function.
Requirements
OS Versions: Windows CE 5.0 and later.
Header: Windbase.h.
Link Library: Coredll.lib.
See Also
CeOpenDatabaseInSession (EDB) | CeAddDatabaseProps (EDB) | CeRemoveDatabaseProps (EDB) | CEPROPSPEC
Send Feedback on this topic to the authors