StorageAdapterNotifyPowerChange callback function

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


HRESULT WINAPI StorageAdapterNotifyPowerChange(
  _Inout_ PWINBIO_PIPELINE Pipeline,
  _In_    ULONG            PowerEventType
);

typedef HRESULT (*PIBIO_STORAGE_NOTIFY_POWER_CHANGE_FN)(
    _Inout_ PWINBIO_PIPELINE Pipeline,
    _In_    ULONG            PowerEventType
);

Parameters

Pipeline [in, out]

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

PowerEventType [in]

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

ValueMeaning
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 codeDescription
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

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Winbio_adapter.h

See also

GetSystemPowerStatus
PBT_APMPOWERSTATUSCHANGE

 

 

Show: