tapiGetLocationInfo

The tapiGetLocationInfo function returns the country code and city (area) code that the user has set in the current location parameters in the Telephony Control Panel. The application can use this information to assist the user in forming proper canonical telephone numbers, such as by offering these as defaults when new numbers are entered in a phone book entry or database record.

LONG tapiGetLocationInfo(
  LPCSTR lpszCountryCode,  
  LPCSTR lpszCityCode  
);
 

Parameters

lpszCountryCode
A pointer to a memory location where a NULL-terminated ASCII string specifying the country code for the current location is to be returned. The application should allocate at least 8 bytes of storage at this location to hold the string (TAPI does not return more than 8 bytes, including the terminating NULL). An empty string (\0) is returned if the country code has not been set for the current location.
lpszCityCode
A pointer to a memory location where a NULL-terminated ASCII string specifying the city (area) code for the current location is to be returned. The application should allocate at least 8 bytes of storage at this location to hold the string (TAPI does not return more than 8 bytes, including the terminating NULL). An empty string (\0) is returned if the city code has not been set for the current location.

Return Values

Returns zero if the request succeeds or a negative error number if an error occurs. Possible return values are TAPIERR_REQUESTFAILED.

QuickInfo

  Version: Use TAPI version 1.4 and later.
  Header: Declared in tapi.h.
  Import Library: Link with tapi32.lib.

See Also

TAPI Reference Overview, Assisted Telephony Services Reference