In my INF file I write following line to load interface number 01
from my composite USB device:
%DeviceName%=Device_Install, USB\VID_XXXX&PID_XXXX&MI_01
Now how do I retrieve this interface number in my driver? I can access the device instace ID by IWDFDevice::RetrieveDeviceInstanceId which would give me the interface number packed in a string:
"USB\VID_XXXX&PID_XXXX&MI_01\6&336AF67A&0&0002"
I could extract it from this string but there must be a more elegant way?