// Free.h : Declaration of the CFree

#ifndef __FREE_H_
#define __FREE_H_

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CFree
class ATL_NO_VTABLE CFree : 
	public CComObjectRootEx<CComMultiThreadModel>,
	public CComCoClass<CFree, &CLSID_MsjJavademoFree>,
	public IDispatchImpl<IGetCurrentThreadID, &IID_IGetCurrentThreadID, &LIBID_THREADSVLib>
{
public:
	CFree()
	{
		char out [256] ; 
		wsprintf (out, "Control created on thread %d", GetCurrentThreadId()) ;
		MessageBox (NULL, out, "Free", 0) ;
	}

DECLARE_REGISTRY_RESOURCEID(IDR_FREE)

BEGIN_COM_MAP(CFree)
	COM_INTERFACE_ENTRY(IGetCurrentThreadID)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

// IFree
public:
	STDMETHOD(get_CurrentThreadId)(/*[out, retval]*/ long *pVal);
};

#endif //__FREE_H_
