IWMDMDevice::GetType
The GetType method retrieves information defining what operation types are supported by the device.
Syntax
HRESULT GetType(
DWORD* pdwType
);
Parameters
pdwType
[out] Pointer to a DWORD containing the device type attributes. The possible values returned in pdwType are defined in the following table.
Device type | Description |
WMDM_DEVICE_TYPE_PLAYBACK | The media device supports audio playback. |
WMDM_DEVICE_TYPE_RECORD | The media device supports audio recording. |
WMDM_DEVICE_TYPE_DECODE | The media device supports audio format decoding. |
WMDM_DEVICE_TYPE_ENCODE | The media device supports audio format encoding. |
WMDM_DEVICE_TYPE_STORAGE | The media device has on-board storage for media files. |
WMDM_DEVICE_TYPE_VIRTUAL | The media device is not a physical device. |
WMDM_DEVICE_TYPE_SDMI | The media device can accept SDMI-protected content. |
WMDM_DEVICE_TYPE_NONSDMI | The media device can accept non-SDMI content. |
WMDM_DEVICE_TYPE_NONREENTRANT | The media device must synchronize access to Windows Media Device Manager services. |
WMDM_DEVICE_TYPE_FILELISTRESYNC | The media device allows the file list to be resynchronized. |
WMDM_DEVICE_TYPE_VIEW_PREF_METADATAVIEW | The media device prefers metadata views while its storages are enumerated. |
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 |
S_OK | The method succeeded. |
E_INVALIDARG | The pdwType parameter is an invalid or NULL pointer. |
E_FAIL | An unspecified error occurred. |
Remarks
Microsoft recommends setting both WMDM_DEVICE_TYPE_SDMI and WMDM_DEVICE_TYPE_NONSDMI flags.
Requirements
Header: Defined in wmdm.idl.
Library: mssachlp.lib
See Also