Applies to: desktop apps only
Retrieves the name of the active input locale identifier (formerly called the keyboard layout) for the system.
Syntax
BOOL WINAPI GetKeyboardLayoutName( __out LPTSTR pwszKLID );
Parameters
- pwszKLID [out]
-
Type: LPTSTR
The buffer (of at least KL_NAMELENGTH characters in length) that receives the name of the input locale identifier, including the terminating null character. This will be a copy of the string provided to the LoadKeyboardLayout function, unless layout substitution took place.
Return value
Type: BOOL
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
The input locale identifier is a broader concept than a keyboard layout, since it can also encompass a speech-to-text converter, an Input Method Editor (IME), or any other form of input.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | GetKeyboardLayoutNameW (Unicode) and GetKeyboardLayoutNameA (ANSI) |
See also
- Reference
- ActivateKeyboardLayout
- LoadKeyboardLayout
- UnloadKeyboardLayout
- Conceptual
- Keyboard Input
Send comments about this topic to Microsoft
Build date: 3/6/2012