GetKeyNameText function Null safety user32

int GetKeyNameText (
  1. int lParam,
  2. Pointer<Utf16> lpString,
  3. int cchSize
)

Retrieves a string that represents the name of a key.

int GetKeyNameTextW(
  LONG   lParam,
  LPWSTR lpString,
  int    cchSize
);

Implementation

int GetKeyNameText(int lParam, Pointer<Utf16> lpString, int cchSize) {
  final _GetKeyNameText = _user32.lookupFunction<
      Int32 Function(Int32 lParam, Pointer<Utf16> lpString, Int32 cchSize),
      int Function(
          int lParam, Pointer<Utf16> lpString, int cchSize)>('GetKeyNameTextW');
  return _GetKeyNameText(lParam, lpString, cchSize);
}