Поделиться через


PMExt_GetNotificationHandle (Compact 2013)

3/26/2014

This callback function provides Power Manager with an event handle. Power Management Extensions (PMEs) use this handle to signal readiness to receive notification of system power activity events.

Syntax

HANDLE PMExt_GetNotificationHandle{
  DWORD dwExtContext
};

Parameters

  • dwExtContext
    [in] Context value returned after PME initialization by PMExt_Init.

Return Value

An event handle that the PME will signal to indicate readiness to receive notification of system power activity events. If the PME does not need any notifications, or if an error has occurred in PMExt_GetNotificationHandle, return NULL.

Remarks

The Power Manager core calls PMExt_GetNotificationHandle during initialization to obtain an event handle. Power Manager will wait until this handle is set to the signaled state; when this happens, Power Manager will use the PMExt_EventNotification callback function to notify the PME of system power activity events.

A Power Management Extension can stop signaling events and free the event handle if it no longer needs notifications. It can also return NULL from PMExt_GetNotificationHandle to indicate that notifications are not needed, or to indicate an error condition.

Warning

Power Management Extensions execute within the context of the core Power Manager, and can have a significant effect on overall system performance and security. Errors in a PME can block the core Power Manager thread indefinitely; this can cause the system to stop responding. Performance issues in a PME can harm overall system performance. Security vulnerabilities in a PME can increase a system's vulnerability to malicious attacks.

Requirements

Header

Pmext.h

See Also

Reference

Power Management Functions