do
{
/* Use the right Executive Handle */
- if (ObIsKernelHandle(Handles[i], PreviousMode))
+ if (ObpIsKernelHandle(Handles[i], PreviousMode))
{
/* Use the System Handle Table and decode */
HandleTable = ObpKernelHandleTable;
{
/* Fail, handle is invalid */
Status = STATUS_INVALID_HANDLE;
+ DPRINT1("Invalid handle passed to NtWaitForMultipleObjects\n");
goto Quickie;
}
{
/* Unlock the entry and fail */
ExUnlockHandleTableEntry(HandleTable, HandleEntry);
+ DPRINT1("Handle does not have SYNCHRONIZE access\n");
Status = STATUS_ACCESS_DENIED;
goto Quickie;
}
{
/* Fail */
Status = STATUS_INVALID_PARAMETER_MIX;
+ DPRINT1("Passed a duplicate object to NtWaitForMultipleObjects\n");
goto Quickie;
}
}
/* Dereference the Object */
ObDereferenceObject(Object);
}
+ else
+ {
+ DPRINT1("Failed to reference the handle with status 0x%x\n", Status);
+ }
/* Return the status */
return Status;