REDIVIVUS

Proposals / #1582

Mac PeekMessage: BOOL __cdecl (pMsg, pWindow, nMsgFilterMin, nMsgFilterMax, dwRemoveMsg) Win32 shim

checked · by KierTaylor · submitted 2026-11-08

This is the Mac Win32-shim PeekMessage(A). The caller MessagePump 0x0004a6f7 stores five args ([ESP]=the MSG buffer, then four zeros) and tests EAX. The body forwards [EBP+8] (msg) as ECX, [EBP+0x10] (filter min) as EDX, and [EBP+0x14]/[EBP+0x18] (filter max, remove flags) as stack args to IPeekMessage 0x000293a1, returning its result. [EBP+0xc] (hWnd) is unused but kept, because callers pass it. This matches Win32 BOOL PeekMessageA(LPMSG, HWND, UINT, UINT, UINT).

Changes 1, applied together

  1. Set prototype mac 0x0002937e

    signatureundefined PeekMessage(void)→BOOL PeekMessage(void* pMsg, void* pWindow, uint32_t nMsgFilterMin, uint32_t nMsgFilterMax, uint32_t dwRemoveMsg)
    convention__cdecl