USB SET_CONFIGURATION with UMDF

Hi,
How do I send a SET_CONFIGURATION IOCTL to the USB device, using UMDF?
Is there a method in UMDF which does it, or do I need to use WinUSB directly (and if so, how do I do it among a UMDF code? Is there an example somewhere?)
Thanks,
Gadi

IIRC, WinUSB will automatically select a configuration for you. you can use WinUsb_GetCurrentAlternateSetting to get the currently selected setting on each interface and WinUsb_SetCurrentAlternateSetting to change to a different setting

d

What do you mean selects automatically?
If I have 2 configurations, how will it know which one to choose?
If I still want to choose the other configuarion, can I do it with UMDF?
Assuming there is no SET_CONFIGUATION supporting method in UMDF, is there an abstraction which enables passing the appropriate URB to the device?
I want my driver to send this URB (URB_FUNCTION_SELECT_CONFIGURATION) in the control endpoint without downgrading it into a WDM driver.
Thanks,
Gadi

Why do you have 2 separate configurations? For different power requirements? No, there is no facitily to send down an arbitrary URB, esp a state changing URB like select config. Winusb.sys needs to maintain its own state of the device and pulling the rug out from underneath winusb with an arbritray new config would make it impossible to maintain that state.

d