ToAsciiEx function Null safety user32

int ToAsciiEx(
  1. int uVirtKey,
  2. int uScanCode,
  3. Pointer<Uint8> lpKeyState,
  4. Pointer<Uint16> lpChar,
  5. int uFlags,
  6. int dwhkl
)

Translates the specified virtual-key code and keyboard state to the corresponding character or characters. The function translates the code using the input language and physical keyboard layout identified by the input locale identifier.

int ToAsciiEx(
  UINT       uVirtKey,
  UINT       uScanCode,
  const BYTE *lpKeyState,
  LPWORD     lpChar,
  UINT       uFlags,
  HKL        dwhkl
);

Implementation

int ToAsciiEx(int uVirtKey, int uScanCode, Pointer<Uint8> lpKeyState,
    Pointer<Uint16> lpChar, int uFlags, int dwhkl) {
  final _ToAsciiEx = _user32.lookupFunction<
      Int32 Function(
          Uint32 uVirtKey,
          Uint32 uScanCode,
          Pointer<Uint8> lpKeyState,
          Pointer<Uint16> lpChar,
          Uint32 uFlags,
          IntPtr dwhkl),
      int Function(int uVirtKey, int uScanCode, Pointer<Uint8> lpKeyState,
          Pointer<Uint16> lpChar, int uFlags, int dwhkl)>('ToAsciiEx');
  return _ToAsciiEx(uVirtKey, uScanCode, lpKeyState, lpChar, uFlags, dwhkl);
}