Previous | Next |
The GetStatus method retrieves device status information.
Syntax
HRESULT GetStatus(
DWORD* pdwStatus
);
Parameters
pdwStatus
[out] Pointer to a double word containing the device status information.
The possible status values indicated by pdwStatus are listed in the following table.
Status | Description |
WMDM_STATUS_READY | The media device manager and subcomponents are in a ready state. |
WMDM_STATUS_BUSY | An operation is ongoing. Evaluate status values to determine the operation. |
WMDM_STATUS_DEVICE_NOTPRESENT | The device is not connected to the computer. |
WMDM_STATUS_STORAGE_NOTPRESENT | The media is not present. For devices that support more than one medium, this value is only reported from the IWMDMStorageGlobals interface. |
WMDM_STATUS_STORAGE_INITIALIZING | The device is currently busy formatting media on a device. |
WMDM_STATUS_STORAGE_BROKEN | The medium is broken. For devices that support more than one medium, this value is only reported from the IWMDMStorageGlobals interface. |
WMDM_STATUS_STORAGE_NOTSUPPORTED | The medium is not supported by the device. For devices with more than one medium supported, this value is only returned from the IWMDMStorageGlobals interface. |
WMDM_STATUS_STORAGE_UNFORMATTED | The medium is not formatted. For devices with more than one medium supported, this value is only reported from the IWMDMStorageGlobals interface. |
WMDM_STATUS_STORAGECONTROL_INSERTING | The IWMDMStorageControl::Insert method is currently ongoing. |
WMDM_STATUS_STORAGECONTROL_DELETING | The IWMDMStorageControl::Delete operation is ongoing. |
WMDM_STATUS_STORAGECONTROL_MOVING | The IWMDMStorageControl::Move operation is ongoing |
WMDM_STATUS_STORAGECONTROL_READING | The IWMDMStorageControl::Read operation is ongoing. |
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
Any status information that can be generated by the device can be retrieved by GetStatus. One or more status values can be returned. All of the status values of all media device interfaces are reported through this call. For example, if any operation is ongoing, a call to GetStatus reports that the device is busy, WMDM_STATUS_BUSY.
See Also
Previous | Next |