// Clock.h : Declaration of the CClock

#ifndef __CLOCK_H_
#define __CLOCK_H_

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CClock
class ATL_NO_VTABLE CClock : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CClock, &CLSID_Clock>,
	public IDispatchImpl<IClock, &IID_IClock, &LIBID_PNCOMDEMOLib>
{
public:
	CClock()
	{
		m_AMPM = TRUE;
	}

	BOOL m_AMPM; // PN: Our AMPM property

DECLARE_REGISTRY_RESOURCEID(IDR_CLOCK)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CClock)
	COM_INTERFACE_ENTRY(IClock)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

// IClock
public:
	STDMETHOD(get_AMPM)(/*[out, retval]*/ BOOL *pVal);
	STDMETHOD(put_AMPM)(/*[in]*/ BOOL newVal);
	STDMETHOD(get_Time)(/*[out, retval]*/ BSTR *pVal);
};

#endif //__CLOCK_H_
