IAMExtDevice::get_DevicePower method (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The get_DevicePower method retrieves the external device's power mode.

Syntax

HRESULT get_DevicePower(
  [out] long *pPowerMode
);

Parameters

[out] pPowerMode

Pointer to a long integer that receives one of the following values, indicating the device's power mode.

Value Description
ED_POWER_OFF Power is off.
ED_POWER_ON Power if on.
ED_POWER_STANDBY Device is in standby mode.

Return value

When this method succeeds, it returns S_OK. Otherwise it returns an HRESULT error code.

Remarks

In Windows XP Service Pack 2 and later, the following additional power mode is defined.

Value Description
ED_POWER_DEVICE_DEPENDENT Power is on with limited functions.
 

To use this constant, include the header file Xprtdefs.h.

DV and MPEG Camcorder Implementation

The MSDV and UVC drivers return ED_POWER_ON when the camcorder is on. If the camcorder is off or in standby mode, the DV driver is not loaded, so this method is not available. If the camcorder is removed unexpectedly, the method can return ERROR_GEN_FAILURE.

MSTape supports both ED_POWER_OFF and ED_POWER_ON, but not ED_POWER_STANDBY.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

Error and Success Codes

IAMExtDevice Interface

IAMExtDevice::put_DevicePower