PAGE_FAULT_IN_NONPAGED_AREA error at KeWaitForSingleObject function
Can this codes cause a problem?(PAGE_FAULT_IN_NONPAGED_AREA)
KEVENT wai开发者_如何转开发tEvent; //allocate on stack
LARGE_INTEGER timeout;
KeInitializeEvent(&waitEvent, NotificationEvent, FALSE);
KeResetEvent(&waitEvent);
timeout.QuadPart = -(100 * 10000); // 100 ms
while(pDataChannel->useCount)
{
KeWaitForSingleObject(&waitEvent, Executive, KernelMode, FALSE, &timeout);
}
Can the waitEvent valiable be paged-out? Is the variable must allocated on a non-paged pool?
Is pDataChannel valid? Or are you running at DISPATCH_LEVEL
?
These can lead to the error you have.
精彩评论