Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The EnumeratePreferredAddresses method enumerates the preferred addresses for the phone object. The application does not have to call ITPhone::Open before executing this method.
This method is intended for C/C++ applications. Visual Basic and scripting applications must use the get_Addresses method.
Syntax
HRESULT EnumeratePreferredAddresses(
[out] IEnumAddress **ppEnumAddress
);
Parameters
[out] ppEnumAddress
Pointer to a location where, on success, the method places a pointer to an enumeration object that contains the list of addresses. For more information, see the following Remarks section.
Return value
This method can return one of these values.
| Value | Meaning |
|---|---|
|
Method succeeded. |
|
The ppEnumAddress parameter is not a valid pointer. |
|
There is not enough memory to allocate the enumeration object. |
Remarks
If there are no usable addresses present on the system, this method produces an empty enumeration and returns S_OK.
A phone device declares itself as being preferred to an address or set of addresses by returning address/line IDs using the TAPI 2.x phoneGetID function with device class tapi/line.
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 EnumeratePreferredAddresses. 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 IEnumAddress interface returned by ITPhone::EnumeratePreferredAddresses. The application must call Release on the IEnumAddress 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 |