ToUnicodeEx function Null safety user32

int ToUnicodeEx(
  1. int wVirtKey,
  2. int wScanCode,
  3. Pointer<Uint8> lpKeyState,
  4. Pointer<Utf16> pwszBuff,
  5. int cchBuff,
  6. int wFlags,
  7. int dwhkl
)

Translates the specified virtual-key code and keyboard state to the corresponding Unicode character or characters.

int ToUnicodeEx(
  UINT       wVirtKey,
  UINT       wScanCode,
  const BYTE *lpKeyState,
  LPWSTR     pwszBuff,
  int        cchBuff,
  UINT       wFlags,
  HKL        dwhkl
);

Implementation

int ToUnicodeEx(int wVirtKey, int wScanCode, Pointer<Uint8> lpKeyState,
    Pointer<Utf16> pwszBuff, int cchBuff, int wFlags, int dwhkl) {
  final _ToUnicodeEx = _user32.lookupFunction<
      Int32 Function(
          Uint32 wVirtKey,
          Uint32 wScanCode,
          Pointer<Uint8> lpKeyState,
          Pointer<Utf16> pwszBuff,
          Int32 cchBuff,
          Uint32 wFlags,
          IntPtr dwhkl),
      int Function(
          int wVirtKey,
          int wScanCode,
          Pointer<Uint8> lpKeyState,
          Pointer<Utf16> pwszBuff,
          int cchBuff,
          int wFlags,
          int dwhkl)>('ToUnicodeEx');
  return _ToUnicodeEx(
      wVirtKey, wScanCode, lpKeyState, pwszBuff, cchBuff, wFlags, dwhkl);
}