[Toc][Index]

DosGetCtryInfo


Bindings:  C, MASM 

This call obtains country-dependent formatting information that resides in 
the country information file. 
 DosGetCtryInfo     (Length, Country, MemoryBuffer, DataLength) 
 
 Length (USHORT) - input 
    Length, in bytes, of the data area (MemoryBuffer). This length should 
    be at least 38 bytes. 
 Country (PCOUNTRYCODE) - input 
    Address of the country information structure: 
    country (USHORT) 
       Country code identifier; 0 is the default country code. 
    codepage (USHORT) 
       Code page identifier; 0 is the code page of the current process. 
 MemoryBuffer (PCOUNTRYINFO) - output 
    Address of the buffer where the country-dependent data is returned. 
    The application must request enough space in memory, a minimum of 38 
    bytes, to hold the returned data. If the requested space is not large 
    enough, the system fills the allocated space with as much data as it 
    can hold. If the requested space is too large, the extra memory 
    requested is set to 0. The data is returned in the buffer in the 
    following format: 
    country (USHORT) 
       Country code identifier. 
    codepage (USHORT) 
       Code page identifier. 
    dateformat (USHORT) 
       Date format. 
       Value     Definition 
       0         mm/dd/yy 
       1         dd/mm/yy 
       2         yy/mm/dd 
    currency (CHAR) 
       Currency identifier, terminated with a null. 
    thousandsep (CHAR) 
       Thousands separator, terminated with a null. 
    decimalsep (CHAR) 
       Decimal separator, terminated with a null. 
    datesep (CHAR) 
       Date separator, terminated with a null. 
    timesep (CHAR) 
       Time separator, terminated with a null. 
    currencyformat (UCHAR) 
       The currency bit fields in the following format: 
       Bit       Description 
       7-3       Reserved 
       2         0 = Bits 0 and 1 are used. 
                 1 = Bits 0 and 1 are ignored; the currency indicator 
                 replaces the decimal indicator. 
       1         0 = No space between the currency indicator and money 
                 value. 
                 1 = One space between the currency indicator and money 
                 value. 
       0         0 = Currency indicator precedes the money value. 
                 1 = Currency indicator follows the money value. 
    decimalspace (UCHAR) 
       Number (in binary) of decimal spaces used to indicate currency 
       value. 
    timeformat (UCHAR) 
       Time format for presentation in file directory: 
       Bit       Description 
       7-1       Reserved 
       0         0 = 12-hour format 
                 1 = 24-hour format. 
    reserved (USHORT) 
       Reserved, set to zero. 
    datalistsep (CHAR) 
       Data list separator, terminated with a null. 
    reserved (USHORT) 
       Reserved, set to zero. 
 DataLength (PUSHORT) - output 
    Address of the length, in bytes, of the country dependent information. 
    
 rc (USHORT) - return 
    Return code descriptions are: 
    0         NO_ERROR 
    396       ERROR_NLS_NO_COUNTRY_FILE 
    397       ERROR_NLS_OPEN_FAILED 
    398       ERROR_NO_COUNTRY_OR_CODEPAGE 
    399       ERROR_NLS_TABLE_TRUNCATED 
 
 Remarks 
 The returned country dependent information may be for the default country 
 and current process code page, or for a specific country and code page. 
 For more information on code page, see DosSetCp. 
 
 Family API Considerations 
 Some options operate differently in DOS mode than in OS/2 mode. Note that 
 not all country information is available in DOS 3.3. 

Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs