HFPGetBatteryLevel

Windows CE 5.0 Not SupportedWindows Embedded NavReady 2009 Supported

10/16/2008

This function reads the battery level for the specified phone.

Syntax

HRESULT HFPGetBatteryLevel( 
  HHFPPHONE hPhone, 
  DWORD*    pdwBatteryLevel 
);

Parameters

  • hPhone
    Handle to the phone object.
  • pdwBatteryLevel
    Pointer to DWORD which on return will contain the battery level value, which can be one of the following:

    • HFP_BATTERYLEVEL_UNKNOWN
    • HFP_BATTERYLEVEL_VERY_LOW
    • HFP_BATTERYLEVEL_LOW
    • HFP_BATTERYLEVEL_MED
    • HFP_BATTERYLEVEL_HI
    • HFP_BATTERYLEVEL_VERY_HI
    • HFP_BATTERYLEVEL_MAX
    • HFP_BATTERYLEVEL_NOT_SUPPORTED

    If the phone does not support the reporting battery level, returns HFP_BATTERYLEVEL_NOT_SUPPORTED.

    If the phone does not report the battery level, returns HFP_BATTERYLEVEL_UNKNOWN.

Return Value

Returns standard HRESULT codes, as well as the following:

Return Value Description

ERROR_INVALID_PARAMETER

One or more parameters are NULL or have incorrect data types.

ERROR_SUCCESS

The function completed without errors.

Requirements

Header hfpapi.h
Library hfpapi.lib
Windows Embedded CE Windows CE 5.0, Windows Embedded NavReady 2009

See Also

Reference

HFP API Functions