Platform SDK: TAPI

ITTerminalManager::CreateDynamicTerminal

Create a dynamic terminal of a specified terminal class, media type, and direction.

HRESULT CreateDynamicTerminal(
  IUnknown *pOuterUnknown,
  IID iidTerminalClass,
  DWORD dwMediaType,
  TERMINAL_DIRECTION Direction,
  MSP_HANDLE htAddress,
  ITTerminal **ppTerminal
);

Parameters

pOuterUnknown
[in] If MSP will aggregate the terminal object, set to IUnknown interface pointer for MSP object. Usually this is set NULL.
iidTerminalClass
[in] GUID identifying class of terminal to be created.
dwMediaType
[in] Descriptor of media type for stream.
Direction
[in] TERMINAL_DIRECTION descriptor of the media stream direction for terminal.
htAddress
[in] MSP handle.
ppTerminal
[out] Pointer to ITTerminal interface for new terminal.

Return Values

Value Meaning
S_OK Method succeeded.
E_INVALIDARG The fMessageWaiting parameter is not valid.
E_POINTER The ppAddress parameter is not a valid pointer.

Remarks

When choosing a value for pTerminalClass, only some terminal class guids can be used, only those that correspond to terminals that are "dynamically" created. For example, from all terminal classes currently defined by TAPI3, only the following can be used with CreateTerminal: CLSID_MediaStreamTerminal and CLSID_VideoWindowTerm.

In addition, only those dynamic terminal classes that are supported on this address can be used. The application can discover these values by ITTerminalSupport::EnumerateDynamicTerminalClasses or ITTerminalSupport::get_DynamicTerminalClasses.

The pTerminalClass BSTR must be obtained by the application in two steps: call StringFromIID to convert the GUID to an LPOLESTR, then call SysAllocString to convert the LPOLESTR to a BSTR.

The application must use SysFreeString to free the memory allocated for the pTerminalClass parameter.

Requirements

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

See Also

ITTerminalManager, media type, TERMINAL_DIRECTION