是什么原因使得发送数据阻塞啊?
PURB pUrb = m_Endpoint2OUT.BuildBulkTransfer(
Mem,//(PVOID)buffer, // Where is data coming from?
BufferLength, // How much data to write?
FALSE, // direction (FALSE = OUT)
NULL, // Link to next URB
TRUE,
NULL
);
if (pUrb != NULL)
{
t << "pUrb created " <<"\n";
pUrb->UrbBulkOrInterruptTransfer.TransferFlags =
(USBD_TRANSFER_DIRECTION_OUT | USBD_SHORT_TRANSFER_OK);
status = m_Endpoint2OUT.SubmitUrb(pUrb, NULL, NULL);//到这里后就死在这里了。
if ( NT_SUCCESS(status) )
{
dwBytesSent = pUrb->UrbBulkOrInterruptTransfer.TransferBufferLength;
t << "Write() posted " << dwTotalSize << " bytes to USB\n";
}
else
{
t << "Write() failed " <<"\n";
}