ITPhone::EnumerateTerminals method (tapi3if.h)

The EnumerateTerminals method retrieves an enumeration of terminals that are associated with the phone. The application does not have to call ITPhone::Open before executing this method.

Syntax

HRESULT EnumerateTerminals(
  [in]  ITAddress     *pAddress,
  [out] IEnumTerminal **ppEnumTerminal
);

Parameters

[in] pAddress

Pointer to ITAddress interface.

[out] ppEnumTerminal

Pointer to the IEnumTerminal interface that enumerates terminals.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

If no terminals are associated with the phone, this method produces an empty enumeration and returns S_OK.

Although the phoneGetID function requires the handle to an open phone device, the application does not have to call the ITPhone::Open method before calling EnumerateTerminals. This is because the implementation of the phone object can open the phone and call phoneGetID during TAPI initialization or when a new phone object appears.

TAPI calls the AddRef method on the IEnumTerminal interface returned by ITPhone::EnumerateTerminals. The application must call Release on the IEnumTerminal interface to free resources associated with it.

Requirements

Requirement Value
Target Platform Windows
Header tapi3if.h (include Tapi3.h)
Library Uuid.lib
DLL Tapi3.dll

See also

IEnumTerminal

ITAddress

ITPhone