Compartilhar via


EnumDeviceInterfaces (Windows CE 5.0)

Send Feedback

This function enumerates the interfaces exposed by a driver.

BOOL EnumDeviceInterfaces (  HANDLE h,  DWORD dwIndex,  GUID *pClass,  LPWSTR pszNameBuf,  LPDWORD lpdwNameBufSize);

Parameters

  • h
    [in] Handle obtained from a call to ActivateDeviceEx, CreateFile, or FindFirstDevice and FindNextDevice.
  • dwIndex
    [in] Index that starts at zero and increases.
  • pClass
    [in] Pointer to a GUID.
  • pszNameBuf
    [out] Pointer to buffer to receive the interface name. You can set pszNameBuf and lpdwNameBufSize to NULL if you do not need the interface name. Otherwise, *lpdwNameBufSize receives the size, in bytes, of pszNameBuf.
  • lpdwNameBufSize
    [in] Size, in bytes, of pszNameBuf. You can set pszNameBuf and lpdwNameBufSize to NULL if you do not need the interface name. Otherwise, *lpdwNameBufSize is filled in with the size, in bytes, of pszNameBuf.

Return Values

If pszNameBuf is non-NULL and the size is too small for the interface name, the function returns FALSE. In that case, set the error code to ERROR_INSUFFICIENT_BUFFER, and then fill in the size with the required value.

If pszNameBuf is NULL, then the function returns TRUE, and then fills in the size with whatever is required for the associated name. When all interfaces have been enumerated, the function returns FALSE and sets the error value to ERROR_NO_MORE_ITEMS.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: Winbase.h.

See Also

ActivateDeviceEx | CreateFile | FindFirstDevice | FindNextDevice

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.