Platform SDK: RAS/Routing and RAS |
The RasGetCountryInfo function retrieves country-specific dialing information from the Windows Telephony list of countries.
For more information about country-specific dialing information and Telephony Application Programming Interface (TAPI) country identifiers, see the TAPI portion of the Platform SDK.
DWORD RasGetCountryInfo( LPRASCTRYINFO lpRasCtryInfo, // buffer that receives country information LPDWORD lpdwSize // size, in bytes, of the buffer );
sizeof(RASCTRYINFO)
to identify the version of the structure. You must also set the dwCountryId member to the TAPI country identifier of the country for which to get information.
The size of the buffer should be at least 256 bytes.
If the function succeeds, the return value is zero.
If the function fails, the return value can be one of the following error codes.
Value | Meaning |
---|---|
ERROR_INVALID_USER_BUFFER | The address or buffer specified by lpRasCtryInfo is invalid. |
ERROR_INVALID_PARAMETER | The dwCountryId member of the structure pointed to by lpRasCtryInfo was not a valid value. |
ERROR_BUFFER_TOO_SMALL | The size of the lpRasCtryInfo buffer specified by the lpdwSize parameter was not large enough to store the information for the country identified by the dwCountryId member. The function returns the required buffer size in the variable pointed to by lpdwSize. |
ERROR_TAPI_CONFIGURATION | TAPI subsystem information was corrupted. |
To enumerate information for all countries in the Windows Telephony list, set the dwCountryId member of the RASCTRYINFO structure to 1 in the initial RasGetCountryInfo call. This causes the function to return information for the first country in the list. The value returned in the dwNextCountryId member is the country identifier of the next country in the list. Use this value in repeated calls to RasGetCountryInfo until dwNextCountryID returns zero, indicating the last country in the list.
Windows NT/2000: Requires Windows NT 4.0 or later.
Windows 95/98: Requires Windows 95 OSR2 or later.
Header: Declared in Ras.h.
Library: Use Rasapi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.
Remote Access Service (RAS) Overview, Remote Access Service Functions, RASCTRYINFO