ITAddressTranslation::TranslateAddress method (tapi3if.h)
The TranslateAddress method creates the address translation information interface. The primary goal of the TranslateAddress method is to obtain the pDestAddress string (dialable address) needed as a parameter for ITAddress::CreateCall. The TranslateAddress method returns the dialable address indirectly, as one of the properties of an ITAddressTranslationInfo object.
Syntax
HRESULT TranslateAddress(
[in] BSTR pAddressToTranslate,
[in] long lCard,
[in] long lTranslateOptions,
[out] ITAddressTranslationInfo **ppTranslated
);
Parameters
[in] pAddressToTranslate
Pointer to BSTR containing address that requires translation.
[in] lCard
Calling card used for translation.
[in] lTranslateOptions
Indicator of translation options, see LINETRANSLATEOPTION__Constants.
[out] ppTranslated
Pointer to newly created ITAddressTranslationInfo interface.
Return value
This method can return one of these values.
Value | Meaning |
---|---|
|
Method succeeded. |
|
The ppTranslated parameter is not a valid pointer. |
|
Insufficient memory exists to perform the operation. |
|
The method failed for unknown reasons. |
|
The lTranslateOptions value is not valid. |
|
This address has no TSP associated with it. |
|
The registry is corrupt. |
|
The method failed with TAPI. |
|
The TSP is not available. |
|
The card number is not valid. |
Remarks
The application must use SysAllocString to allocate memory for pAddressToTranslate and use SysFreeString to free the memory when the variable is no longer needed.
The TranslateAddress method is a COM wrapper for the TAPI 2.1 LineTranslateAddress function.
TAPI calls the AddRef method on the ITAddressTranslationInfo interface returned by TranslateAddress. The application must call Release on the ITAddressTranslationInfo 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 |