If you are transferring data from device to host (bulk IN), make sure you
have set bit USBD_TRANSFER_DIRECTION_IN in
Urb->UrbBulkOrInterruptTransfer.TransferFlags. If you have not set this,
then you are just dumping the memory that was submitted by your driver (or
application), because the USB stack has not filled in the buffer with any
meaningful data.
If you could provide more information on how you are issuing the request, we
could probably help more.
– arlie
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
Sent: Thursday, December 22, 2005 10:54 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Getting Read Data from driver
Dear Experts,
I wanted to know, what data I am reading from my USB driver.
The code snippet that I am using was
********************************************
KeVirtualAdd = MmGetSystemAddressForMdlSafe(rwContext->Mdl,
HighPagePriority);
if(KvirtualAdd == NULL)
{
BulkUsb_DbgPrint(3, (“Failed in allocating Kernel Virtual memory for
MDL”));
goto MID;
}
buf= (unsigned char*)KeVirtualAdd ;
for(i =0; i<
(rwContext->Urb->UrbBulkOrInterruptTransfer.TransferBufferLength); i++)
BulkUsb_DbgPrint(3, (" %x(%x)",buf[i],i));
********************************************
But I am getting all zeros in debug monitor. Is this the correct way to get
data ?
What could be the reason?
Regards,
Ramya
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 You are currently subscribed to
ntdev as: unknown lmsubst tag argument: ‘’ To unsubscribe send a blank email
to xxxxx@lists.osr.com