The GetKeyboardLayoutName function retrieves the name of the active keyboard layout.
BOOL GetKeyboardLayoutName(
LPTSTR pwszKLID // pointer to buffer for layout name
);
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.
Windows NT: GetKeyboardLayoutName receives the name of the active keyboard layout for the system.
Windows 95: GetKeyboardLayoutName receives the name of the active keyboard layout for the calling thread.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Keyboard Input Overview, Keyboard Input Functions, ActivateKeyboardLayout, LoadKeyboardLayout, UnloadKeyboardLayout