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

KbdGetCp

This call allows a process to query the code page being used to translate scan codes to ASCII characters.

Syntax

KbdGetCp (Reserved, CodePageID, KbdHandle)

Parameters

Reserved (ULONG) - input: Reserved and must be set to zero.

CodePageID (PUSHORT) - output: Address of the code page ID located in the application's data area. The keyboard support copies the current code page ID for a specified keyboard handle into this word. The code page ID is equivalent to one of the code page IDs specified in the CONFIG.SYS CODEPAGE = statement or 0000.

KbdHandle (HKBD) - input: Default keyboard or the logical keyboard.

Return Code

rc (USHORT) - return:Return code descriptions are:

0 NO_ERROR

373 ERROR_KBD_PARAMETER

439 ERROR_KBD_INVALID_HANDLE

445 ERROR_KBD_FOCUS_REQUIRED

447 ERROR_KBD_KEYBOARD_BUSY

464 ERROR_KBD_DETACHED

504 ERROR_KBD_EXTENDED_SG

Remarks

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.

Bindings

C

#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 */

MASM

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
Family API
DOS	Process Manager	DosBeep DosExit DosSleep DosExecPgm
File Manager	DosChDir DosChgFilePtr DosClose DosDelete DosDupHandle DosMkDir DosMove DosQCurDir DosQCurDisk DosSetFileMode DosOpen DosQFileInfo DosRead DosQFileMode DosQFSInfo DosQVerify DosRmDir DosSelectDisk DosFindClose DosFindFirst DosFindNext DosSetFileInfo DosSetVerify DosWrite DosFileLocks DosSetFHandState DosNewSize DosBufReset DosQFHandState DosSetFSinfo DosShutdown
Memory Manager	DosFreeSeg DosSubAlloc DosSubFree DosSubSet DosAllocHuge DosAllocSeg DosReallocHuge DosReallocSeg DosGetHugeShift DosCreateCSAlias
NLS	DosCaseMap DosGetCtryInfo DosGetDBCSEv DosSetCtryCode DosGetCollate DosGetMessage DosInsMessage DosPutMessage
Date and Time	DosSetDateTime DosGetDateTime
Devices	DosDevConfig DosDevIOCtl DosDevIOCtl2
Signals	DosHoldSignal DosSetSigHandler
Misc	BadDynLink DosGetEnv DosGetMachineMode DosGetVersion DosError DosErrClass DosSetVec
KBD	KbdCharIn KbdFlushBuffer KbdGetStatus KbdSetStatus KbdStringIn KbdPeek
VIO	VioGetBuf VioGetConfig VioGetCurPos VioGetCurType VioGetPhysBuf VioReadCellStr VioReadCharStr VioScrollUp VioScrollDn VioScrollLf VioScrollRt VioScrUnLock VioSetCurPos VioSetCurType VioSetMode VioGetMode VioShowBuf VioWrtCellStr VioWrtCharStr VioWrtCharStrAtt VioWrtNAttr VioWrtNCell VioWrtNChar VioWrtTTY VioScrLock VioPopUp
Tools	BIND
Modules	DOSCALLS.DLL VIOCALLS.DLL KBDCALLS.DLL MSG.DLL
Libraries	API.LIB OS2386.LIB FAPI.LIB DOSCALLS.LIB SUBCALLS.LIB