Thanks Tim for Reply,
Here is the code, I am trying to read Descriptor using get descriptor
command!!
WINUSB_SETUP_PACKET SetupPacket;
ZeroMemory(&SetupPacket, sizeof(WINUSB_SETUP_PACKET));
ULONG cbSent = 0;
UCHAR ucResult[1024] = {0,};
/*
//Create the setup packet
SetupPacket.RequestType = 0x80;
SetupPacket.Request = 0x06;
SetupPacket.Value = 1;
SetupPacket.Index = 0;
SetupPacket.Length = 0x12;
bResult = WinUsb_ControlTransfer(devInfo.winUSBHandle, SetupPacket,
ucResult, 1024, &cbSent, 0);
if(!bResult)
{
dErr = GetLastError();
}
it is giving dErr = 31 (A device attached to the system is not functioning.
)
Thanks and Regards
Sunil
On Tue, Feb 8, 2011 at 12:16 AM, Tim Roberts wrote:
> Sunil Kumar wrote:
> > I am working with Standard USB Mass Storage device which is working
> > fine with windows!!
> >
> > So this could nt be the case!!
>
> Of course it could, depending on what control requests you are sending.
> Perhaps you should post the code.
>
> > Is it required to reset the Control Pipe before making any
> > request?? if yes what parameter should i give while restting
> > WinUsb_ResetPipe
>
> Under ordinary conditions, you should never have to reset a pipe. The
> control pipe, in particular, although it can stall if it is sent a
> request it does not handle, resets the stall automatically.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>