共用方式為


IMDSPStorage2::SetAttributes2

banner art

The SetAttributes2 method extends IMDSPStorage::SetAttributes by enabling you to set audio and video formats and extended attributes of a storage object.

Syntax

HRESULT SetAttributes2(DWORDdwAttributes,DWORDdwAttributesEx,_WAVEFORMATEX*pAudioFormat,_VIDEOINFOHEADER*pVideoFormat);

Parameters

dwAttributes

[in]  DWORD containing the attributes to be set as defined in the IWMDMStorage::SetAttributes method

dwAttributesEx

[in]  DWORD containing the extended attributes. No extended attributes are currently defined.

pAudioFormat

[in]  Pointer to a _WAVEFORMATEX structure that contains audio format information about the object. This parameter is optional and is ignored if the file is not audio.

pVideoFormat

[in]  Pointer to a _VIDEOINFOHEADER structure that contains video format information about the object. This parameter is optional and 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_FAIL An unspecified error occurred.

Remarks

See Remarks for IWMDMStorage::SetAttributes.

This method is optional. For more information, see Mandatory and Optional Interfaces.

Requirements

Header: Defined in mswmdm.h.

Library: mssachlp.lib

See Also