所有驱动程序都必须准备好为 DispatchPnP 例程中的IRP_MJ_PNP请求提供服务。发送时PnP 管理器在枚举、资源重新均衡以及系统上发生即插即用活动的任何其他时间发送IRP_MJ_PNP请求。 驱动程序还可以发送某些 IRP_MJ_PNP 请求,具体取决于次要函数代码。输入参数取决于 IRP 当前 I/O 堆栈位置中 MinorFunction 处的值。
IRP_MJ_INTERNAL_DEVICE_CONTROL 显示另外 8 个 本主题记录串行 IRP 主要函数代码。 标头:Wdm.h (包括 Wdm.h 或 Ntddk.h) IRP_MJ_CREATE IRP_MJ_CREATE请求会打开串行设备。 发送时间 客户端必须先打开串行设备,然后才能访问该端口或连接到该端口的设备。
IRP_MJ_INTERNAL_DEVICE_CONTROL IRP_MJ_PNP IRP_MJ_POWER IRP_MJ_QUERY_INFORMATION IRP_MJ_READ IRP_MJ_SET_INFORMATION IRP_MJ_SHUTDOWN IRP_MJ_SYSTEM_CONTROL IRP_MJ_WRITE I/O 堆栈位置 I/O 状态块 向驱动程序堆栈的下层传递 IRP 为较低级驱动程序创建 IRP ...
The Plug and Play Manager sends the IRP_MJ_PNP request whenever Plug and Play activity occurs on the system. Other operating system components and other kernel-mode drivers can also send certain IRP_MJ_PNP requests, depending on the minor function code. ...
如果您的驅動程式不得呼叫IoCopyCurrentIrpStackLocationToNext(,因此如果驅動程式的 EvtDeviceWdmIrpPreprocess回呼函式收到的裝置物件控制碼 (PDO) ,以及 IRP 的主要函式程式碼IRP_MJ_PNP或IRP_MJ_POWER,則不得設定IoCompletion常式) 。 否則,驅動程式驗證器會回報錯誤。
IRP_MJ_CLOSE IRP_MJ_CREATE IRP_MJ_DEVICE_CONTROL IRP_MJ_FILE_SYSTEM_CONTROL IRP_MJ_FLUSH_BUFFERS IRP_MJ_INTERNAL_DEVICE_CONTROL IRP_MJ_PNP IRP_MJ_POWER IRP_MJ_QUERY_INFORMATION IRP_MJ_READ IRP_MJ_SET_INFORMATION IRP_MJ_SHUTDOWN
IRP_MJ_CLOSE IRP_MJ_CREATE IRP_MJ_DEVICE_CONTROL IRP_MJ_FILE_SYSTEM_CONTROL IRP_MJ_FLUSH_BUFFERS IRP_MJ_INTERNAL_DEVICE_CONTROL IRP_MJ_PNP IRP_MJ_POWER IRP_MJ_QUERY_INFORMATION IRP_MJ_READ IRP_MJ_SET_INFORMATION IRP_MJ_SHUTDOWN
#define IRP_MJ_POWER 0x16 #define IRP_MJ_SYSTEM_CONTROL 0x17 #define IRP_MJ_DEVICE_CHANGE 0x18 #define IRP_MJ_QUERY_QUOTA 0x19 #define IRP_MJ_SET_QUOTA 0x1a #define IRP_MJ_PNP 0x1b 这些每一个都有特定的意思,比较常用的有:
Subject: RE: [ntdev] IRP_MJ_PNP and display driver I’ve got no experience with hotplugging graphics (AGP cards tend to short the VCC to GND when unplugged, which is not a good thing), so this may be of no help whatsoever…
IRP_MJ_POWERWhen SentA driver that owns power policy targets this IRP to its PDO to enable its device to awaken in response to an external event, such as an incoming phone call. A driver must call PoRequestPowerIrp to send this IRP....