This commit is contained in:
2024-08-07 09:16:27 -04:00
parent fdfadd5c7e
commit 5f971cf684
5200 changed files with 731717 additions and 0 deletions

30
proto/source/factory.hpp Normal file
View File

@@ -0,0 +1,30 @@
#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
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);
protected:
virtual void *createInstance(void)=0;
private:
int mRefCount;
DLLServer &mServer;
Console &mWinConsole;
};
#endif