...
pIrp = BuildDeviceIoControlRequest(...., Event,&IoStatusBlock);
ntStatus = IoCallDriver(pExt->pTarget,pIrp);
if (ntStatus == STATUS_PENDING)
KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL);
...
Глюки Usb
Проблема следующая: есть USB уcтройство, есть драйвер. есть кусок кода:
Код:
И еще, MSDN писал(а)(о):
Цитата:
KeWaitForSingleObject
...
If a NULL pointer is supplied for Timeout, the calling thread remains in a wait state until the Object is signaled.
A Timeout value of zero allows the testing of a set of wait conditions and for the conditional performance of any side effects if the wait can be immediately satisfied, as in the acquisition of a mutex.
Callers of KeWaitForSingleObject must be running at IRQL <= DISPATCH_LEVEL. However, if Timeout <> 0, the caller must be running at IRQL <= APC_LEVEL and in a nonarbitrary thread context.
...
If a NULL pointer is supplied for Timeout, the calling thread remains in a wait state until the Object is signaled.
A Timeout value of zero allows the testing of a set of wait conditions and for the conditional performance of any side effects if the wait can be immediately satisfied, as in the acquisition of a mutex.
Callers of KeWaitForSingleObject must be running at IRQL <= DISPATCH_LEVEL. However, if Timeout <> 0, the caller must be running at IRQL <= APC_LEVEL and in a nonarbitrary thread context.
Когда я указываю таймаут:
Код:
Timeout.QuadPart = -500000; // 50 ms
ntStatus = KeWaitForSingleObject(&Event,Executive,KerneMode, FALSE,&Timeout);
ntStatus = KeWaitForSingleObject(&Event,Executive,KerneMode, FALSE,&Timeout);
Если кто сталкивался, помогите плиз.
Заранее спасибо.
Задай вопрос на
Цитата:
Sorry за рекламму...