Windows2003-3790/inetcore/connectionwizard/icwutil/factory.h
2020-09-30 16:53:55 +02:00

60 lines
1.8 KiB
C++

//**********************************************************************
// File name: factory.h
//
//
// Copyright (c) 1993-1996 Microsoft Corporation. All rights reserved.
//**********************************************************************
#if !defined(FACTORY_H)
#define FACTORY_H
#ifdef __cplusplus
/**********************************************************************
ObjectClass: ClassFactory
Summary:
Interfaces: IUnknown
Standard interface providing COM object features.
IClassFactory
Standard interface providing COM Class Factory features.
Aggregation:
**********************************************************************/
class ClassFactory : public IClassFactory
{
public:
// Main Object Constructor & Destructor.
ClassFactory(CServer* pServer, CLSID const *);
~ClassFactory(void);
// IUnknown methods. Main object, non-delegating.
virtual STDMETHODIMP QueryInterface(REFIID, void **);
virtual STDMETHODIMP_(ULONG) AddRef(void);
virtual STDMETHODIMP_(ULONG) Release(void);
// Interface IClassFactory
virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter,
const IID& iid,
void** ppv);
virtual STDMETHODIMP LockServer(BOOL bLock);
private:
// Main Object reference count.
LONG m_cRefs;
// Pointer to this component server's control object.
CServer* m_pServer;
// CLSID of the COM object to create
CLSID const* m_pclsid;
};
typedef ClassFactory* PClassFactory;
#endif // __cplusplus
#endif // FACTORY_H