Exportar (0) Imprimir
Expandir todo
MFC
TRY
Expandir Minimizar

METHOD_PROLOGUE

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.

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();
   }

Adiciones de comunidad

AGREGAR
Mostrar:
© 2015 Microsoft