This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS
Note: This is legacy API call. It is recommended to use 32-bit equivalent
This call obtains a DBCS (double byte character set) environmental vector that resides in the country information file.
DosGetDBCSEv (Length, Country, MemoryBuffer)
The format of the information returned in this buffer is:
Word | Description |
---|---|
1 | First range definition for DBCS lead byte values High byte Binary start value (inclusive) for range one Low byte Binary stop value (inclusive) for range one. |
2 | Second range definition High byte Binary start value for range two Low byte Binary stop value for range two |
N | Nth range definition High byte Binary start value for Nth range Low byte Binary stop value for Nth range. |
N + 1 | Two bytes of binary 0 terminate list. For example: DB 81H,9FH DB E0H,FCH DB 00H,00H |
rc (USHORT) - return
Return code descriptions are:
The returned DBCS environmental vector 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.
typedef struct _COUNTRYCODE { /* ctryc */ USHORT country; /* country code */ USHORT codepage; /* code page */ } COUNTRYCODE; #define INCL_DOSNLS USHORT rc = DosGetDBCSEv(Length, Structure, MemoryBuffer); USHORT Length; /* Length of data area provided */ PCOUNTRYCODE Structure; /* Input data structure */ PCHAR MemoryBuffer; /* DBCS environmental vector (returned) * USHORT rc; /* return code */
COUNTRYCODE struc ctryc_country dw ? ;country code ctryc_codepage dw ? ;code page COUNTRYCODE ends EXTRN DosGetDBCSEv:FAR INCL_DOSNLS EQU 1 PUSH WORD Length ;Length of data area provided PUSH@ OTHER Structure ;Input data structure PUSH@ OTHER MemoryBuffer ;DBCS environmental vector (returned) CALL DosGetDBCSEv Returns WORD
Text based on http://www.edm2.com/index.php/DosGetDBCSEv