The USBD_CreateConfigurationRequestEx 函数分配并格式化一个用来配置一个USB设备的URB
USBD_CreateConfigurationRequestEx 代替 USBD_CreateConfigurationRequest.
Syntax
- PURB USBD_CreateConfigurationRequestEx(
- __in PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
- __in PUSBD_INTERFACE_LIST_ENTRY InterfaceList
- );
Parameters
-
ConfigurationDescriptor [in]
-
指向USB_CONFIGURATION_DESCRIPTOR 结构体指针,它包含被选择的配置的配置描述。 客户驱动通过提交一个URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE类型的USRB来获得配置、接口、端点、的信息. 当客户驱动指定 USB_CONFIGURATION_DESCRIPTOR_TYPE 作为描述符类型时, 这个请求通过 USB_CONFIGURATION_DESCRIPTOR 结构体返回设备信息.之后驱动传递接收的指针给ConfigurationDescriptor中的USB_CONFIGURATION_DESCRIPTOR 结构体.
InterfaceList [in]
-
指向 调用分配的USBD_INTERFACE_LIST_ENTRY 结构体的第一个元素. The length of the array depends on the number of interfaces in the configuration descriptor. The number of elements in the array must be one more than the number of interfaces in the configuration. Initialize the array by callingRtlZeroMemory. TheInterfaceDescriptor member of the last element in the array must be set toNULL.
Return value
USBD_CreateConfigurationRequestEx allocates a URB structure, formats it for the URB_FUNCTION_SELECT_CONFIGURATION request (select-configuration request), and returns a pointer to theURB. The client driver can then use the returned URB to send the select-configuration request to the host controller driver to set the configuration. You must free theURB when you have finished using it.
Requirements
Header |
|
---|---|
Library |
|
IRQL | DISPATCH_LEVEL (See Remarks) |
所以在sources里要包含此lib
TARGETLIBS=D:\WINDDK\7600.16385.1\lib\wxp\i386\usbd.lib