subcalls.hlp (
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.
KbdGetCp (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_KBD
USHORT KbdGetCp(ulReserved, pidCodePage, hkbd)
ULONG ulReserved; /* must be zero */
PUSHORT pidCodePage; /* pointer to code-page identifier */
HKBD hkbd; /* keyboard handle */
The KbdGetCp function retrieves the current code-page identifier for the
specified logical keyboard. The code-page identifier defines which
translation table MS OS/2 uses to translate keystrokes into character
values. The KbdGetCp function copies the identifier to the variable pointed
to by the pidCodePage parameter.
Parameter Description
────────────────────────────────────────────────────────────────────────────
ulReserved Specifies a reserved value; must be zero.
pidCodePage Points to the variable that receives the code-page identifier.
The following are the valid code-page numbers:
Number Code page
───────────────────────────────────────────────────────────────
437 United States
850 Multilingual
860 Portuguese
863 French-Canadian
865 Nordic
hkbd Identifies the logical keyboard. The handle must have been
created previously by using the KbdOpen function.
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_KBD_DETACHED
ERROR_KBD_INVALID_HANDLE
ERROR_KBD_INVALID_CODEPAGE
Comments
The code-page identifier may be any value specified in a codepage command in
the config.sys file. The identifier is 0x0000 if MS OS/2 is using the
default translation table for the logical keyboard.
Example
This example calls the KbdGetCp function to identify which code page is
being used to translate scan codes for the specified logical keyboard.
USHORT idCodePage;
KbdGetCp(0L, /* must be zero */
&idCodePage, /* pointer to code-page identifier */
0); /* keyboard handle */
See Also
KbdOpen, KbdSetCp
♦