Compartilhar via


CeRemoveDatabaseProps (EDB)

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function removes properties from a database.

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 oidDb ** parameter 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 prgProps ** array.
  • 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 oidDb does 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
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

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

Other Resources