ITPhone::get_Addresses method (tapi3if.h)

The get_Addresses method returns a collection of addresses that the phone can be used on. The application does not have to call ITPhone::Open before executing this method.

This method is intended for Visual Basic and scripting applications. C/C++ applications should use the EnumerateAddresses method instead.

Syntax

HRESULT get_Addresses(
  [out] VARIANT *pAddresses
);

Parameters

[out] pAddresses

Pointer to a VARIANT containing an ITCollection of ITAddress interface pointers.

Return value

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

Remarks

A phone device declares itself as being available on all addresses that support audio terminals by the TSP setting the PHONEFEATURE_GENERICPHONE bit in the dwPhoneFeatures member of the PHONECAPS structure. A phone device can also declare itself as being preferred to an address or set of addresses by returning address/line IDs using phoneGetID with device class tapi/line. The get_Addresses method returns addresses that have been identified both ways.

To get only addresses that the phone is preferred on, you can call the get_PreferredAddresses method.

The application does not have to call the ITPhone::Open method before calling get_Addresses. 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 ITAddress interface returned by ITPhone::get_Addresses. The application must call Release on the ITAddress 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

ITPhone

get_PreferredAddresses