dos12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DosGetCtryInfo (1.2)
Function Group                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSNLS
 
USHORT DosGetCtryInfo(cbBuf, pctryc, pctryi, pcbCountryInfo)
USHORT cbBuf;            /* length of data area                           */
PCOUNTRYCODE pctryc;     /* pointer to structure containing country info. */
PCOUNTRYINFO pctryi;     /* pointer to structure receiving country info. */
PUSHORT pcbCountryInfo;  /* pointer to variable for number of bytes      */
 
The DosGetCtryInfo function retrieves a copy of the country-dependent
formatting information for the specified country code and code-page
identifier. Country-dependent formatting information defines the symbols and
formats used to express currency values, dates, times, and numbers in a
given country.
 
The DosGetCtryInfo function copies the information from the country.sys file
to the COUNTRYINFO structure. If this structure is too small to hold all the
information, DosGetCtryInfo truncates the information. If the structure is
larger than the information, the function fills any remaining bytes with
zeros.
 
The DosGetCtryInfo function is a family API function.
 
Parameter       Description
────────────────────────────────────────────────────────────────────────────
 
cbBuf           Specifies the size (in bytes) of the COUNTRYINFO structure.
 
pctryc          Points to the COUNTRYCODE structure that contains the
                country code and the code-page identifier used to retrieve
                country-dependent information.
 
pctryi          Points to the COUNTRYINFO structure that receives the
                country-dependent formatting information.
 
pcbCountryInfo  Points to the variable that receives the number of bytes of
                information copied to the COUNTRYINFO structure.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
 
     ERROR_NLS_BAD_TYPE
     ERROR_NLS_NO_COUNTRY_FILE
     ERROR_NLS_NO_CTRY_CODE
     ERROR_NLS_OPEN_FAILED
     ERROR_NLS_TABLE_TRUNCATED
     ERROR_NLS_TYPE_NOT_FOUND
 
Restrictions
 
In real mode, the following restriction applies to the DosGetCtryInfo
function:
 
♦  There is no method of identifying the boot drive. The system assumes that
   the country.sys file is in the root directory of the current drive.
 
See Also
 
COUNTRYCODE, COUNTRYINFO