www.pudn.com > Ge_opc_Server_v1.rar > OPCFACT.H


// OPCClassFactory 
//   This is an implementation of a standard COM IClassFactory interface.  
// 
//	(C) COPYRIGHT 1996 INTELLUTION INC. 
// ALL RIGHTS RESERVED 
// 
// Original Author: Al Chisholm 
// 
// Modification Log: 
//	Vers    Date   By    Notes 
//	----  -------- ---   ----- 
//	0.00  11/18/96 ACC 
// 
// 
 
 
 
// Items shared by the class factory and the DLL or EXE mainline 
// 
//extern DWORD		clientCount; 
//extern HINSTANCE	serverInstance; 
extern	DWORD		objectCount; 
extern	DWORD		lockCount; 
 
extern	void		OPCServerUnload(void); 
 
 
///////////////////////////////////////////////////////////////////////////// 
class OPCClassFactory : public IClassFactory 
{ 
  public: 
    OPCClassFactory( REFCLSID classID); 
 
    BOOL Register( DWORD regCls = REGCLS_MULTIPLEUSE); 
    BOOL Unregister( void); 
 
    STDMETHODIMP         QueryInterface( REFIID iid, LPVOID* ppInterface); 
    STDMETHODIMP_(ULONG) AddRef( void); 
    STDMETHODIMP_(ULONG) Release( void); 
 
    STDMETHODIMP         CreateInstance( LPUNKNOWN pUnkOuter, REFIID riid, LPVOID* ppvObject); 
    STDMETHODIMP         LockServer( BOOL fLock); 
 
  protected: 
    ULONG mRefCount; 
};