ITTerminalSupport::GetDefaultStaticTerminal method (tapi3if.h)

The GetDefaultStaticTerminal method gets the default static terminal for the media type specified.

Syntax

HRESULT GetDefaultStaticTerminal(
  [in]  long               lMediaType,
  [in]  TERMINAL_DIRECTION Direction,
  [out] ITTerminal         **ppTerminal
);

Parameters

[in] lMediaType

Media type of the required terminal.

[in] Direction

TERMINAL_DIRECTION descriptor of the terminal direction.

[out] ppTerminal

Pointer to the ITTerminal interface. NULL if no terminal is available.

Return value

This method can return one of these values.

Value Meaning
S_OK
Method succeeded.
S_FALSE
No terminal is available. *ppTerminal will be returned as NULL.
E_FAIL
Unspecified error.
E_POINTER
The lMediaType parameter is not a valid pointer.
E_MEDIATYPE
The lMediaType parameter is not a valid media type.
E_OUTOFMEMORY
Insufficient memory exists to create the Terminal object.

Remarks

This method does not return dynamic terminals. For example, having a media type of TAPIMEDIATYPE_VIDEO and a terminal direction of TD_RENDER defines a dynamic terminal; this method will fail with those parameters.

The default static terminal returned by this method is one of the static terminals returned by ITTerminalSupport::EnumerateStaticTerminals or ITTerminalSupport::get_StaticTerminals. Usually, the default terminal is the one selected as "preferred device" in Control Panel's "Sounds and Multimedia Properties" applet.

TAPI calls the AddRef method on the ITTerminal interface returned by ITTerminalSupport::GetDefaultStaticTerminal. The application must call Release on the ITTerminal interface to free resources associated with it.

Requirements

Requirement Value
Target Platform Windows
Header tapi3if.h (include Tapi3.h)

See also

Address Object

ITTerminalSupport

Media type

TERMINAL_DIRECTION

Terminal Object

Terminal Object Interfaces