PostMessage function Null safety user32

int PostMessage (
  1. int hWnd,
  2. int Msg,
  3. int wParam,
  4. int lParam
)

Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.

BOOL PostMessageW(
  HWND   hWnd,
  UINT   Msg,
  WPARAM wParam,
  LPARAM lParam
);

Implementation

int PostMessage(int hWnd, int Msg, int wParam, int lParam) {
  final _PostMessage = _user32.lookupFunction<
      Int32 Function(IntPtr hWnd, Uint32 Msg, IntPtr wParam, IntPtr lParam),
      int Function(int hWnd, int Msg, int wParam, int lParam)>('PostMessageW');
  return _PostMessage(hWnd, Msg, wParam, lParam);
}