Jump to content

UniCreateKeyboard: Difference between revisions

From EDM2
Ak120 (talk | contribs)
No edit summary
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== UniCreateKeyboard ==
Load the keyboard layout from disk and get the keyboard handle.
; UniCreateKeyboard(keyboardHndl, keyboardName, mode) : Load the keyboard layout from disk and get the keyboard handle.
 
===Syntax===
UniCreateKeyboard(keyboardHndl, keyboardName, mode);


=== Parameters ===
=== Parameters ===
; keyboardHndl - [[OS2 API:DataType:KHAND|KHAND]] - output : The key board handle.  All Unicode keyboard functions use this handle reference.
;keyboardHndl - [[KHAND]] - output : The key board handle.  All Unicode keyboard functions use this handle reference.
; keyboardName - [[OS2 API:DataType:KBDNAME|KBNAME]] - input : The name of the keyboard translation file name (for example <i>au</i>).  The name is not to include the path name.
;keyboardName - [[KBDNAME]] - input : The name of the keyboard translation file name (for example ''au'').  The name is not to include the path name.
; mode - [[OS2 API:DataType:ULONG|ULONG]] - input : Reserved. Must be zero
;mode - [[ULONG]] - input : Reserved. Must be zero


=== Constants ===
=== Constants ===
Line 12: Line 14:
=== Returns ===
=== Returns ===
An integer with values of:
An integer with values of:
* [[OS2 API:Unicode:error#ULS_KBDNOTFOUND|ULS_KBDNOTFOUND]]
* [[Unicode Errors|ULS_KBDNOTFOUND]]
* [[OS2 API:Unicode:error#ULS_NOMEMORY|ULS_NOMEMORY]]
* ULS_NOMEMORY
* [[OS2 API:Unicode:error#ULS_SUCCESS|ULS_SUCCESS]]
* ULS_SUCCESS
* [[OS2 API:Unicode:error#ULS_TOOMANYKBD|ULS_TOOMANYKBD]]
* ULS_TOOMANYKBD
 
=== Module ===
 
=== Define (C/C++) ===
 
=== Export name/Ordinal ===


=== Calling conversion ===
=== Calling Convention ===
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
=== Example Code ===
  [[OS2 API:DataType:KHAND|KHAND]]   keyboardHndl;
  KHAND  keyboardHndl;
  [[OS2 API:DataType:KBDNAME|KBDNAME]] keyboardName;
  KBDNAME keyboardName;
  [[OS2 API:DataType:ULONG|ULONG]]   mode;
  ULONG  mode;
  integer rc;
  integer rc;
  ...
  ...
Line 36: Line 32:


=== Related Functions ===
=== Related Functions ===
[[OS2 API:UniDestroyKeyboard|UniDestroyKeyboard]]
*[[UniDestroyKeyboard]]
[[OS2 API:UniQueryKeyboard|UniQueryKeyboard]]
*[[UniQueryKeyboard]]


=== Notes ===
=== Notes ===
Line 45: Line 41:
OS/2 Warp
OS/2 Warp


[[Category:The OS/2 API Project]]
[[Category:Uni]]

Latest revision as of 18:54, 26 July 2017

Load the keyboard layout from disk and get the keyboard handle.

Syntax

UniCreateKeyboard(keyboardHndl, keyboardName, mode);

Parameters

keyboardHndl - KHAND - output
The key board handle. All Unicode keyboard functions use this handle reference.
keyboardName - KBDNAME - input
The name of the keyboard translation file name (for example au). The name is not to include the path name.
mode - ULONG - input
Reserved. Must be zero

Constants

None

Returns

An integer with values of:

Calling Convention

Cdecl32

Example Code

KHAND   keyboardHndl;
KBDNAME keyboardName;
ULONG   mode;
integer rc;
...
rc = UniCreateKeyboard(keyboardHndl, keyboardName, mode);
...

Related Functions

Notes

If the keyboard layout is already in use the use count is incremented.

OS Version Introduced

OS/2 Warp