Skip to content

Latest commit

 

History

History
114 lines (96 loc) · 3.99 KB

nf-mswmdm-imdspdevice-getpowersource.md

File metadata and controls

114 lines (96 loc) · 3.99 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:mswmdm.IMDSPDevice.GetPowerSource
IMDSPDevice::GetPowerSource (mswmdm.h)
The GetPowerSource method reports whether the device is capable of running on batteries, external power, or both, and on which type of power source it is currently running.
GetPowerSource
GetPowerSource method [windows Media Device Manager]
GetPowerSource method [windows Media Device Manager]
IMDSPDevice interface
IMDSPDevice interface [windows Media Device Manager]
GetPowerSource method
IMDSPDevice.GetPowerSource
IMDSPDevice::GetPowerSource
IMDSPDeviceGetPowerSource
mswmdm/IMDSPDevice::GetPowerSource
wmdm.imdspdevice_getpowersource
wmdm\imdspdevice_getpowersource.htm
WMDM
476e25cf-de18-4039-994c-570fa423821f
12/05/2018
GetPowerSource, GetPowerSource method [windows Media Device Manager], GetPowerSource method [windows Media Device Manager],IMDSPDevice interface, IMDSPDevice interface [windows Media Device Manager],GetPowerSource method, IMDSPDevice.GetPowerSource, IMDSPDevice::GetPowerSource, IMDSPDeviceGetPowerSource, mswmdm/IMDSPDevice::GetPowerSource, wmdm.imdspdevice_getpowersource
mswmdm.h
Windows
Mssachlp.lib
Windows
19H1
IMDSPDevice::GetPowerSource
mswmdm/IMDSPDevice::GetPowerSource
c++
APIRef
kbSyntax
COM
mssachlp.lib
mssachlp.dll
IMDSPDevice.GetPowerSource

IMDSPDevice::GetPowerSource

-description

The GetPowerSource method reports whether the device is capable of running on batteries, external power, or both, and on which type of power source it is currently running. If the device is running on batteries, this method also reports the percentage of total power remaining in the batteries.

-parameters

-param pdwPowerSource [out]

Pointer to a DWORD that receives a value indicating the current power source for the device. The value is one of the following flags.

Flag Description
WMDM_POWER_CAP_BATTERY The media device can run on batteries.
WMDM_POWER_CAP_EXTERNAL The media device can run on external power.
WMDM_POWER_IS_BATTERY The media device is currently running on batteries.
WMDM_POWER_IS_EXTERNAL The media device is currently running on external power.
WMDM_POWER_PERCENT_AVAILABLE The percentage of power remaining was returned in pdwPercentRemaining.

-param pdwPercentRemaining [out]

If the device is running on batteries, pdwPercentRemaining specifies a pointer to a DWORD containing the percentage of total battery power remaining.

-returns

The method returns an HRESULT. All the interface methods in Windows Media Device Manager can return any of the following classes of error codes:

  • Standard COM error codes
  • Windows error codes converted to HRESULT values
  • Windows Media Device Manager error codes
For an extensive list of possible error codes, see Error Codes.

-remarks

Only physical devices report power source capabilities and current power source. Software implementations of devices report no power capabilities or current power source.

This method is optional. For more information, see Mandatory and Optional Interfaces.

-see-also

IMDSPDevice Interface