// AtlHello.h : Declaration of the CAtlHello

#ifndef __ATLHELLO_H_
#define __ATLHELLO_H_

#include "resource.h"       // main symbols
#include <comdef.h>


/////////////////////////////////////////////////////////////////////////////
// CAtlHello
class ATL_NO_VTABLE CAtlHello : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CAtlHello, &CLSID_AtlHello>,
	public IDispatchImpl<IAtlHello, &IID_IAtlHello, &LIBID_ATLHELLODLLLib>
{
public:
	CAtlHello()
	{
		m_bstrHelloMessage = "Hello, World" ;
	}

	_bstr_t m_bstrHelloMessage ;

DECLARE_REGISTRY_RESOURCEID(IDR_ATLHELLO)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CAtlHello)
	COM_INTERFACE_ENTRY(IAtlHello)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

// IAtlHello
public:
	STDMETHOD(SayHello)();
	STDMETHOD(get_HelloMessage)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_HelloMessage)(/*[in]*/ BSTR newVal);
};

#endif //__ATLHELLO_H_
