IWMDMStorage2::GetAttributes2
The GetAttributes2 method retrieves extended attributes of the storage.
Syntax
HRESULT GetAttributes2(DWORD*pdwAttributes,DWORD*pdwAttributesEx,_WAVEFORMATEX*pAudioFormat,_VIDEOINFOHEADER*pVideoFormat);
Parameters
pdwAttributes
[out] Pointer to a DWORD specifying one or more attributes defined in the IWMDMStorage::GetAttributes method, combined with a bitwise OR.
pdwAttributesEx
[out] Pointer to a DWORD specifying the extended attributes. Currently, no extended attributes are defined.
pAudioFormat
[out] Optional pointer to a _WAVEFORMATEX structure that specifies audio information about the object. This parameter is ignored if the file is not audio.
pVideoFormat
[out] Optional pointer to a _VIDEOINFOHEADER structure that specifies video information about the object. This parameter is ignored if the file is not video.
Return Values
The method returns an HRESULT. All the interface methods in Windows Media Device Manager 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 an extenstive 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 | A parameter is invalid or is a NULL pointer. |
E_FAIL | An unspecified error occurred. |
WMDM_E_NOTCERTIFIED | The caller is not certified. |
Remarks
Evaluation of attributes is a crucial step when exposing the contents of the media device. Some devices do not support hierarchical storage of data on storage media. The GetAttributes2 method is used to infer the support and format of the file system by discovering its structure through object attributes.
Requirements
Header: Defined in mswmdm.h.
Library: mssachlp.lib
See Also