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 unmounts a volume that was previously mounted with the CeMountDBVolEx (EDB)function.

Syntax

BOOL CeUnmountDBVol(
  PCEGUID 
pGuid
);

Parameters

pGuid

Specifies the CEGUIDstructure of the mounted volume to be unmounted. You can mount a volume with CeMountDbVolEx.

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_INVALID_PARAMETER

The pGuidparameter is set to NULL.

ERROR_NOT_FOUND

The volume identified by pGuidis not currently mounted.

Remarks

This function is used to unmount a volume that was previously mounted with CeMountDbVolEx. A single database volume can be mounted more than once by different applications. Each time the volume is mounted, a reference count is incremented. A mounted database volume does not fully unmount and close until all applications that mounted the volume call this function. When a volume is unmounted, all cached data is flushed.

After calling this function, pGuid becomes invalid. As a result, if you call CeEnumDBVolumes (EDB)after unmounting the volume, the call fails.

Note:
If there are open handles on databases within a volume, CeUnmountDbVoldoes not unmount the volume, but still returns TRUE.

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