The UnloadKeyboardLayout function removes a keyboard layout.
BOOL UnloadKeyboardLayout(
HKL hkl // handle to keyboard layout
);
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. The function can fail for the following reasons:
To get extended error information, call GetLastError.
Windows 95: UnloadKeyboardLayout cannot unload the system default keyboard layout. This ensures that an appropriate character set is always available for the user to type commands for the shell or names for the file system.
Windows NT: UnloadKeyboardLayout can unload the system default keyboard layout.
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.
Keyboard Input Overview, Keyboard Input Functions, ActivateKeyboardLayout, GetKeyboardLayoutName, LoadKeyboardLayout