Platform SDK: TAPI

ITAddressTranslation::TranslateAddress

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.

HRESULT TranslateAddress(
  BSTR pAddressToTranslate,
  long lCard,
  long lTranslateOptions,
  ITAddressTranslationInfo **ppTranslated
);

Parameters

pAddressToTranslate
[in] Pointer to BSTR containing address that requires translation.
lCard
[in] Calling card used for translation.
lTranslateOptions
[in] Indicator of translation options, see LINETRANSLATEOPTION__Constants.
ppTranslated
[out, retval] Pointer to newly created ITAddressTranslationInfo interface.

Return Values

Value Meaning
S_OK Method succeeded.
E_POINTER The ppTranslated parameter is not a valid pointer.
E_OUTOFMEMORY Insufficient memory exists to perform the operation.
E_UNEXPECTED The method failed for unknown reasons.
E_INVALIDARG The lTranslateOptions value is not valid.
TAPI_E_NODRIVER This address has no TSP associated with it.
TAPI_E_REGISTRY_SETTING_CORRUPT The registry is corrupt.
TAPI_E_OPERATIONFAILED The method failed with TAPI.
TAPI_E_RESOURCEUNAVAIL The TSP is not available.
TAPI_E_INVALCARD 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.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Version: Requires TAPI 3.0 or later.
  Header: Declared in Tapi3.h.
  Library: Use T3iid.lib.

See Also

ITAddressTranslation, Address Object, Dialable Addresses