The GetKeyboardLayoutList function retrieves the keyboard layout handles corresponding to the current set of input locales in the system. The function copies the handles to the given buffer.
UINT GetKeyboardLayoutList(
int nBuff, // size of buffer in array element
HKL FAR *lpList // buffer for keyboard layout handles
);
If the function succeeds, the return value is the number of layout handles copied to the buffer or, if nBuff is zero, the return value is the size, in array elements, of the buffer needed to receive all current layout handles.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Windows NT: Requires version 4.0 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, GetKeyboardLayout