Windows Media Format SDK banner art
PreviousNext

IWMHeaderInfo::GetAttributeByName

The GetAttributeByName method returns a descriptive attribute that is stored in the header section of the Windows Media file, if the attribute name is specified.

Syntax

HRESULT GetAttributeByName(
  WORD*  pwStreamNum,
  LPCWSTR  pszName,
  WMT_ATTR_DATATYPE*  pType,
  BYTE*  pValue,
  WORD*  pcbLength
);

Parameters

  pwStreamNum

[in]  Pointer to a word containing the stream number.

  pszName

[in]  Pointer to a NULL-terminated string containing the name.

  pType

[out]  Pointer to a variable containing one member of the WMT_ATTR_DATATYPE enumeration type.

  pValue

[out]  Pointer to a value.

  pcbLength

[in, out]  On input, specifies a pointer to a variable containing the length of the pValue array in bytes. On output, and if the method succeeds, the variable contains the actual number of bytes written to pValue by the method.

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Return code Meaning
NS_E_INVALID_STATE The writer is not in a configurable state, or no profile has been set.
E_UNEXPECTED The method failed for an unspecified reason.

Remarks

This SDK does not support attributes with stream numbers.  So the stream number should always be set to zero, indicating that the attribute applies to the entire current file.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.