IWMDMStorage::SetAttributes
The SetAttributes method sets the attributes of a storage object.
Syntax
HRESULT SetAttributes(
DWORD dwAttributes,
_WAVEFORMATEX* pFormat
);
Parameters
dwAttributes
[in] DWORD containing the attributes to be set. The following table lists the attributes that can be set by this parameter.
Attribute | Description |
WMDM_FILE_ATTR_AUDIO | This file contains audio data. |
WMDM_FILE_ATTR_DATA | This file contains non-audio data. |
WMDM_FILE_ATTR_CANPLAY | This audio file can be played by the device. |
WMDM_FILE_ATTR_CANDELETE | This file can be deleted. |
WMDM_FILE_ATTR_CANMOVE | This file or folder can be moved around on the storage medium. |
WMDM_FILE_ATTR_CANRENAME | This file or folder can be renamed. |
WMDM_FILE_ATTR_CANREAD | This file can be read by the host computer. |
WMDM_FILE_ATTR_MUSIC | This audio file contains music. |
WMDM_FILE_ATTR_AUDIOBOOK | This is an audio book file. |
WMDM_FILE_ATTR_HIDDEN | This file is hidden on the file system |
WMDM_FILE_ATTR_SYSTEM | This is a system file |
WMDM_FILE_ATTR_READONLY | This is a read-only file. |
pFormat
[in] Pointer to a _WAVEFORMATEX structure that contains attribute information about the object. This parameter is optional and is ignored if the file is not audio.
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 | A parameter is invalid or is a NULL pointer. |
E_FAIL | An unspecified error occurred. |
WMDM_E_NOTCERTIFIED | The caller is not certified. |
Remarks
Many of the attributes listed for IWMDMStorage::GetAttributes cannot be set, and so are not listed in the attribute table for SetAttributes.
Requirements
Header: Defined in wmdm.idl.
Library: mssachlp.lib
See Also