FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Dobbs M-Dev
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
March 01, 1998

Control How COM Marshals Your Data

(Page 16 of 20)
March 1998/Control How COM Marshals Your Data/Listing 4

Listing 4: marsamp.h — Project header file

#define  FLAG_ARRAY_SIZE   256

#ifdef __cplusplus

// {BAEA9B70-28E9-11d1-ADD0-006097731D51}
DEFINE_GUID(CLSID_SimpleObject, 0xbaea9b70, 0x28e9, 0x11d1, 0xad,
                           0xd0, 0x0, 0x60, 0x97, 0x73, 0x1d, 0x51);

// {005763A0-2850-11d1-ADCD-006097731D51}
DEFINE_GUID(IID_ISimpleObject, 0x5763a0, 0x2850, 0x11d1, 0xad,
                           0xcd, 0x0, 0x60, 0x97, 0x73, 0x1d, 0x51);

#undef  IMPL
#define IMPL

#define DECLARE_INTERFACE_PTR(iface, piface)                \
        interface iface; typedef iface FAR * piface

#ifndef IUNKNOWN_METHODS
#define IUNKNOWN_METHODS(IPURE)                             \
    STDMETHOD(QueryInterface)                               \
        (THIS_ REFIID riid, LPVOID FAR * ppvObj) IPURE;     \
    STDMETHOD_(ULONG,AddRef)  (THIS) IPURE;                 \
    STDMETHOD_(ULONG,Release) (THIS) IPURE;
#endif

DECLARE_INTERFACE_PTR(ISimpleObject, LPSIMPLEOBJECT);
#define ISIMPLEOBJECT_METHODS(IPURE)                        \
    STDMETHOD(DisplayArray)                                 \
         (THIS_ BOOL *) IPURE;                              \

#undef INTERFACE
#define INTERFACE ISimpleObject
DECLARE_INTERFACE_(ISimpleObject, IUnknown)
{
   IUNKNOWN_METHODS (PURE)
   ISIMPLEOBJECT_METHODS (PURE)
};

#define PRINTONFAILURE(hr, str) if (FAILED(hr)) printf(str, hr)
#define RETURNONFAILURE(hr, str) \
      if (FAILED(hr)) {printf(str, hr); return hr;}

#endif
//End of File
Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK