Files
Work/com/hold/factory.hpp
2024-08-07 09:12:07 -04:00

33 lines
838 B
C++

#ifndef _COM_FACTORY_HPP_
#define _COM_FACTORY_HPP_
#ifndef _COMMON_CONSOLE_HPP_
#include <common/console.hpp>
#endif
#ifndef _COM_COM_HPP_
#include <com/com.hpp>
#endif
#ifndef _COM_DLLSERVER_HPP_
#include <com/server.hpp>
#endif
#ifndef _COM_INSTANTIATOR_HPP_
#include <com/instance.hpp>
#endif
class ClassFactory : public IClassFactory
{
public:
ClassFactory(DLLServer &server,Console &winConsole);
virtual ~ClassFactory();
HRESULT __stdcall QueryInterface(REFIID riid,void **ppv);
ULONG __stdcall AddRef(void);
ULONG __stdcall Release(void);
HRESULT __stdcall CreateInstance(IUnknown *pUnkOuter,REFIID riid,void **ppvObj);
long __stdcall LockServer(int fLock);
void setInstantiator(Instantiator *pInstantiator);
private:
int mRefCount;
DLLServer &mServer;
Console &mWinConsole;
Instantiator *mpInstantiator;
};
#endif