diff options
Diffstat (limited to 'private/oleutest/act/srvcore/factory.hxx')
-rw-r--r-- | private/oleutest/act/srvcore/factory.hxx | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/private/oleutest/act/srvcore/factory.hxx b/private/oleutest/act/srvcore/factory.hxx new file mode 100644 index 000000000..c0e27b2eb --- /dev/null +++ b/private/oleutest/act/srvcore/factory.hxx @@ -0,0 +1,101 @@ +/* + * factory.hxx + */ + +#ifndef _FACTORY_ +#define _FACTORY_ + +// +// MyFactory base class. +// +class MyFactory : public IClassFactory +{ +protected : + unsigned long Refs; + +public: + MyFactory(); + ~MyFactory(); + + // IUnknown + virtual + HRESULT __stdcall QueryInterface( + REFIID iid, + void ** ppv ); + virtual + ULONG __stdcall AddRef(); + virtual + ULONG __stdcall Release(); + + // IClassFactory + virtual + HRESULT __stdcall CreateInstance( + IUnknown * pUnkOuter, + REFIID riid, + void ** ppv ); + virtual + HRESULT __stdcall LockServer( + BOOL fLock ); +}; + +// +// FactoryLocal class. +// +class FactoryLocal : public MyFactory +{ +public: + FactoryLocal() {} + ~FactoryLocal() {} + + HRESULT __stdcall CreateInstance( + IUnknown * pUnkOuter, + REFIID riid, + void ** ppv ); +}; + +// +// FactoryRemote class. +// +class FactoryRemote : public MyFactory +{ +public: + FactoryRemote() {} + ~FactoryRemote() {} + + HRESULT __stdcall CreateInstance( + IUnknown * pUnkOuter, + REFIID riid, + void ** ppv ); +}; + +// +// FactoryAtStorage class. +// +class FactoryAtStorage : public MyFactory +{ +public: + FactoryAtStorage() {} + ~FactoryAtStorage() {} + + HRESULT __stdcall CreateInstance( + IUnknown * pUnkOuter, + REFIID riid, + void ** ppv ); +}; + +// +// FactoryInproc class. +// +class FactoryInproc : public MyFactory +{ +public: + FactoryInproc() {} + ~FactoryInproc() {} + + HRESULT __stdcall CreateInstance( + IUnknown * pUnkOuter, + REFIID riid, + void ** ppv ); +}; + +#endif |