GetMessage function Null safety user32

int GetMessage(
  1. Pointer<MSG> lpMsg,
  2. int hWnd,
  3. int wMsgFilterMin,
  4. int wMsgFilterMax
)

Retrieves a message from the calling thread's message queue. The function dispatches incoming sent messages until a posted message is available for retrieval.

BOOL GetMessageW(
  LPMSG lpMsg,
  HWND  hWnd,
  UINT  wMsgFilterMin,
  UINT  wMsgFilterMax
);

Implementation

int GetMessage(
    Pointer<MSG> lpMsg, int hWnd, int wMsgFilterMin, int wMsgFilterMax) {
  final _GetMessage = _user32.lookupFunction<
      Int32 Function(Pointer<MSG> lpMsg, IntPtr hWnd, Uint32 wMsgFilterMin,
          Uint32 wMsgFilterMax),
      int Function(Pointer<MSG> lpMsg, int hWnd, int wMsgFilterMin,
          int wMsgFilterMax)>('GetMessageW');
  return _GetMessage(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax);
}