ITTerminalManager::CreateDynamicTerminal method (termmgr.h)

The CreateDynamicTerminal method creates a dynamic terminal of a specified terminal class, media type, and direction.

Syntax

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

Parameters

[in] pOuterUnknown

If MSP will aggregate the terminal object, set to IUnknown interface pointer for MSP object. Usually this is set to NULL.

[in] iidTerminalClass

GUID identifying class of terminal to be created.

[in] dwMediaType

Descriptor of media type for stream.

[in] Direction

TERMINAL_DIRECTION descriptor of the media stream direction for terminal.

[in] htAddress

MSP handle.

[out] ppTerminal

Pointer to ITTerminal interface for new terminal.

Return value

This method can return one of these 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, the only terminal class GUIDs that can be used are 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 using ITTerminalSupport::EnumerateDynamicTerminalClasses or ITTerminalSupport::get_DynamicTerminalClasses.

The application must obtain the pTerminalClass BSTR 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

Requirement Value
Target Platform Windows
Header termmgr.h

See also

ITTerminalManager

TERMINAL_DIRECTION

media type