DispatchMessage function Null safety user32

int DispatchMessage(
  1. Pointer<MSG> lpMsg
)

Dispatches a message to a window procedure. It is typically used to dispatch a message retrieved by the GetMessage function.

LRESULT DispatchMessageW(
  const MSG *lpMsg
);

Implementation

int DispatchMessage(Pointer<MSG> lpMsg) {
  final _DispatchMessage = _user32.lookupFunction<
      IntPtr Function(Pointer<MSG> lpMsg),
      int Function(Pointer<MSG> lpMsg)>('DispatchMessageW');
  return _DispatchMessage(lpMsg);
}