IRP_MN_SET_LOCK

IRP_MN_SET_LOCK

Bus drivers must handle this IRP for their child devices (child PDOs) that support device locking. Function and filter drivers do not handle this request.
总线驱动程序必须为支持设备锁定的子设备 (子 PDOs) 处理此 IRP。函数和过滤驱动程序不处理此请求。

Major Code

IRP_MJ_PNP

When Sent

The PnP manager sends this IRP to direct driver(s) to lock the device and prevent device eject, or to unlock the device.
PnP管理器发送此IRP以指示驱动程序锁定设备并防止设备弹出或解锁设备。

The PnP manager sends this IRP at IRQL PASSIVE_LEVEL in an arbitrary thread context.
PnP管理器在IRQL PASSIVE_LEVEL中的任意线程上下文中发送此IRP。

Input Parameters

The Parameters.SetLock.Lock member of the IO_STACK_LOCATION structure is a BOOLEAN value specifying whether to lock (TRUE) or unlock (FALSE) the device.
IO_STACK_LOCATION 结构的Parameters.SetLock.Lock成员是一个布尔值, 指定是否锁定 (TRUE) 或解锁 (FALSE) 设备。

Output Parameters

None

I/O Status Block

A bus driver sets Irp->IoStatus.Status to STATUS_SUCCESS or to an appropriate error status.
总线驱动程序将Irp-> IoStatus.Status设置为STATUS_SUCCESS或设置为适当的错误状态。

On success, a driver sets Irp->IoStatus.Information to zero.
成功时,驱动程序将Irp-> IoStatus.Information设置为零。

If a bus driver does not handle this IRP, it leaves Irp->IoStatus.Status as is and completes the IRP.
如果总线驱动程序不处理此IRP,它将保持Irp-> IoStatus.Status状态并完成IRP。

Function and filter drivers do not handle this IRP. Such drivers call IoSkipCurrentIrpStackLocation and pass the IRP down to the next driver. Function and filter drivers do not set an IoCompletion routine, do not modify Irp->IoStatus, and must not complete the IRP.
函数和过滤驱动程序不处理这个IRP。这些驱动程序调用IoSkipCurrentIrpStackLocation并将IRP传递给下一个驱动程序。函数和过滤驱动程序不设置IoCompletion例程,不要修改Irp-> IoStatus,也不能完成IRP

Operation

If a driver returns success for this IRP, it ensures that the device has been locked or unlocked before completing the IRP.
如果驱动程序为该IRP返回成功,它将确保设备在完成IRP之前已被锁定或解锁。

See Plug and Play for the general rules for handling Plug and Play minor IRPs.
有关处理即插即用次要IRP的一般规则,请参阅即插即用。

Sending This IRP

Reserved for system use. Drivers must not send this IRP.
保留供系统使用。驱动程序不得发送此IRP。

Requirements

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值