POB_PRE_OPERATION_CALLBACK callback function

The ObjectPreCallback routine is called by the operating system when a process or thread handle operation occurs.

Syntax

POB_PRE_OPERATION_CALLBACK PobPreOperationCallback;

OB_PREOP_CALLBACK_STATUS PobPreOperationCallback(
  PVOID RegistrationContext,
  POB_PRE_OPERATION_INFORMATION OperationInformation
)
{...}

Parameters

RegistrationContext

The context that the driver specifies as the CallBackRegistration->RegistrationContext parameter of the ObRegisterCallbacks routine. The meaning of this value is driver-defined.

OperationInformation

A pointer to an OB_PRE_OPERATION_INFORMATION structure that specifies the parameters of the handle operation.

Return Value

ObjectPreCallback returns an OB_PREOP_CALLBACK_STATUS value. Drivers must return OB_PREOP_SUCCESS.

Remarks

Use the ObRegisterCallbacks routine to register an ObjectPreCallback routine, and use the ObUnRegisterCallbacks routine to unregister the routine.

This routine is called at PASSIVE_LEVEL in an arbitrary thread context with normal kernel APCs disabled. Special kernel APCs are not disabled. For more information about APCs, see Types of APCs.

Requirements

   
Windows version Available starting with Windows Server 2008.
Target Platform Desktop
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
IRQL Called at PASSIVE_LEVEL (see Remarks section).

See Also

OB_PRE_OPERATION_INFORMATION

ObRegisterCallbacks

ObUnRegisterCallbacks

ObjectPostCallback