IAMExtDevice::get_DevicePower
Microsoft DirectShow 9.0 |
IAMExtDevice::get_DevicePower
The get_DevicePower method retrieves the external device's power mode.
Syntax
HRESULT get_DevicePower( long *pPowerMode );
Parameters
pPowerMode
[out] 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 Values
When this method succeeds, it returns S_OK. Otherwise it returns an HRESULT error code.
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.
Windows XP Service Pack 2
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 from DirectX 9.0 SDK Update (Summer 2004) or later.
Requirements
Header: Declared in Strmif.h; include Dshow.h.
Library: Use Strmiids.lib.
See Also