Previous | Next |
The SetAttributes method sets the attributes of a storage object.
Syntax
HRESULT SetAttributes(
DWORD dwAttributes,
_WAVEFORMATEX* pFormat
);
Parameters
dwAttributes
[in] Double word containing the attributes to be set. The following table lists the attributes that can be set by the dwAttributes 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. |
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
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Return code | Description |
E_INVALIDARG | A parameter is invalid or is a NULL pointer. |
E_FAIL | An error occurred. |
Remarks
Many of the attributes listed for IMDSPStorage::GetAttributes cannot be set, and so are not listed in the attribute table for SetAttributes.
See Also
Previous | Next |