IMediaParamInfo::GetParamText method (medparam.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The GetParamText method retrieves a series of text strings that describe the parameter.

Syntax

HRESULT GetParamText(
  [in]  DWORD dwParamIndex,
  [out] WCHAR **ppwchText
);

Parameters

[in] dwParamIndex

Zero-based index of the parameter.

[out] ppwchText

Address of a variable that receives a pointer to a series of Unicode™ strings.

Return value

Returns an HRESULT value. Possible values include the following.

Return code Description
E_INVALIDARG
Index out of range.
E_POINTER
NULL pointer argument.
S_OK
Success.

Remarks

If the method succeeds, *ppwchText points to a string with the following format:

Name\0Unit\0Enum1\0Enum2\0...EnumN\0\0

where

  • Name is the name of the parameter.
  • Unit is the name of the units; for example, milliseconds.
  • Enum1 through
  • EnumN are descriptive names for the parameter's enumerated values. (Applies only to parameters of type MPT_ENUM.)
The application can display these values within its user interface. They are not guaranteed to follow a consistent naming scheme. If the user's computer is using an international code page, the method might return a localized string corresponding to that code page.

The object uses the CoTaskMemAlloc function to allocate memory for the string. After you call this method, call CoTaskMemFree to free the buffer.

Requirements

Requirement Value
Target Platform Windows
Header medparam.h
Library Dmoguids.lib

See also

IMediaParamInfo Interface