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. |
This function issues a mount request for a database volume that contains both data and an integrity log. The function fills a buffer with a CEGUIDthat is the globally unique identifier of a mounted database.
A remote application interface (RAPI) version of this function exists, and it is also called CeMountDBVol.
BOOL CeMountDBVol( PCEGUID pceguid, LPWSTR lpszDBVol, DWORD dwFlags );
Parameters
Value | Description |
---|---|
CREATE_NEW | Creates a new database volume. The function fails if the specified database volume already exists. |
CREATE_ALWAYS | Creates a new database volume. The function overwrites the database volume if it exists. |
OPEN_EXISTING | Opens the database volume. The function fails if the database volume does not exist. |
OPEN_ALWAYS | Opens the database volume, if it exists. If the database volume does not exist, the function creates the database volume as if CREATE_NEW was specified. |
TRUNCATE_EXISTING | Opens the database volume. Once opened, the database volume is truncated so that its size is zero bytes. The function fails if the database volume does not exist. |
Return Values
TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. Possible values for GetLastErrorinclude the following:
If the database volume already exists before the function call and dwFlagsis CREATE_ALWAYS or OPEN_ALWAYS, GetLastErrorreturns ERROR_ALREADY_EXISTS, even though the function has succeeded.
Remarks
The CeMountDBVolfunction creates a database volume that contains both data and an integrity log. The function can accept any path including Uniform Naming Convention (UNC) names for files on a LAN.
A single database volume can be mounted more than once by a different application. Each time the volume is mounted, a reference count is incremented. A mounted database volume does not unmount until all applications that mounted the volume call CeUnmountDBVol. CeUnmountDBVolmust be called to free up system resources.
All data written to a mounted database volume is cached until one of the following occurs:
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.10 and later | Windbase.h | Winbase.h | Fsdbase.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
CeFlushDBVol, CeMountDBVol, CeUnmountDBVol, GetLastError, CHECK_INVALIDGUID