Bewerken

Delen via


IoForwardIrpSynchronously function (wdm.h)

The IoForwardIrpSynchronously routine sends an IRP to a specified driver and waits for that driver to complete the IRP.

Syntax

BOOLEAN IoForwardIrpSynchronously(
  [in] PDEVICE_OBJECT DeviceObject,
  [in] PIRP           Irp
);

Parameters

[in] DeviceObject

Specifies the device object of the driver to which the IRP is sent.

[in] Irp

Specifies the IRP to send.

Return value

IoForwardIrpSynchronously returns TRUE if the IRP is sent successfully. Otherwise, it returns FALSE.

Remarks

Use the IoForwardIrpSynchronously routine to synchronously forward the current IRP to the next driver in the stack. (To asynchronously forward the IRP, use the IoCopyCurrentIrpStackLocationToNext, IoCallDriver, and IoSetCompletionRoutine routines.)

The IoForwardIrpSynchronously routine copies the current stack location to the next stack location. That stack location is then used as the current stack location by the driver specified in DeviceObject. If no next stack location is available, the routine returns FALSE. If the routine returns TRUE, then the IRP has been sent to the specified driver, and that driver has completed its processing of this IRP.

Requirements

Requirement Value
Minimum supported client Available in Windows XP and later versions of Windows.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL
DDI compliance rules PnpIrpCompletion(wdm)

See also

IoCallDriver

IoCopyCurrentIrpStackLocationToNext

IoSetCompletionRoutine