Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function deletes a database in a volume that was mounted by using the CeMountDBVolEx (EDB)function.

Syntax

BOOL CeDeleteDatabase( 
  CEOID 
oid
);

Parameters

oid

[in] Object identifier (OID) of the database to delete. This database must exist in the volume specified by the pGuidparameter of the CeCreateDatabaseWithProps (EDB)function that created 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_INVALID_PARAMETER

Indicates one of the following:

  • The pGuidis set to NULL.

  • The oidparameter is set to NULL.

ERROR_NOT_FOUND

The volume specified by pGuiddoes not exist, or the database specified by oid does not exist in the specified volume.

ERROR_SHARING_VIOLATION

The database specified is currently open, and therefore cannot be deleted.

Remarks

A database cannot be deleted if it is open.

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