REDIVIVUS

Proposals / #1463

Mac SMSG_InternalRegister: BOOL __fastcc (dwEventTag ECX, pWindow EDX, dwContext, pCallback)

checked · by KierTaylor · submitted 2026-11-08

ECX is saved to [EBP-0x10] and becomes SEvtRegisterHandler's type ([ESP], 0x000190a1); this is dwEventTag. EDX -> EDI is the window (passed to SMSG_FindWindow 0x00019235, stored to a new record +8, SEvt subtype). [EBP+8] is dwContext (the SEvt id). [EBP+0xc] is pCallback (NULL gives SetLastError(0x57) and XOR EAX,EAX). Otherwise it returns SEvtRegisterHandler's EAX, and SMsgRegisterKeyDown 0x000190e4 (ECX='SMSJ', EDX=[EBP+8], two stack args) passes it back as its own result. Roles match Windows twin 0x00420a70 (hWnd, pCallback, dwEventTag, dwContext).

Changes 1, applied together

  1. Set prototype mac 0x00019040

    signatureundefined SMSG_InternalRegister(void)→BOOL SMSG_InternalRegister(uint32_t dwEventTag, void* pWindow, uint32_t dwContext, void* pCallback)
    conventionunknown→__fastcc