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 that is in a volume that was mounted by using the CeMountDBVolEx (EDB)function.

Syntax

BOOL CeDeleteDatabase( 
  PCEGUID pGuid
  CEOID 
oid
);

Parameters

pGuid

[in] Pointer to a buffer that contains the CEGUID that represents the mounted database.

Oid

[in] OID of the database to delete. This database must exist in the volume specified by pGuid. This OID is generated by the CeCreateDatabaseWithProps (EDB)function.

Return Value

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:

  • The pGuidparameter is 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