REDIVIVUS

Proposals / #1583

Mac IPeekMessage: BOOL __fastcc (pMsg ECX, nMsgFilterMin EDX, nMsgFilterMax, dwRemoveMsg)

checked · by KierTaylor · submitted 2026-11-08

ECX -> EDI = the MSG buffer. EDX = filter min, [EBP+8] = filter max, [EBP+0xc] = remove flags (&1 = PM_REMOVE). All four go to Msg_GetPendingMessage 0x000290e9 ([ESP]=msg, [ESP+4]=remove, [ESP+8]=min, [ESP+0xc]=max). It then fixes up the retrieved message (WM_ACTIVATEAPP window, key and mouse messages) and returns [EBP-0x10] (1 when a message was retrieved, else 0). PeekMessage 0x00029397 calls it with ECX, EDX and two stack args, and GetMessage also calls it.

Changes 1, applied together

  1. Set prototype mac 0x000293a1

    signatureundefined IPeekMessage(void)→BOOL IPeekMessage(void* pMsg, uint32_t nMsgFilterMin, uint32_t nMsgFilterMax, uint32_t dwRemoveMsg)
    conventionunknown→__fastcc