GetKeyboardLayoutList

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
);
 

Parameters

nBuff
Specifies the maximum number of handles that the buffer can hold.
lpList
Pointer to the buffer that receives the array of keyboard layout handles.

Return Values

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.

QuickInfo

  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.

See Also

Keyboard Input Overview, Keyboard Input Functions, GetKeyboardLayout