Windows Media Format SDK banner art
PreviousNext

IWMDMDeviceControl::GetStatus

The GetStatus method retrieves the current operating status of a media device.

Syntax

HRESULT GetStatus(
  DWORD*  pdwStatus
);

Parameters

  pdwStatus

[out]  Pointer to a double word containing the control status of a device. The control status value contains one or more of the following flags.

Flag Description
WMDM_STATUS_READY Windows Media Device Manager and its subcomponents are in a ready state.
WMDM_STATUS_BUSY An operation is currently being performed. Evaluate the other status values to determine which operation it is.
WMDM_STATUS_DEVICECONTROL_PLAYING The device is currently playing.
WMDM_STATUS_DEVICECONTROL_RECORDING The device is currently recording.
WMDM_STATUS_DEVICECONTROL_PAUSED The device is currently paused.
WMDM_STATUS_DEVICECONTROL_REMOTE The play or record operation of the device is being remotely controlled by the application.
WMDM_STATUS_DEVICECONTROL_STREAM The play or record method is streaming data to or from the media device.

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Return code Description
E_INVALID_ARG The pdwStatus parameter is an invalid or NULL pointer.
E_FAIL An unspecified error occurred.

Remarks

This method reveals which control activity, such as playing or recording, is occurring at the device. However, the method cannot indicate a global status state such as downloading. If the device is busy for any reason other than device control, you will receive a WMDM_STATUS_BUSY code and should call the IWMDMDevice::GetStatus method for more detailed information. You should not attempt to call the Play, Record, Pause, Resume, or Stop methods of this interface if WMDM_STATUS_BUSY is returned and consequent evaluation of the values retrieved through IWMDMDevice::GetStatus doesn't result in any status value found in the above table.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.