IMDSPDevice::GetStatus
The GetStatus method retrieves all the device status information that the device can provide. This method must be implemented. It must not return WMDM_E_NOTSUPPORTED or E_NOTIMPL. For more information, see the second table under Implementing Service Providers.
Syntax
HRESULT GetStatus(
DWORD* pdwStatus
);
Parameters
pdwStatus
[out] Pointer to a DWORD that receives 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
The method returns an HRESULT. All the interface methods in Windows Media Device Manager and service provider 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 a complete list of possible error codes, see Error Codes.
Possible values include, but are not limited to, those in the following table.
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 present.
Requirements
Header: Defined in wmsp.idl.
Library: mssachlp.lib
See Also