GME  13
Defines | Functions
mfcdual.h File Reference

Go to the source code of this file.

Defines

#define BEGIN_DUAL_INTERFACE_PART(localClass, baseClass)
#define END_DUAL_INTERFACE_PART(localClass)   END_INTERFACE_PART(localClass) \
#define DELEGATE_DUAL_INTERFACE(objectClass, dualClass)
#define TRY_DUAL(iidSource)
#define CATCH_ALL_DUAL
#define DECLARE_DUAL_ERRORINFO()
#define DUAL_ERRORINFO_PART(objectClass)   INTERFACE_PART(objectClass, IID_ISupportErrorInfo, SupportErrorInfo) \
#define IMPLEMENT_DUAL_ERRORINFO(objectClass, riidSource)

Functions

HRESULT DualHandleException (REFIID riidSource, const CException *pAnyException)

Define Documentation

#define BEGIN_DUAL_INTERFACE_PART (   localClass,
  baseClass 
)
Value:
BEGIN_INTERFACE_PART(localClass, baseClass) \
           STDMETHOD(GetTypeInfoCount)(UINT FAR* pctinfo); \
           STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo FAR* FAR* pptinfo); \
           STDMETHOD(GetIDsOfNames)(REFIID riid, OLECHAR FAR* FAR* rgszNames, UINT cNames, LCID lcid, DISPID FAR* rgdispid); \
           STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pdispparams, VARIANT FAR* pvarResult, EXCEPINFO FAR* pexcepinfo, UINT FAR* puArgErr); \

Definition at line 17 of file mfcdual.h.

#define CATCH_ALL_DUAL
Value:
CATCH(COleException, e) \
        { \
                _hr = e->m_sc; \
        } \
        AND_CATCH_ALL(e) \
        { \
                AFX_MANAGE_STATE(pThis->m_pModuleState); \
                _hr = DualHandleException(_riidSource, e); \
        } \
        END_CATCH_ALL \
        return _hr; \

Definition at line 104 of file mfcdual.h.

Value:
BEGIN_INTERFACE_PART(SupportErrorInfo, ISupportErrorInfo) \
                STDMETHOD(InterfaceSupportsErrorInfo)(THIS_ REFIID riid); \
        END_INTERFACE_PART(SupportErrorInfo) \

Definition at line 127 of file mfcdual.h.

#define DELEGATE_DUAL_INTERFACE (   objectClass,
  dualClass 
)

Definition at line 36 of file mfcdual.h.

#define DUAL_ERRORINFO_PART (   objectClass)    INTERFACE_PART(objectClass, IID_ISupportErrorInfo, SupportErrorInfo) \

Definition at line 135 of file mfcdual.h.

#define END_DUAL_INTERFACE_PART (   localClass)    END_INTERFACE_PART(localClass) \

Definition at line 27 of file mfcdual.h.

#define IMPLEMENT_DUAL_ERRORINFO (   objectClass,
  riidSource 
)
Value:
STDMETHODIMP_(ULONG) objectClass::XSupportErrorInfo::AddRef() \
        { \
                METHOD_PROLOGUE(objectClass, SupportErrorInfo) \
                return pThis->ExternalAddRef(); \
        } \
        STDMETHODIMP_(ULONG) objectClass::XSupportErrorInfo::Release() \
        { \
                METHOD_PROLOGUE(objectClass, SupportErrorInfo) \
                return pThis->ExternalRelease(); \
        } \
        STDMETHODIMP objectClass::XSupportErrorInfo::QueryInterface( \
                REFIID iid, LPVOID* ppvObj) \
        { \
                METHOD_PROLOGUE(objectClass, SupportErrorInfo) \
                return pThis->ExternalQueryInterface(&iid, ppvObj); \
        } \
        STDMETHODIMP objectClass::XSupportErrorInfo::InterfaceSupportsErrorInfo( \
                REFIID iid) \
        { \
                METHOD_PROLOGUE(objectClass, SupportErrorInfo) \
                return (iid == riidSource) ? S_OK : S_FALSE; \
        }

Definition at line 142 of file mfcdual.h.

#define TRY_DUAL (   iidSource)
Value:
HRESULT _hr = S_OK; \
        REFIID  _riidSource = iidSource; \
        TRY \

Definition at line 99 of file mfcdual.h.


Function Documentation

HRESULT DualHandleException ( REFIID  riidSource,
const CException *  pAnyException 
)

Definition at line 26 of file mfcdual.cpp.