// This is a part of the Microsoft Foundation Classes C++ library. // Copyright (C) Microsoft Corporation // All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference and related // electronic documentation provided with the library. // See these sources for detailed information regarding the // Microsoft Foundation Classes product. #ifdef _AFXDLL #include "stdafx.h" #endif // Note: because of the nature of these functions, it is not possible // to create a 'C' or 'C++' version of them. These functions are used // for the lowest level of the OLE IDispatch implementation, and need // to be ported to each supported platform. extern "C" { ///////////////////////////////////////////////////////////////////////////// // Intel 386 version #ifdef _X86_ __declspec(naked) void AFXISAPI _AfxParseCall(AFX_PISAPICMD /*pfn*/, void* /*pArgs*/, UINT /*nSizeArgs*/) { _asm { pop edx // edx = return address pop eax // eax = pfn pop ecx // ecx = pArgs add ecx,[esp] // ecx += nSizeArgs (=scratch area) mov [ecx],edx // scratch[0] = return address sub ecx,[esp] // ecx = pArgs (again) mov esp,ecx // esp = pArgs (usually already correct) pop ecx // ecx = this pointer (the CCmdTarget*) call eax // call member function ret // esp[0] should = scratch[0] = return address } } #endif // _X86_ ///////////////////////////////////////////////////////////////////////////// // AMD 64 version #ifdef _AMD64_ // Note: AMD64 version is in src\amd64\inetcal_.s // The AMD64 compiler does not support inline assembly, so it // must be built separately with the MASM64 assembler. #endif // _AMD64_ } // end extern "C" block /////////////////////////////////////////////////////////////////////////////