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.
DosGetDBCSEv (1.2)
Function Group  Changes                           Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSNLS
 
USHORT DosGetDBCSEv(cbBuf, pctryc, pchBuf)
USHORT cbBuf;           /* length of buffer                       */
PCOUNTRYCODE pctryc;    /* pointer to structure for country code  */
PCHAR pchBuf;           /* pointer to buffer for DBCS information */
 
The DosGetDBCSEv function retrieves the double-byte character set (DBCS)
environment vector for the given country code and code-page identifier.
 
The DosGetDBCSEv function is a family API function.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
cbBuf      Specifies the size (in bytes) of the buffer that receives the
           DBCS environment vector.
 
pctryc     Points to the COUNTRYCODE structure that contains the country
           code and code-page identifier used to retrieve the DBCS
           environment vector.
 
pchBuf     Points to the buffer that receives the country-dependent DBCS
           environment vector.
 
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
 
Comments
 
The DBCS environment vector defines the low and high ranges for the DBCS
lead-byte values.
 
The DosGetDBCSEv function copies the information from the country.sys file
to a buffer. The first two bytes in the environment vector specify the low
and high values in the range for the DBCS lead-byte values. The last two
bytes are both set to zero. The form of the information is similar to the
following:
 
BYTE low1, high1;
BYTE low, high2;
    .
    .
    .
BYTE lown, highn;
BYTE 0, 0;
 
If the buffer is too small to hold all of the information, the DosGetDBCSEv
function truncates the information. To avoid this, make sure the buffer is
at least ten bytes long. You can verify that all information has been copied
by checking the last two bytes to make sure they are zeros. If the structure
is larger than the information, the function fills any remaining bytes with
zeros.
 
Restrictions
 
In real mode, the following restriction applies to the DosGetDBCSEv
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
 
DosCaseMap, DosGetCollate, DosGetCp, DosGetCtryInfo, DosSetCp, VioGetCp,
VioSetCp, COUNTRYCODE