Jungo WinDriver
Official Documentation
|
DWORD DLLCALLCONV WDC_EventRegister | ( | _In_ WDC_DEVICE_HANDLE | hDev, |
_In_ DWORD | dwActions, | ||
_In_ EVENT_HANDLER | funcEventHandler, | ||
_In_ PVOID | pData, | ||
_In_ BOOL | fUseKP | ||
) |
Registers the application to receive Plug-and-Play and power management events notifications for the device.
[in] | hDev | Handle to a Plug-and-Play WDC device, returned by WDC_PciDeviceOpen() |
[in] | dwActions | A bit mask of flags indicating which events to register to: Plug-and-Play events: WD_INSERT Device inserted WD_REMOVE Device removed Device power state change events: WD_POWER_CHANGED_D0 Full power WD_POWER_CHANGED_D1 Low sleep WD_POWER_CHANGED_D2 Medium sleep WD_POWER_CHANGED_D3 Full sleep WD_POWER_SYSTEM_WORKING Fully on Systems power state: WD_POWER_SYSTEM_SLEEPING1 Fully on but sleeping WD_POWER_SYSTEM_SLEEPING2 CPU off, memory on, PCI on WD_POWER_SYSTEM_SLEEPING3 CPU off, Memory is in refresh, PCI on aux power WD_POWER_SYSTEM_HIBERNATE OS saves context before shutdown WD_POWER_SYSTEM_SHUTDOWN No context saved |
[in] | funcEventHandler | A user-mode event handler callback function, which will be called when an event for which the caller registered to receive notifications (see dwActions) occurs. (The prototype of the event handler EVENT_HANDLER is defined in windrvr_events.h.) |
[in] | pData | Data for the user-mode event handler callback routine (funcEventHandler) |
[in] | fUseKP | If TRUE When an event for which the caller registered to receive notifications (dwActions) occurs, the device's Kernel PlugIn driver's KP_Event function will be called. (The Kernel PlugIn driver to be used for the device is passed to WDC_xxxDeviceOpen() and stored in the WDC device structure). If this function returns TRUE, the user-mode events handler callback function (funcEventHandler) will be called when the kernel-mode event processing is completed. If FALSE When an event for which the caller registered to receive notifications (dwActions) occurs, the user-mode events handler callback function will be called. |