1 program GetCountryInfo
;
4 Sorry
, this code
is for OS
/2 only
...
12 {$IFDEF VIRTUALPASCAL}
32 {$IFDEF VER70} (* patched Borland Pascal *)
33 Country
: TCountryCode
;
34 CtryInfo
: TCountryInfo
;
37 Country
: COUNTRYCODE
; (* Country code info (0 = current country) *)
38 CtryInfo
: COUNTRYINFO
; (* Buffer for country-specific information *)
39 Size
: cardinal; (* Real size of returned data *)
46 FillChar (Country
, SizeOf (Country
), 0);
47 FillChar (CtryInfo
, SizeOf (CtryInfo
), 0);
54 (SizeOf (CtryInfo
), Country
, CtryInfo
, Size
);
55 if (W
<> NO_ERROR
) then
57 WriteLn ('DosQueryCtryInfo error: return code = ', W
);
60 WriteLn ('Code of the country is ', CtryInfo
.Country
,
61 ', current codepage is ', CtryInfo
.CodePage
);