Microsoft Windows CE 3.0  

CeEnumDBVolumes

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 enumerates all mounted database volumes and returns the name for each. A remote application interface (RAPI) version of this function exists, and it is also called CeEnumDBVolumes.

BOOL CeEnumDBVolumes(
PCEGUID
pceguid,

LPWSTR
lpBuf, 
DWORD
dwNumChars
);

Parameters

pceguid
[in] To begin enumeration, set this parameter to the value returned by CREATE_INVALIDGUID.
lpBuf
[out] Pointer to the allocated buffer that receives the database volume names.
dwNumChars
[in] Specifies the length, in characters, of the buffer.

Return Values

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. Possible values for GetLastErrorinclude 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 enumerate all mounted volumes

  1. The operating system sets up the process of enumerating all database volumes.
  2. On the first successful completion, pceguidand lpBufare set to the CEGUIDand the database volume name of the first of the database volumes, respectively.

    To continue enumeration

    1. Call CeEnumDBVolumeswith the previously returned CEGUID. Continue until an error occurs.
    2. 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 prevents the necessity to completely restart the process.

      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

      CeEnumDBVolumes, GetLastError, CREATE_INVALIDGUID