CeUnmountDBVol (EDB)

A version of this page is also available for

Windows Embedded CE 6.0 R3


This function unmounts a volume that was previously mounted with the CeMountDBVolEx (EDB) function.


BOOL CeUnmountDBVol(


  • pGuid
    Specifies the CEGUID structure 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


The pGuid parameter is set to NULL.


The volume identified by pGuid is not currently mounted.


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.


If there are open handles on databases within a volume, CeUnmountDbVol does not unmount the volume, but still returns TRUE.


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


EDB Functions
CeMountDBVolEx (EDB)