The SetupDiEnumDeviceInterfaces function returns a context structure for a device interface element of a device information set. Each call returns information about one device interface; the function can be called repeatedly to get information about several interfaces exposed by one or more devices.
WINSETUPAPI BOOL WINAPI
SetupDiEnumDeviceInterfaces(
IN HDEVINFO DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData, OPTIONAL
IN LPGUID InterfaceClassGuid,
IN DWORD MemberIndex,
OUT PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData
);
If DeviceInfoData specifies a particular device, the MemberIndex is relative to only the interfaces exposed by that device.
SetupDiEnumDeviceInterfaces returns TRUE if the function completed without error. If the function completed with an error, FALSE is returned and the error code for the failure can be retrieved by calling GetLastError.
Declared in setupapi.h. Include setupapi.h.
DeviceInterfaceData points to a structure that identifies a requested device interface. To get detailed information about an interface, call SetupDiGetDeviceInterfaceDetail. The detailed information includes the name of the device interface that can be passed to a Win32® function such as CreateFile (described in Platform SDK documentation) to get a handle to the interface.
SetupDiGetClassDevs, SetupDiEnumDeviceInfo, SetupDiGetDeviceInterfaceDetail