Export (0) Print
Expand All

EnumDeviceInterfaces (Compact 2013)

3/26/2014

This function enumerates the interfaces exposed by a driver.


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

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.

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.

Header

winbase.h

Show:
© 2014 Microsoft