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.
在MSDN中这样写道:
KeWaitForSingleObject must be running at IRQL <= DISPATCH_LEVEL.
Usually, the caller must be running at IRQL = PASSIVE_LEVEL and in a nonarbitrary thread context.
A call while running at IRQL = DISPATCH_LEVEL is valid if and only if the caller specifies a Timeout of zero.
That is, a driver must not wait for a nonzero interval at IRQL = DISPATCH_LEVEL.
...REGINFO_EX OUT 0 0xD8E476F0 0xD47D6A18 STATUS_NOT_SUPPORTED REGINFO_EX IN 0 0xD8E476F0 0xD47D6A18STATUS_SUCCESSQUERY_DEVICE_RELATIONS OUT 0 0xD8E476F0 0xD4B7F080 STATUS_NOT_SUPPORTED QUERY_DEVICE_RELATIONS IN 0 0xD8E476F0 0xD4B7F080 STAT ...