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 allows a process to query the code page being used to translate scan codes to ASCII characters.
KbdGetCp (Reserved, CodePageID, KbdHandle)
rc (USHORT) - return:Return code descriptions are:
The CodePageID is the currently active keyboard code page. A value of 0 indicates the code page translation table in use is the ROM code page translation table provided by the hardware.
#define INCL_KBD USHORT rc = KbdGetCp(Reserved, CodePageID, KbdHandle); ULONG Reserved; /* Reserved (must be zero) */ PUSHORT CodePageID; /* Code Page ID */ HKBD KbdHandle; /* Keyboard handle */ USHORT rc; /* return code */
EXTRN KbdGetCp:FAR INCL_KBD EQU 1 PUSH DWORD Reserved ;Reserved (must be zero) PUSH@ WORD CodePageID ;Code Page ID PUSH WORD KbdHandle ;Keyboard handle CALL KbdGetCp Returns WORD