czcty
驱动牛犊
驱动牛犊
  • 注册日期2004-11-04
  • 最后登录2006-11-08
  • 粉丝0
  • 关注0
  • 积分100分
  • 威望11点
  • 贡献值0点
  • 好评度9点
  • 原创分0分
  • 专家分0分
阅读:1374回复:3

如何进行厂商请求

楼主#
更多 发布于:2005-02-26 11:48
如何进行厂商请求,用 UsbBuildVendorRequest是吗?能否举一个例子?
AllenZh
驱动老牛
驱动老牛
  • 注册日期2001-08-19
  • 最后登录2015-11-27
  • 粉丝19
  • 关注10
  • 积分1316分
  • 威望2387点
  • 贡献值7点
  • 好评度321点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2005-02-26 12:00
如何进行厂商请求,用 UsbBuildVendorRequest是吗?能否举一个例子?

比如:
UsbBuildVendorRequest(urb, URB_FUNCTION_VENDOR_DEVICE, (USHORT) siz, 0, 0x0, 0x0C, wValue, wIndex, pbyData, NULL, length, NULL);
1,承接Windows下驱动/应用开发 2,本人原创虚拟鼠标/键盘,触摸屏,虚拟显卡,Mirror驱动,XP无盘的SCSI虚拟磁盘驱动等 3,windows下有尝技术服务(包括BUG调试,员工培训等) 欢迎深圳和海外企业联系.msn:mfczmh@sina.com
czcty
驱动牛犊
驱动牛犊
  • 注册日期2004-11-04
  • 最后登录2006-11-08
  • 粉丝0
  • 关注0
  • 积分100分
  • 威望11点
  • 贡献值0点
  • 好评度9点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2005-02-26 12:45
UsbBuildVendorRequest(urb, URB_FUNCTION_VENDOR_DEVICE, (USHORT) siz,
 0,// 这个参数是什么意思
 0x0,这个参数是什么意思
0x0C, 这个参数是什么意思
wValue,
 wIndex,//这是索引吗?
 pbyData, // 这个是输出的缓冲取吗?
NULL,
 length,
 NULL);
AllenZh
驱动老牛
驱动老牛
  • 注册日期2001-08-19
  • 最后登录2015-11-27
  • 粉丝19
  • 关注10
  • 积分1316分
  • 威望2387点
  • 贡献值7点
  • 好评度321点
  • 原创分0分
  • 专家分0分
地板#
发布于:2005-02-26 14:35
UsbBuildVendorRequest(urb, URB_FUNCTION_VENDOR_DEVICE, (USHORT) siz,
 0,// 这个参数是什么意思
 0x0,这个参数是什么意思
0x0C, 这个参数是什么意思
wValue,
 wIndex,//这是索引吗?
 pbyData, // 这个是输出的缓冲取吗?
NULL,
 length,
 NULL);



0,// 这个参数是什么意思
TransferFlags
Specifies zero, one, or a combination of the following flags:
USBD_TRANSFER_DIRECTION_IN
Is set to request data from a device. To transfer data to a device, this flag must be clear. The flag must be set if the pipe is an interrupt transfer pipe.
USBD_SHORT_TRANSFER_OK
Can be used if USBD_TRANSFER_DIRECTION_IN is set. If set, directs the HCD not to return an error if a packet is received from the device that is shorter than the maximum packet size for the endpoint. Otherwise, a short request is returns an error condition.


 0x0,这个参数是什么意思
ReservedBits
Specifies a value, from 4 to 31 inclusive, that becomes part of the request type code in the USB-defined setup packet. This value is defined by USB for a class request or the vendor for a vendor request.

0x0C, 这个参数是什么意思
Request
Specifies the USB or vendor-defined request code for the device, interface, endpoint, or other device-defined target.


 wIndex,//这是索引吗?
Index
Specifies the device-defined identifier if the request is for an endpoint, interface, or device-defined target. Otherwise, Index must be 0.


pbyData, // 这个是输出的缓冲取吗?
就是Points to a resident buffer for the transfer or is NULL if an MDL is supplied in TransferBufferMDL. The contents of this buffer depend on the value of TransferFlags. If USBD_TRANSFER_DIRECTION_IN is specified, this buffer will contain data read from the device on return from the HCD. Otherwise, this buffer contains driver-supplied data to be transferred to the device.
1,承接Windows下驱动/应用开发 2,本人原创虚拟鼠标/键盘,触摸屏,虚拟显卡,Mirror驱动,XP无盘的SCSI虚拟磁盘驱动等 3,windows下有尝技术服务(包括BUG调试,员工培训等) 欢迎深圳和海外企业联系.msn:mfczmh@sina.com
游客

返回顶部