That worked!
Thanks to everybody that answered, you saved me days of debugging!
Loris
xxxxx@sunmedia.com.cn wrote:
Tim wrote:
>>On Tue, May 23, 2006 at 09:31:31PM -0700, Loris Degioanni wrote:
>> I use the following code to read data from my USB device. It works
>> apparently any problem on Windows XP and Windows 2003, both 32 and 64
>> bit. But on Win2k IoCallDriver() consistently fails with code C000000D
>> (STATUS_INVALID_PARAMETER).
>> Anyone is able to tell me what’s wrong?
>> Thanks a lot,
>>
>> Loris
>>
>> ------------------------------------------------------------
>>
>> //
>> // Format the URB
>> //
>> UsbBuildInterruptOrBulkTransferRequest(myurb,
>> sizeof(_URB_BULK_OR_INTERRUPT_TRANSFER),
>> pdx->bulk_in,
>> mybuffer,
>> NULL,
>> MAX_PACKET_SIZE,
>> USBD_TRANSFER_DIRECTION_IN | USBD_SHORT_TRANSFER_OK,
>> NULL);>How big is MAX_PACKET_SIZE?
Yes, Tim is right. I have tried if read/write data length is bigger than
4096, you will always get “STATUS_INVALID_PARAMETER” on Win2K. I don’t
know why. I think it is a limit on Win2K maybe.Best Regards,
Dengwen
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer