PIBIO_STORAGE_NOTIFY_POWER_CHANGE_FN callback function (winbio_adapter.h)

Called by the Windows Biometric Framework when the system is ready to enter a low-power state or when the system has been awakened from a low-power state. The purpose of this function is to enable the adapter to respond to transitions in the computer power state.

Syntax

PIBIO_STORAGE_NOTIFY_POWER_CHANGE_FN PibioStorageNotifyPowerChangeFn;

HRESULT PibioStorageNotifyPowerChangeFn(
  [in, out] PWINBIO_PIPELINE Pipeline,
  [in]      ULONG PowerEventType
)
{...}

Parameters

[in, out] Pipeline

Pointer to the WINBIO_PIPELINE structure associated with the biometric unit performing the operation.

[in] PowerEventType

Indicates the nature of the change. It can be one of the following values:

Value Meaning
PBT_APMSUSPEND
The system is entering a low-power state
PBT_APMRESUMEAUTOMATIC
The system is returning from a low-power state.
PBT_APMPOWERSTATUSCHANGE
The status of the system's power source is changing (e.g., the system has switched from battery to line power, or the battery is getting low).

Return value

If the function succeeds, it returns S_OK. If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.

Return code Description
E_POINTER
The Pipeline argument was NULL.
E_INVALIDARG
The PowerEventType argument was not one of the values listed in the table.

Remarks

When it receives a PBT_APMPOWERSTATUSCHANGE event, the adapter should call the Microsoft Win32 GetSystemPowerStatus API to determine the new power status.

The biometric framework calls this adapter entry point asynchronously, in the context of an arbitrary thread. It is the adapter's responsibility to synchronize the processing of this call with any other work it may be doing.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header winbio_adapter.h

See also

GetSystemPowerStatus

PBT_APMPOWERSTATUSCHANGE