次の方法で共有


CeEnumDBVolumes (CEDB) (Compact 2013)

3/26/2014

This function enumerates all mounted database volumes and returns the name for each.

Syntax

BOOL CeEnumDBVolumes( 
  PCEGUID pceguid, 
  LPWSTR lpBuf,
  DWORD dwNumChars
);

Parameters

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

Return Value

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. The following table lists possible values.

Value

Description

ERROR_INSUFFICIENT_BUFFER

Indicates that the specified buffer was not large enough.

ERROR_INVALID_PARAMETER

Indicates that one of the parameters is invalid.

ERROR_NO_MORE_ITEMS

Indicates that there are no more mounted volumes to enumerate.

Remarks

To enumerate all mounted volumes, the operating system sets up the process of enumerating all database volumes. On the first successful completion, pceguid and lpBuf are set to the CEGUID and the database volume name of the first of the database volumes, respectively.

To continue enumeration, call CeEnumDBVolumes with the previously returned CEGUID and continue until an error occurs. If the return value is ERROR_INSUFFICIENT_BUFFER, reallocate the buffer, and use the pceguid that was returned from the failure to resume the enumeration. This avoids the necessity of completely restarting the process.

Requirements

Header

windbase.h

Library

coredll.lib

See Also

Reference

CEDB Functions
CREATE_INVALIDGUID