NTKERNELAPI VOID FASTCALL ObFastDereferenceObject ( IN PEX_FAST_REF FastRef, IN PVOID Object ) /*++ Routine Description: This routine does a fast dereference if possible. Arguments: FastRef - Rundown block to be used to dereference the object Return Value: None. --*/ { if (!ExFastRefDereference (FastRef, Object)) { // // If the object changed or there is no space left in the reference // cache then just deref the object. // ObDereferenceObject (Object); } }
VOID ExDereferenceCallBackBlock ( IN OUT PEX_CALLBACK CallBack, IN PEX_CALLBACK_ROUTINE_BLOCK CallBackBlock ) /*++ Routine Description: This returns a reference previous obtained on a call back block Arguments: CallBackBlock - Call back block to return reference to Return Value: None --*/ { if (ExpCallBackReturnRefs || !ExFastRefDereference (&CallBack->RoutineBlock, CallBackBlock)) { ExReleaseRundownProtection (&CallBackBlock->RundownProtect); } }