#include <windows.h>
#include "ieliza.h"

class  CElizaProxy : public IEliza, IMarshal
{
    protected:
        ULONG   m_RefCount;
		char 	m_ShareName [128] ;

		HANDLE 	m_hMap ;
		LPTSTR	m_pSharedMem ;
		HANDLE	m_hResponseEvent ;
		HANDLE	m_hComplaintEvent ;

		          

    public:

        CElizaProxy  (void);
        ~CElizaProxy (void);

        //IUnknown members
        STDMETHODIMP         QueryInterface(REFIID, LPVOID*);
        STDMETHODIMP_(ULONG) AddRef(void);
        STDMETHODIMP_(ULONG) Release(void);

        //IEliza members
        STDMETHODIMP         Complain (LPOLESTR, LPOLESTR);

		//IMarshal members
  		STDMETHODIMP GetUnmarshalClass (REFIID, VOID*, DWORD, VOID*, DWORD, CLSID *) ;
  		STDMETHODIMP GetMarshalSizeMax (REFIID, VOID*, DWORD, VOID*, DWORD, DWORD *) ;
	  	STDMETHODIMP MarshalInterface (IStream *, REFIID , VOID * , DWORD, VOID *, DWORD) ;
  		STDMETHODIMP UnmarshalInterface (IStream *, REFIID, VOID **) ;
  		STDMETHODIMP ReleaseMarshalData (IStream * ) ;
  		STDMETHODIMP DisconnectObject ( DWORD ) ;

    };
