Jump to content

KbdGetCp: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
==Description==
==Description==
This function supports the code page switching for the keyboard.  
This function supports the code page switching for the keyboard. It gets the current in-use code page.
It gets the current in-use code page.
 


==Syntax==
==Syntax==
Line 16: Line 13:


return = KbdGetCp(ulReserved, pidCP, hkbd);
return = KbdGetCp(ulReserved, pidCP, hkbd);
</PRE>


</PRE>
==Parameters==
==Parameters==
ulReserved (ULONG) - input
;ulReserved (ULONG) - input:Reserved. Must be 0.  
 
;pidCP (PUSHORT) - output:Pointer to Code-page ID.
    Reserved. Must be 0.  
:A pointer to a USHORT in which the code-page ID is returned.
 
;hkbd (HKBD) - input:Reserved. Must be 0.
pidCP (PUSHORT) - output
 
    Pointer to Code-page ID.
 
    A pointer to a USHORT in which the code-page ID is returned.  
 
hkbd (HKBD) - input
 
    Reserved. Must be 0.  
 


==Return Code==
==Return Code==
  return (APIRET) - returns
  return (APIRET) - returns
KbdGetCp returns one of the following values:
KbdGetCp returns one of the following values:
 
* 0 NO_ERROR
* 0     NO_ERROR.
* 373 ERROR_KBD_PARAMETER
* 373   ERROR_KBD_PARAMETER
* 439 ERROR_KBD_INVALID_HANDLE
* 439   ERROR_KBD_INVALID_HANDLE
* 445 ERROR_KBD_FOCUS_REQUIRED
* 445   ERROR_KBD_FOCUS_REQUIRED
* 447 ERROR_KBD_KEYBOARD_BUSY
* 447   ERROR_KBD_KEYBOARD_BUSY
* 504 ERROR_KBD_EXTENDED_SG
* 504   ERROR_KBD_EXTENDED_SG


==Remarks==
==Remarks==
The code-page ID is the currently active keyboard code page. A value of 0 indicates the default code-page translation table.  
The code-page ID is the currently active keyboard code page. A value of 0 indicates the default code-page translation table.  


==Example Code==
[[Category:Kbd]]
<PRE>
 
</PRE>
==Related Functions==
* [[OS2 API:CPI:
 
 
[[Category:The OS/2 API Project]]

Revision as of 02:20, 5 December 2016

Description

This function supports the code page switching for the keyboard. It gets the current in-use code page.

Syntax

#define INCL_KBD
#include <os2.h>

ULONG      ulReserved;  /*  Reserved.  Must be 0. */
PUSHORT    pidCP;       /*  Pointer to Code-page ID. */
HKBD       hkbd;        /*  Reserved.  Must be 0. */
APIRET     return;      /*  Return code. */

return = KbdGetCp(ulReserved, pidCP, hkbd);

Parameters

ulReserved (ULONG) - input
Reserved. Must be 0.
pidCP (PUSHORT) - output
Pointer to Code-page ID.
A pointer to a USHORT in which the code-page ID is returned.
hkbd (HKBD) - input
Reserved. Must be 0.

Return Code

return (APIRET) - returns

KbdGetCp returns one of the following values:

  • 0 NO_ERROR
  • 373 ERROR_KBD_PARAMETER
  • 439 ERROR_KBD_INVALID_HANDLE
  • 445 ERROR_KBD_FOCUS_REQUIRED
  • 447 ERROR_KBD_KEYBOARD_BUSY
  • 504 ERROR_KBD_EXTENDED_SG

Remarks

The code-page ID is the currently active keyboard code page. A value of 0 indicates the default code-page translation table.