IAudioSystemEffectsCustomFormats::GetFormatRepresentation method (audioenginebaseapo.h)

The GetFormatRepresentation method retrieves a string representation of the custom format so that it can be displayed on a user-interface.

Syntax

HRESULT GetFormatRepresentation(
  [in]            UINT   nFormat,
  [out, optional] LPWSTR *ppwstrFormatRep
);

Parameters

[in] nFormat

Specifies the index of a supported format. This parameter can be any value in the range from zero to one less than the return value of GetFormatCount. In other words, any value in the range from zero to GetFormatCount( ) - 1.

[out, optional] ppwstrFormatRep

Specifies the address of the buffer that receives a NULL-terminated Unicode string that describes the custom format.

Return value

The GetFormatRepresentation method returns S_OK when the call is successful. Otherwise, it returns one of the error codes shown in the following table.

Return code Description
E_POINTER
Invalid pointer passed to function
E_OUTOFMEMORY
Return buffer cannot be allocated
E_INVALIDARG
nFormat is out of range

Remarks

The sAPO uses CoTaskMemAlloc to allocate the returned string. The caller must use CoTaskMemFree to delete the buffer that is pointed to by the ppwstrFormatRep parameter.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later versions of Windows.
Target Platform Desktop
Header audioenginebaseapo.h (include Audioenginebaseapo.h)
IRQL All levels.

See also

CoTaskMemAlloc

CoTaskMemFree

GetFormatCount