CeRemoveDatabaseProps (EDB) (Windows Embedded CE 6.0)

1/6/2010

This function removes properties from a database.

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

Syntax

BOOL CeRemoveDatabaseProps(
  PCEGUID pGuid,
  CEOID oidDb,
  DWORD cProps,
  CEPROPID* prgProps
);

Parameters

  • pGuid
    [in] CEGUID of the mounted volume in which the database identified by the oidDbparameter resides. You can mount a volume with the CeMountDBVolEx (EDB) function.
  • oidDb
    [in] OID of the database from which to remove the property IDs. This database must exist in the volume specified by pGuid. This OID must have been generated by the CeCreateDatabaseWithProps (EDB) function.
  • cProps
    [in] Number of property IDs in the prgPropsarray.
  • prgProps
    [in] Array of property IDs to remove from the database.

Return Value

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

Return Value Description

ERROR_ACCESS_DENIED

The property is part of an active sort order.

ERROR_INVALID_PARAMETER

Indicates one of the following:

  • The pGuid parameter is set to NULL.
  • The oidDb parameter is set to NULL.
  • The cProps parameter is set to zero.
  • The prgProps parameter is set to NULL.
  • One of the property IDs in the prgProps array has an invalid CEVT_xxx data type.

ERROR_NOT_ENOUGH_MEMORY

There is not enough memory to complete the action.

ERROR_NOT_FOUND

Indicates one of the following:

  • The volume specified by pGuid does not exist.
  • The database specified by oidDbdoes not exist in the specified volume.
  • One of the property IDs specified in the prgProps array does not exist in the database.

ERROR_SHARING_VIOLATION

Another thread currently has the database open.

Remarks

If there are properties in a database that are no longer used, you can use this function to remove those properties and clean up the database, potentially resulting in a volume size reduction.

This function succeeds only if the database is not open and the property is not part of an active sort order.

Properties are added to a database with the CeAddDatabaseProps (EDB) function.

Requirements

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

See Also

Reference

EDB Functions
CeMountDBVolEx (EDB)
CeCreateDatabaseWithProps (EDB)
CEPROPSPEC (EDB)
CeAddDatabaseProps (EDB)

Concepts

EDB Schema Support