Export (0) Print
Expand All

lineTranslateAddress (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function translates the specified address into a dialable string format.

LONG lineTranslateAddress(
  HLINEAPP hLineApp, 
  DWORD dwDeviceID, 
  DWORD dwAPIVersion, 
  LPCWSTR lpszAddressIn, 
  DWORD dwCard, 
  DWORD dwTranslateOptions, 
  LPLINETRANSLATEOUTPUT lpTranslateOutput
);

Parameters

hLineApp
[in] Application handle returned by the lineInitialize function. If an application has not yet called lineInitialize, it can set the hLineApp parameter to NULL.
dwDeviceID
[in] Value that specifies the device identifier for the line device upon which the call is intended to be dialed, so that variations in dialing procedures on different lines can be applied to the translation process.
dwAPIVersion
[in] Highest version of TAPI supported by the application (not necessarily the value negotiated by lineNegotiateAPIVersion on some particular line device).
lpszAddressIn
[in] Pointer to a null-terminated string that contains the address from which the data is to be extracted for translation. Must be in either the canonical address format, or an arbitrary string of dialable digits (non-canonical). This parameter must not be NULL. If the AddressIn contains a subaddress or name field, or additional addresses separated from the first address by ASCII CR and LF characters, only the first address is translated, and the remainder of the string is returned to the application without modification.
dwCard
[in] Unsupported; set to zero.
dwTranslateOptions
[in] Value that specifies the associated operations to be performed prior to the translation of the address into a dialable string. This parameter uses LINETRANSLATEOPTION.
Note   If you have set the LINETRANSLATEOPTION_CANCELCALLWAITING bit, it is also advisable to set the LINECALLPARAMFLAGS_SECURE bit in the dwCallParamFlags member of the LINECALLPARAMS structure (passed in to the lineMakeCall functionthrough the lpCallParams parameter). This prevents the line device from using dialable digits to suppress call interrupts.
lpTranslateOutput
[out] Pointer to an application-allocated memory area to contain the output of the translation operation, of type LINETRANSLATEOUTPUT. Prior to calling lineTranslateAddress, the application should set the dwTotalSize member of this structure to indicate the amount of memory available to TAPI for returning data.

Return Values

Zero indicates success. A negative error number indicates that an error occurred. The following table shows the return values for this function.

ValueDescription
LINEERR_BADDEVICEIDThe device id is incorrect.
LINEERR_INCOMPATIBLEAPIVERSIONThe API version is incompatible.
LINEERR_INIFILECORRUPTThe INI file is corrupted.
LINEERR_INVALADDRESSThe address is invalid.
LINEERR_INVALAPPHANDLEThe application handle is invalid.
LINEERR_INVALCARDThe card is invalid.
LINEERR_INVALPARAMThe parameter is invalid.
LINEERR_INVALPOINTERThe pointer is invalid.
LINEERR_NODRIVERThe driver was not found.
LINEERR_NOMEMNot enough memory is available.
LINEERR_OPERATIONFAILEDThe operation failed.
LINEERR_RESOURCEUNAVAILThe resource is unavailable.
LINEERR_STRUCTURETOOSMALLThe structure is too small.

Remarks

This function does not translate multiplexed canonical addresses — that is, two canonical addresses separated by <CRLF>. Only the first address is translated. The other addresses are ignored.

When an address is specified with a country/region code but without the local area code, the translation is not as expected. Instead of translating the address as a local call, the system translates the address as a long distance call with no area code. To avoid this behavior, set the LINETRANSLATEOPTION_FORCELOCAL bit or provide the area code for all addresses, including local ones.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Tapi.h.
Link Library: Coredll.lib.

See Also

lineInitialize | lineMakeCall | lineNegotiateAPIVersion | LINECALLPARAMS | LINETRANSLATEOUTPUT


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft