Windows Media Format SDK banner art
PreviousNext

IMDSPDevice::GetStatus

The GetStatus method retrieves the device status information. All device status information that the device can provide is retrieved by this method.

Syntax

HRESULT GetStatus(
  DWORD*  pdwStatus
);

Parameters

  pdwStatus

[out]  Pointer to a double word that receives a value indicating the current device status. These status values are defined in the following table.

Status Description
WMDM_STATUS_READY Windows Media Device Manager and its subcomponents are in a ready state.
WMDM_STATUS_BUSY An operation is ongoing. Check other status values to determine which operation it is.
WMDM_STATUS_DEVICE_NOTPRESENT The device is not connected to the computer.
WMDM_STATUS_STORAGE_NOTPRESENT The medium is not present. For devices that support more than one medium, this value is reported only from the IWMDMStorageGlobals interface.
WMDM_STATUS_STORAGE_INITIALIZING The device is currently busy formatting media on the device.
WMDM_STATUS_STORAGE_BROKEN The medium is not working. For devices that support more than one medium, this value is reported only from the IWMDMStorageGlobals interface.
WMDM_STATUS_STORAGE_NOTSUPPORTED The medium is not supported by the device. For devices that support more than one medium, this value is returned only from the IWMDMStorageGlobals interface.
WMDM_STATUS_STORAGE_UNFORMATTED The medium is not formatted. For devices that support more than one medium, this value is returned only from the IWMDMStorageGlobals interface.
WMDM_STATUS_STORAGECONTROL_INSERTING The IWMDMStorageControl::Insert method is currently running.
WMDM_STATUS_STORAGECONTROL_DELETING The IWMDMStorageControl::Delete method is currently running.
WMDM_STATUS_STORAGECONTROL_MOVING The IWMDMStorageControl::Move method is currently running.
WMDM_STATUS_STORAGECONTROL_READING The IWMDMStorageControl::Read method is currently running.

Return Values

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

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

Remarks

One or more status values can be returned from this call. All the status values of all the interfaces of the media device are reported through this call. For example, if a storage operation, such as writing a file to a media device is ongoing, a call to this method reports the busy status of that operation. For any ongoing operation, the status value WMDM_STATUS_BUSY is always be present.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.