Export (0) Print
Expand All
Expand Minimize

IoFreeIrp routine

The IoFreeIrp routine releases a caller-allocated IRP from the caller's IoCompletion routine.

Syntax


VOID IoFreeIrp(
  _In_  PIRP Irp
);

Parameters

Irp [in]

Pointer to the IRP that is to be released.

Return value

None

Remarks

This routine is the reciprocal to IoAllocateIrp or IoBuildAsynchronousFsdRequest. The released IRP must have been allocated by the caller.

This routine also releases an IRP allocated with IoMakeAssociatedIrp in which the caller set up its IoCompletion routine that returns STATUS_MORE_PROCESSING_REQUIRED for the associated IRP.

IoFreeIrp does not free any MDLs that might be attached to the IRP. The driver that frees the IRP must explicitly free these MDLs. In addition, if the physical pages that are described by an MDL are locked, the driver must unlock the pages before it frees the MDL. However, the driver does not need to explicitly unmap these pages. Instead, IoFreeMdl automatically unmaps the pages when it frees the MDL. For a code example that shows how to free an MDL chain, see Using MDLs.

Requirements

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

<= DISPATCH_LEVEL

DDI compliance rules

IoAllocateFree, IoBuildDeviceControlNoFree, IoBuildFsdFree, IoBuildSynchronousFsdRequestNoFree, HwStorPortProhibitedDDIs, IoFreeIrp

See also

IoAllocateIrp
IoBuildAsynchronousFsdRequest
IoCompletion
IoMakeAssociatedIrp
IoSetCompletionRoutine

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft