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 method enumerates all mounted database volumes on a remote Windows Embedded CE–based device and returns the name for each.
Syntax
BOOL CeEnumDBVolumes ( PCEGUID pceguid, LPWSTR lpBuf, DWORD dwNumChars ); |
Parameters
- pceguid
-
[in] To begin enumeration, set this parameter to the value returned by the CREATE_INVALIDGUIDmacro .
- lpBuf
-
[out] Pointer to the allocated buffer that receives the database volume names.
- dwNumChars
-
[in] Specifies the length, in characters, of the buffer.
Return Value
Nonzero indicates success. Zero indicates failure. To get extended error information, call IRAPISession::CeGetLastErrorand IRAPISession::CeRapiGetError. Possible values for CeGetLastErrorinclude the following:
- ERROR_INVALID_PARAMETER
-
One of the parameters is invalid.
- ERROR_NO_MORE_ITEMS
-
There are no more mounted volumes to enumerate.
- ERROR_INSUFFICIENT_BUFFER
-
The specified buffer was not large enough.
Remarks
To begin enumeration, set the pceguidparameter to the value returned by the CREATE_INVALIDGUIDmacro.On successful completion, pceguidand lpBufare set to the CEGUIDand the database volume name of the first of the database volume, respectively. To continue enumeration, call IRAPISession::CeEnumDBVolumesand set the pceguidparameter to the value returned by the previous call. Continue until an error occurs.
If the return value is ERROR_INSUFFICIENT_BUFFER, reallocate the buffer and use the pceguidthat was returned from the failure to resume the enumeration. This eliminates the need to completely restart the process.
Requirements
Header | rapi2.h |
Library | ole32.lib, rapiuuid.lib |
Windows Embedded CE | Windows Embedded CE 6.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |