GetKeyboardLayoutName function Null safety user32

int GetKeyboardLayoutName (
  1. Pointer<Utf16> pwszKLID
)

Retrieves the name of the active input locale identifier (formerly called the keyboard layout) for the system.

BOOL GetKeyboardLayoutNameW(
  LPWSTR pwszKLID
);

Implementation

int GetKeyboardLayoutName(Pointer<Utf16> pwszKLID) {
  final _GetKeyboardLayoutName = _user32.lookupFunction<
      Int32 Function(Pointer<Utf16> pwszKLID),
      int Function(Pointer<Utf16> pwszKLID)>('GetKeyboardLayoutNameW');
  return _GetKeyboardLayoutName(pwszKLID);
}