ToUnicodeEx function user32

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

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

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-tounicodeex.

Implementation

@pragma('vm:prefer-inline')
int ToUnicodeEx(
  int wVirtKey,
  int wScanCode,
  Pointer<Uint8> lpKeyState,
  PWSTR pwszBuff,
  int cchBuff,
  int wFlags,
  HKL? dwhkl,
) => _ToUnicodeEx(
  wVirtKey,
  wScanCode,
  lpKeyState,
  pwszBuff,
  cchBuff,
  wFlags,
  dwhkl ?? nullptr,
);