LoadKeyboardLayout function Null safety user32

int LoadKeyboardLayout(
  1. Pointer<Utf16> pwszKLID,
  2. int Flags
)

Loads a new input locale identifier (formerly called the keyboard layout) into the system.

HKL LoadKeyboardLayoutW(
  LPCWSTR pwszKLID,
  UINT    Flags
);

Implementation

int LoadKeyboardLayout(Pointer<Utf16> pwszKLID, int Flags) {
  final _LoadKeyboardLayout = _user32.lookupFunction<
      IntPtr Function(Pointer<Utf16> pwszKLID, Uint32 Flags),
      int Function(Pointer<Utf16> pwszKLID, int Flags)>('LoadKeyboardLayoutW');
  return _LoadKeyboardLayout(pwszKLID, Flags);
}