Share via


CeGetDatabaseProps (EDB) (Windows Embedded CE 6.0)

1/6/2010

This function obtains some or all properties of a database.

This function does not work with CEDB databases. For more information about CEDB, see CEDB Reference.

Syntax

BOOL CeGetDatabaseProps (
  HANDLE hDatabase,
  LPWORD lpcPropID,
  CEPROPID* prgPropID,
  CEPROPSPEC* prgProps
);

Parameters

  • lpcPropID
    [in, out] Number of property IDs in the prgPropIDarray.
  • prgPropID
    [in] Pointer to an array of property IDs that specifies the properties to be retrieved. If this parameter is set to NULL the first *lpcPropID properties are returned. This enables properties to be returned without knowing the property IDs.
  • prgProps
    [in, out] Array of CEPROPSPEC (EDB) in which the property information is to be placed. If the value of this parameter is set to 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.

    The pwszPropName field of CEPROPSPEC must be set to point to an empty string buffer to pre-allocate space for property names.

Return Value

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. The following table shows possible values.

Return Value Description

ERROR_INSUFFICIENT_BUFFER

There is not enough memory available for one of the property names.

ERROR_INVALID_HANDLE

The hDatabaseparameter is set to NULL or equal to INVALID_HANDLE_VALUE.

ERROR_INVALID_PARAMETER

Indicates one of the following:

  • The lpcPropID parameter is set to NULL.
  • Any of the elements in prgProps does not have wVersion equal to CEPROPSPEC _VERSION.

Remarks

This 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 prgPropID does not exist in the database, the corresponding positions in prgProps sets the wVersion value to zero.

Properties are added to a database by using the CeAddDatabaseProps (EDB) function and removed by using the CeRemoveDatabaseProps (EDB) function.

Requirements

Header windbase.h
Library coredll.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

EDB Functions
CeOpenDatabaseInSession (EDB)
CeAddDatabaseProps (EDB)
CeRemoveDatabaseProps (EDB)
CEPROPSPEC (EDB)