Platform SDK: TAPI

ITTerminalSupport::GetDefaultStaticTerminal

Gets the default static terminal for the media type specified.

HRESULT GetDefaultStaticTerminal(
  long lMediaType,
  TERMINAL_DIRECTION Direction,
  ITTerminal **ppTerminal
);

Parameters

lMediaType
[in] Media type of the required terminal.
Direction
[in] TERMINAL_DIRECTION descriptor of the terminal direction.
ppTerminal
[out, retval] Pointer to the ITTerminal interface. NULL if no terminal is available.

Return 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.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Version: Requires TAPI 3.0 or later.
  Header: Declared in Tapi3.h.
  Library: Use T3iid.lib.

See Also

ITTerminalSupport, Media type, TERMINAL_DIRECTION, Terminal Object, Terminal Object Interfaces, Address Object