The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
METHOD_PROLOGUE
Maintains the proper global state when calling methods of an exported interface.
METHOD_PROLOGUE( theClass , localClass )
- 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.
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 CMySink : public CCmdTarget { public: CMySink(); ~CMySink() {}; protected: DECLARE_INTERFACE_MAP() // The following block declares an inner class called 'XSinky' BEGIN_INTERFACE_PART(Sinky, ISampleSink) STDMETHOD(SinkFunc)(); END_INTERFACE_PART(Sinky) };
STDMETHODIMP_(ULONG) CMySink::XSinky::AddRef()
{
METHOD_PROLOGUE(CMySink, Sinky);
return pThis->InternalAddRef();
}
Requirements
Header: afxwin.h
Show: