/*============================================================================ * * File Name: TribbleClass.h * * Class CTribbleClass * * Description: This is a bog standard Tribble class declaration for * IClassFactory implementation * * Author: Roger Hughes * * Date: 14/10/98 * *==============================================================================*/ #if !defined(AFX_TRIBBLECLASS_H__2DAEBCD0_C326_11D1_BC1E_0000C019F5BE__INCLUDED_) #define AFX_TRIBBLECLASS_H__2DAEBCD0_C326_11D1_BC1E_0000C019F5BE__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 class CTribbleClass : IClassFactory { public: // IClassFactory HRESULT __stdcall CreateInstance (IUnknown *pUnkOuter,REFIID riid, void ** ppvObject); HRESULT __stdcall LockServer(BOOL fLock); CTribbleClass() : m_ClsId(CLSID_Tribble), m_cRef(0) {}; virtual ~CTribbleClass() {}; // IUnknown ULONG __stdcall Release(); ULONG __stdcall AddRef(); HRESULT __stdcall QueryInterface(REFIID riid, void ** pObj); private: CString m_strName; // the name applied to any new trribbles CString m_strColour; // the colour of any new tribbles CLSID m_ClsId; // Tribble class ID int m_cRef; // Reference count }; // Helper Functions extern void LockModule(); extern void UnlockModule(); #endif // !defined(AFX_TRIBBLECLASS_H__2DAEBCD0_C326_11D1_BC1E_0000C019F5BE__INCLUDED_) /*============================================================================ * End of File: TribbleClass.h ==============================================================================*/