Windows Media Format SDK banner art
PreviousNext

IWMDMOperation::GetObjectAttributes

The GetObjectAttributes method retrieves the content attributes. Audio attributes include the number of samples per second, the number of bytes per sample, and so on.

Syntax

HRESULT GetObjectAttributes(
  DWORD*  pdwAttributes,
  _WAVEFORMATEX*  pFormat
);

Parameters

  pdwAttributes

[out]  Pointer to a double word containing the attributes.

  pFormat

[out]  Pointer to a _WAVEFORMATEX structure containing the format for files with audio data attributes.

Return Values

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

Return code Description
WMDM_E_USER_CANCELLED The application instructs Windows Media Device Manager to cancel the current operation without waiting for it to finish.
E_FAIL An unspecified error occurred.

Remarks

This method is called after the GetObjectName method.

When transferring data to storage, you must provide attributes for the object. If the stream is audio data, the _WAVEFORMATEX structure to which pFormat points must be filled. If the object is not audio data, then the pFormat parameter can be ignored.

If either E_FAIL or WMDM_E_USER_CANCELLED is returned from this call, the operation is cancelled and the End method is called. If the application is using block mode and returns WMDM_E_USER_CANCELLED, then Windows Media Device Manager will return this same error to the application.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.