windows xp 驱动开发(六) USBD_CreateConfigurationRequestEx函数说明

 

 

The USBD_CreateConfigurationRequestEx  函数分配并格式化一个用来配置一个USB设备的URB

USBD_CreateConfigurationRequestEx  代替 USBD_CreateConfigurationRequest.

Syntax

   
   
  1. PURB USBD_CreateConfigurationRequestEx(
  2.   __in  PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
  3.   __in  PUSBD_INTERFACE_LIST_ENTRY InterfaceList
  4. );

 

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

Usbdlib.h (include Usbdlib.h)

Library

Usbd.lib

IRQL

DISPATCH_LEVEL (See Remarks)

 

所以在sources里要包含此lib

TARGETLIBS=D:\WINDDK\7600.16385.1\lib\wxp\i386\usbd.lib

 

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值