GetKeyboardState function Null safety user32

int GetKeyboardState (
  1. Pointer<Uint8> lpKeyState
)

Copies the status of the 256 virtual keys to the specified buffer.

BOOL GetKeyboardState(
  PBYTE lpKeyState
);

Implementation

int GetKeyboardState(Pointer<Uint8> lpKeyState) {
  final _GetKeyboardState = _user32.lookupFunction<
      Int32 Function(Pointer<Uint8> lpKeyState),
      int Function(Pointer<Uint8> lpKeyState)>('GetKeyboardState');
  return _GetKeyboardState(lpKeyState);
}