A version of this page is also available for
This function mounts a volume. This function is obsolete. Use the CeMountDBVolEx (EDB) function instead.
BOOL CeMountDBVol( PCEGUID pceguid, LPWSTR lpszDBVol, DWORD dwFlags );
[out] Pointer to a buffer that is filled in with the CEGUID of a mounted database.
[in] Pointer to the NULL-terminated string that contains the file name of the database volume to be mounted. The path is limited to MAX_PATH characters and includes the NULL character.
[in] Specification for opening the database volume. The following table shows possible values.
Creates a new database volume. This function overwrites the database volume if it exists.
Creates a new database volume. This function fails if the specified database volume already exists.
When set, indicates that an EDB database mount is occurring. When this flag is set, this function has the same effect as the CeMountDBVolEx (EDB) function with a NULL pOptions parameter.
Opens the database volume if it exists. If the database volume does not exist, the function creates the database volume as if CREATE_NEW were specified.
Opens the database volume. The function fails if the database volume does not exist.
Deletes all data on the volume, including databases and records, and resets the volume locale identifier (LCID). This has the same result as calling the DeleteFile function on a volume, and then calling CeMountDBVol (EDB) with the CREATE_NEW flag set. The specified volume must not be mounted by an application, or an access denied error occurs.
TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError). The following table lists the possible values.
The dwFlags parameter is set to CREATE_ALWAYS or TRUNCATE_EXISTING, and a database volume with the specified name is currently mounted. This error is also returned if the file name refers to a file that is not a valid database volume.
The dwFlags parameter is set to CREATE_NEW, and a database volume with the specified name already exists. This error is also returned if a database volume with the specified CEGUID is already mounted.
The mounted volume does not have enough space to create the new database.
There is not enough memory available to create the volume. If the database volume already exists and dwFlags is set to CREATE_ALWAYS or OPEN_ALWAYS, GetLastError returns ERROR_ALREADY_EXISTS, even through the function has succeeded.
The specified path was not found.
|Windows Embedded CE||Windows CE 5.0 and later|
|Windows Mobile||Windows Mobile Version 5.0 and later|