METHOD_PROLOGUE
Visual Studio .NET 2003
Maintains the proper global state when calling methods of an exported interface.
METHOD_PROLOGUE(theClass, localClass )
Parameters
- theClass
- Specifies the name of the class whose interface map is being implemented.
- localClass
- Specifies the name of the local class that implements the interface map.
Remarks
Typically, member functions of interfaces implemented by CCmdTarget-derived objects already use this macro to provide automatic initialization of the pThis pointer. For example:
class CInnerUnknown : public IUnknown
...
CInnerUnknown InnerUnknown;
...
// Inner IUnknown implementation
STDMETHODIMP_(ULONG) CInnerUnknown::AddRef()
{
METHOD_PROLOGUE(CCmdTarget, InnerUnknown)
return pThis->InternalAddRef();
}
See Also
MFC Macros and Globals | Technical Note 38 | Creating New Documents, Windows, and Views