Share via


EnumDeviceInterfaces (Compact 2013)

3/26/2014

This function enumerates the interfaces exposed by a driver.

Syntax

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

Parameters

  • 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 Value

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 pszNameBufis 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

Header

winbase.h

See Also

Reference

Device Manager Functions
ActivateDeviceEx
FindFirstDevice
FindNextDevice

Other Resources

CreateFile