invoke最终会调用_AfxDispatchCall

来源:互联网 发布:股票手机模拟软件 编辑:程序博客网 时间:2024/05/12 23:33
__declspec(naked) void AFXAPI_AfxDispatchCall(AFX_PMSG /*pfn*/, void* /*pArgs*/, UINT /*nSizeArgs*/){_asm{pop     edx         // edx = return addresspop     eax         // eax = pfnpop     ecx         // ecx = pArgsadd     ecx,[esp]   // ecx += nSizeArgs (=scratch area)mov     [ecx],edx   // scratch[0] = return addresssub     ecx,[esp]   // ecx = pArgs (again)mov     esp,ecx     // esp = pArgs (usually already correct)pop     ecx         // ecx = this pointer (the CCmdTarget*)call    eax         // call member functionret                 // esp[0] should = scratch[0] = return address}}

olcall.cpp
原创粉丝点击