GetKeyboardLayoutName (user32)
Last changed: -213.145.101.2

.
Summary

C# Signature:

[DllImport("user32.dll")]
static extern bool GetKeyboardLayoutName([Out] StringBuilder pwszKLID);

[DllImport("user32")]
public static extern bool GetKeyboardLayoutName(IntPtr pwszKLID);

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

  IntPtr ptrMem = System.Runtime.InteropServices.Marshal.AllocHGlobal(255);
  Win32Func.GetKeyboardLayoutName(ptrMem);
  string sLayout = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(ptrMem);
  System.Runtime.InteropServices.Marshal.FreeHGlobal(ptrMem);

Alternative Managed API:

Do you know one? Please contribute it!

Documentation