PeekMessage function Null safety user32
Dispatches incoming sent messages, checks the thread message queue for a posted message, and retrieves the message (if any exist).
BOOL PeekMessageW(
LPMSG lpMsg,
HWND hWnd,
UINT wMsgFilterMin,
UINT wMsgFilterMax,
UINT wRemoveMsg
);
Implementation
int PeekMessage(Pointer<MSG> lpMsg, int hWnd, int wMsgFilterMin,
int wMsgFilterMax, int wRemoveMsg) {
final _PeekMessage = _user32.lookupFunction<
Int32 Function(Pointer<MSG> lpMsg, IntPtr hWnd, Uint32 wMsgFilterMin,
Uint32 wMsgFilterMax, Uint32 wRemoveMsg),
int Function(Pointer<MSG> lpMsg, int hWnd, int wMsgFilterMin,
int wMsgFilterMax, int wRemoveMsg)>('PeekMessageW');
return _PeekMessage(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
}