Platform SDK: TAPI

ITTerminalSupport::CreateTerminal

Creates and initializes a new ITTerminal object based on the dynamic terminal class and media. The terminal class is identified by a GUID. The GUID must be converted to a string using StringFromIID to pass to this method.

HRESULT CreateTerminal(
  BSTR pTerminalClass,
  long lMediaType,
  TERMINAL_DIRECTION Direction,
  ITTerminal **ppTerminal
);

Parameters

pTerminalClass
[in] Pointer to BSTR containing the terminal class (GUID) for the new terminal object.
lMediaType
[in] Pointer to the media type for the new terminal object.
Direction
[in] TERMINAL_DIRECTION descriptor of the terminal direction.
ppTerminal
[out, retval] Pointer to the ITTerminal object created.

Return Values

Value Meaning
S_OK Method succeeded.
E_INVALIDARG The pTerminalClass or lMediaType parameter is not valid.
E_POINTER The ppTerminal parameter is not a valid pointer.
E_OUTOFMEMORY Insufficient memory exists to create the ITTerminal object.
E_MEDIATYPE The lMediaType parameter is invalid.
TAPI_E_NOTSUPPORTED Dynamic terminal creation is not supported.

Remarks

The application must use SysAllocString to allocate memory for the pTerminalClass parameter and use SysFreeString to free the memory when the variable is no longer needed.

Once a terminal is created, it can be selected onto only one call.

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, terminal class, media type, TERMINAL_DIRECTION, Terminal Object, Terminal Object Interfaces, Address Object