#pragma once
#include "IComEvtClient.h"

namespace ComSupport
{
	class CComEvtClient : public IComEvtClient2
	{
	public:
		CComEvtClient();
		virtual ~CComEvtClient();

	public://interface IComEvtClient
		HRESULT OnEvent(
				DWORD dwObjID,
				const _bstr_t& strCP_Name,
				const _bstr_t& strIdMember,
				const CArray<CComVariant,CComVariant&>& arrArgs);

	public:
		BOOL AttachEvents(
			DWORD dwObjID,
			LPDISPATCH lpdisp);

		BOOL DetachEvents(
			DWORD dwObjID);


	protected:
		CMapPtrToPtr m_map;
	};
};
