struct _URB_HEADER {
USHORT Length;
USHORT Function;
USBD_STATUS Status;
PVOID UsbdDeviceHandle;
ULONG UsbdFlags;
};
此结构的成员Function的一个可能值就是你提到的宏URB_FUNCTION_SELECT_CONFIGURATION
msdn对这个宏的描述:
Indicates to the host controller driver that a configuration is to be selected. If set, the URB is used with _URB_SELECT_CONFIGURATION as the data structure.
上面的描述中提到这个结构
struct _URB_SELECT_CONFIGURATION {
struct URB_HEADER Hdr;
PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor;
USBD_CONFIGURATION_HANDLE ConfigurationHandle;
USBD_INTERFACE_INFORMATION Interface;
};
msdn对结构成员ConfigurationHandle;的描述:
Contains a handle that is used to access this configuration on return from the host controller driver. USB client drivers must treat this member as opaque.
这里说设备驱动必需实现ConfigurationHandle这个处理函数,怎么实现、要做些什么我就不知道了!木有做过usb驱动。