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.
KbdGetHWID (1.2)
◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_KBD
USHORT KbdGetHWID(pkbdhwid, hkbd)
PKBDHWID pkbdhwid; /* pointer to structure for ID number */
HKBD hkbd; /* keyboard handle */
The KbdGetHWID function retrieves the hardware ID number of a keyboard.
Parameter Description
────────────────────────────────────────────────────────────────────────────
pkbdhwid Points to the KBDHWID structure that receives the ID number of
the keyboard.
hkbd Identifies the logical keyboard. This handle must have been
created 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_PARAMETER
Example
This example opens a logical keyboard, and then calls the KbdGetHWID
function to retrieve the hardware ID number of that keyboard.
HKBD hkbd;
KBDHWID kbhw;
KbdOpen(&hkbd); /* opens keyboard */
KbdGetFocus(IO_WAIT, hkbd); /* gets focus for keyboard */
kbhw.cb = sizeof(kbhw); /* sets structure length */
KbdGetHWID(&kbhw, hkbd); /* gets ID number */
See Also
DosDevIOCtl, KbdOpen, KBDHWID, KBD_GETKEYBDTYPE
♦