home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / inole2 / interfac / imarshal.h < prev    next >
C/C++ Source or Header  |  1996-05-21  |  1KB  |  50 lines

  1. /*
  2.  * IMARSHAL.H
  3.  *
  4.  * Definitions of a template IMarshal interface implementation.
  5.  *
  6.  * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
  7.  *
  8.  * Kraig Brockschmidt, Microsoft
  9.  * Internet  :  kraigb@microsoft.com
  10.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  11.  */
  12.  
  13.  
  14. #ifndef _IMARSHAL_H_
  15. #define _IMARSHAL_H_
  16.  
  17. #include <inole.h>
  18.  
  19. class CImpIMarshal;
  20. typedef class CImpIMarshal *PCImpIMarshal;
  21.  
  22. class CImpIMarshal : public IMarshal
  23.     {
  24.     protected:
  25.         ULONG           m_cRef;      //Interface reference count
  26.         LPVOID          m_pObj;      //Backpointer to the object
  27.         LPUNKNOWN       m_pUnkOuter; //For delegation
  28.  
  29.     public:
  30.         CImpIMarshal(LPVOID, LPUNKNOWN);
  31.         ~CImpIMarshal(void);
  32.  
  33.         STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  34.         STDMETHODIMP_(ULONG) AddRef(void);
  35.         STDMETHODIMP_(ULONG) Release(void);
  36.  
  37.         STDMETHODIMP GetUnmarshalClass(REFIID, LPVOID, DWORD
  38.             , LPVOID, DWORD, LPCLSID);
  39.         STDMETHODIMP GetMarshalSizeMax(REFIID, LPVOID, DWORD
  40.             , LPVOID, DWORD, LPDWORD);
  41.         STDMETHODIMP MarshalInterface(LPSTREAM, REFIID, LPVOID
  42.             , DWORD, LPVOID, DWORD);
  43.         STDMETHODIMP UnmarshalInterface(LPSTREAM, REFIID, LPVOID *);
  44.         STDMETHODIMP ReleaseMarshalData(LPSTREAM);
  45.         STDMETHODIMP DisconnectObject(DWORD);
  46.     };
  47.  
  48.  
  49. #endif //_IMARSHAL_H_
  50.