41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
#ifndef _COM_INPROC_HPP_
|
|
#define _COM_INPROC_HPP_
|
|
#ifndef _COM_COM_HPP_
|
|
#include <com/com.hpp>
|
|
#endif
|
|
|
|
#ifndef _TEST_INPROCSERVERDEMO_HPP_
|
|
#include <test/ipdemo.hpp>
|
|
#endif
|
|
|
|
class Console;
|
|
|
|
class InProcServer
|
|
{
|
|
public:
|
|
class InProcServerNoInterface{};
|
|
InProcServer(IUnknown *pUnkOuter,REFIID riid,Console &winConsole);
|
|
~InProcServer();
|
|
HRESULT virtual __stdcall QueryInterface(REFIID riid,void **ppv);
|
|
ULONG virtual __stdcall AddRef(void);
|
|
ULONG virtual __stdcall Release(void);
|
|
protected:
|
|
virtual REFIID getREFIID(void)=0;
|
|
virtual void *getInstance(void)=0;
|
|
Console &getConsole(void);
|
|
private:
|
|
InProcServer &operator=(const InProcServer &someInProcServer);
|
|
static InProcServer *createInProcServer(IUnknown *pUnkOuter,REFIID riid);
|
|
|
|
SmartPointer<IUnknown> mUnkOuter;
|
|
int mRefCount;
|
|
Console &mWinConsole;
|
|
};
|
|
|
|
extern "C"
|
|
{
|
|
// InProcServer *createInProcServer(IUnknown *pUnkOuter,REFIID riid,Console &winConsole);
|
|
InProcServerDemo *createInProcServer(IUnknown *pUnkOuter,REFIID riid,Console &winConsole);
|
|
}
|
|
#endif
|