Jump to content

KbdGetLayoutUni: Difference between revisions

From EDM2
Created page with "==Description== Returns the name of the keyboard layout in use. ==Syntax== <PRE> #define INCL_KBD #include <os2.h> PSZ pszName; Keyboard layout name.: HKBD ..."
 
No edit summary
Line 4: Line 4:
==Syntax==
==Syntax==
<PRE>
<PRE>
#define INCL_KBD
#define INCL_KBD
#include <os2.h>
#include <os2.h>


PSZ      pszName;  /*  Keyboard layout name. */
USHORT    *name;  /*  Keyboard layout name. */
HKBD     hkbd;     /*  Reserved.  Must be 0. */
HKBD       hkbd; /*  Reserved.  Must be 0. */
APIRET   rc;       /*  Return code. */
APIRET     rc;   /*  Return code. */
 
rc = KbdGetLayoutUni(name, hkbd);


rc = KbdGetLayout(pszName, hkbd);


</PRE>
</PRE>
==Parameters==
==Parameters==
; pszName (PSZ) - output : Keyboard layout name.
;   name (USHORT *) - output : Keyboard layout name.
 
A pointer to the location to return the keyboard layout name in unicode. This must be at least 9 UniChars long.  
A pointer to the location to return the keyboard layout name. This must be at least 9 bytes long.  


; hkbd (HKBD) - input : Reserved. Must be 0.
; hkbd (HKBD) - input : Reserved. Must be 0.
==Return Code==
==Return Code==
  rc (APIRET) - returns
  rc (APIRET) - returns
Line 29: Line 29:
* 373        ERROR_KBD_PARAMETER  
* 373        ERROR_KBD_PARAMETER  
* 439        ERROR_KBD_INVALID_HANDLE
* 439        ERROR_KBD_INVALID_HANDLE
==Remarks==
==Remarks==



Revision as of 17:49, 21 June 2016

Description

Returns the name of the keyboard layout in use.

Syntax


#define INCL_KBD
#include <os2.h>

USHORT     *name;  /*  Keyboard layout name. */
HKBD        hkbd;  /*  Reserved.  Must be 0. */
APIRET      rc;    /*  Return code. */

rc = KbdGetLayoutUni(name, hkbd);


Parameters

name (USHORT *) - output
Keyboard layout name.

A pointer to the location to return the keyboard layout name in unicode. This must be at least 9 UniChars long.

hkbd (HKBD) - input
Reserved. Must be 0.

Return Code

rc (APIRET) - returns

KbdGetHWID returns one of the following values:

  • 0 NO_ERROR
  • 373 ERROR_KBD_PARAMETER
  • 439 ERROR_KBD_INVALID_HANDLE

Remarks

Example Code


Related Functions