IAudioSystemEffectsCustomFormats::GetFormatRepresentation 方法 (audioenginebaseapo.h)

方法 GetFormatRepresentation 會擷取自訂格式的字串表示,以便顯示在使用者介面上。

語法

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

參數

[in] nFormat

指定支援之格式的索引。 此參數可以是範圍從零到一個小於 GetFormatCount 傳回值的任何值。 換句話說,範圍中的任何值從零到 GetFormatCount ( ) - 1。

[out, optional] ppwstrFormatRep

指定緩衝區的位址,該緩衝區會接收描述自定義格式的NULL終止 Unicode 字串。

傳回值

方法 GetFormatRepresentation 會在呼叫成功時傳回S_OK。 否則,它會傳回下表所示的其中一個錯誤碼。

傳回碼 Description
E_POINTER
傳遞至函式的指標無效
E_OUTOFMEMORY
無法配置傳回緩衝區
E_INVALIDARG
nFormat 超出範圍

備註

sAPO 會使用 CoTaskMemAlloc 來配置傳回的字串。 呼叫端必須使用 CoTaskMemFree 來刪除 ppwstrFormatRep 參數所指向的緩衝區。

規格需求

需求
最低支援的用戶端 可在 Windows Vista 和更新版本的 Windows 中使用。
目標平台 桌面
標頭 audioenginebaseapo.h (include Audioenginebaseapo.h)
IRQL 所有層級。

另請參閱

CoTaskMemAlloc

CoTaskMemFree

GetFormatCount