CeMountDBVol (EDB) (Windows Embedded CE 6.0)
1/6/2010
This function mounts a volume. This function is obsolete. Use the CeMountDBVolEx (EDB) function instead.
Syntax
BOOL CeMountDBVol(
PCEGUID pceguid,
LPWSTR lpszDBVol,
DWORD dwFlags
);
Parameters
- pceguid
[out] Pointer to a buffer that is filled in with the CEGUID of a mounted database.
- lpszDBVol
[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.
dwFlags
[in] Specification for opening the database volume. The following table shows possible values.Value Description CREATE_ALWAYS
Creates a new database volume. This function overwrites the database volume if it exists.
CREATE_NEW
Creates a new database volume. This function fails if the specified database volume already exists.
EDB_MOUNT_FLAG
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.
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 were specified.
OPEN_EXISTING
Opens the database volume. The function fails if the database volume does not exist.
TRUNCATE_EXISTING
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.
Return Value
TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError). The following table lists the possible values.
Value | Description |
---|---|
ERROR_ACCESS_DENIED |
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. |
ERROR_ALREADY_EXISTS |
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. |
ERROR_DISK_FULL |
The mounted volume does not have enough space to create the new database. |
ERROR_NOT_ENOUGH_MEMORY |
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. |
ERROR_PATH_NOT_FOUND |
The specified path was not found. |
Requirements
Header | windbase.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 5.0 and later |