IoCallDriver routine

IoCallDriver routine

IoCallDriver 例程发送一个IRP给指定设备对象关联的驱动程序。

Syntax

 

NTSTATUS IoCallDriver(
  _In_    PDEVICE_OBJECT DeviceObject,
  _Inout_ PIRP           Irp
);

 

Parameters

DeviceObject [in]

指向一个 device object代表了请求的IO操作的目标设备。

Irp [in, out]

IRP指针

Return value

IoCallDriver returns the NTSTATUS value that a lower driver set in the I/O status block for the given request, or STATUS_PENDING if the request was queued for additional processing.

返回底层驱动改程序为给定的请求在I/O status block 设置的一个值。或者是STATUS_PENDING,如果求被排队作额外的处理。

Remarks

在调用 IoCallDriver之前,调用者驱动程序必须为目标驱动程序在IRP中安装I/O stack location。更多信息见Passing IRPs Down the Driver Stack.

IoCallDriver 将为被调用驱动程序准备的IO_STACK_LOCATION 结构的DeviceObject成员赋值为DeviceObject 输入参数。一个传递给IoCallDriver IRP在被传递给低层之后,该IRP不再能被高层级的驱动程序访问。除非高层级驱动程序调用了IoSetCompletionRoutine 去为IRP安装一个IoCompletion 例程。 如果例程存在,传递给IoCompletion 例程的输入参数IRP拥有它的被底层驱动程序设置的 I/O status block 。并且所有低层级驱动程序的I/O stack locations 给填充0,为 Windows Server 2003, Windows XP, and Windows 2000 编写的驱动程序必须使用 PoCallDriver 传递电源 IRPs (IRP_MJ_POWER) 而不是 IoCallDriver 。更多信息见 Calling IoCallDriver vs. Calling PoCallDriver.

Requirements

Target platform

Universal

Version

Available starting with Windows 2000.

Header

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

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

<= DISPATCH_LEVEL

DDI compliance rules

CompleteRequestStatusCheckCompletionRoutineRegisteredDeleteDeviceForwardedAtBadIrql,ForwardedAtBadIrqlAllocateForwardedAtBadIrqlFsdAsyncForwardedAtBadIrqlFsdSyncIoAllocateForward,IoAllocateIrpSignalEventInCompletionTimeoutIoBuildDeviceControlWaitIoBuildDeviceControlWaitTimeout,IoBuildFsdForwardIoBuildSynchronousFsdRequestWaitIoBuildSynchronousFsdRequestWaitTimeout,IoSetCompletionRoutineExCheckIrpProcessingCompleteLowerDriverReturnMarkDevicePowerMarkingQueuedIrps,MarkIrpPendingMarkIrpPending2MarkPowerMarkPowerDownMarkQueryRelationsMarkStartDevice,PendedCompletedRequestPendedCompletedRequest2PendedCompletedRequest3PendedCompletedRequestEx,PnpIrpCompletionPowerDownFailPowerUpFailRemoveLockForwardRemoveLockForward2,RemoveLockForwardDeviceControlRemoveLockForwardDeviceControl2RemoveLockForwardDeviceControlInternal,RemoveLockForwardDeviceControlInternal2RemoveLockForwardReadRemoveLockForwardRead2,RemoveLockForwardWriteRemoveLockForwardWrite2RemoveLockMnRemove2RemoveLockMnSurpriseRemove,RemoveLockQueryMnRemoveTargetRelationNeedsRefWmiForwardHwStorPortProhibitedDDIs

See also

IoAllocateIrp

IoBuildAsynchronousFsdRequest

IoBuildDeviceIoControlRequest

IoBuildSynchronousFsdRequest

IoSetCompletionRoutine

PoCallDriver

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值