|
RegisterForDeviceNotifications problem
[复制链接]
typedef struct _ACPI_INTERFACE_STANDARD {
//
// Generic interface header
//
USHORT Size;
USHORT Version;
PVOID Context;
PINTERFACE_REFERENCE InterfaceReference;
PINTERFACE_DEREFERENCE InterfaceDereference;
//
// ACPI interfaces
//
PGPE_CONNECT_VECTOR GpeConnectVector;
PGPE_DISCONNECT_VECTOR GpeDisconnectVector;
PGPE_ENABLE_EVENT GpeEnableEvent;
PGPE_DISABLE_EVENT GpeDisableEvent;
PGPE_CLEAR_STATUS GpeClearStatus;
PREGISTER_FOR_DEVICE_NOTIFICATIONS RegisterForDeviceNotifications;
PUNREGISTER_FOR_DEVICE_NOTIFICATIONS UnregisterForDeviceNotifications;
} ACPI_INTERFACE_STANDARD, *PACPI_INTERFACE_STANDARD;
在WDM裏面找到這個有趣的struct,看起來是可以透過它來向ACPI driver Register for notification(當然在此之前必須發irp_mj_query_interface給ACPI driver,iocalldriver執行ok),不過對於下述routine的第三個參數意義不甚明瞭,不知道有沒有高手願意指教(自己反復try了很多次,結果都是blue screen)
typedef NTSTATUS (* PREGISTER_FOR_DEVICE_NOTIFICATIONS) (
PDEVICE_OBJECT,
PDEVICE_NOTIFY_CALLBACK,
PVOID);
|
|