Factory.h
资源名称:COM 原理与应用.rar [点击查看]
上传用户:biuytresa
上传日期:2007-12-07
资源大小:721k
文件大小:1k
源码类别:
DNA
开发平台:
Visual C++
- #ifndef __CompB_FACTORY__
- #define __CompB_FACTORY__
- #include "Unknwn.h"
- class CBFactory : public IClassFactory
- {
- protected:
- ULONG m_Ref;
- public:
- CBFactory ();
- ~CBFactory ();
- //IUnknown members
- HRESULT __stdcall QueryInterface(const IID& iid, void **ppv);
- ULONG __stdcall AddRef();
- ULONG __stdcall Release();
- //IClassFactory members
- HRESULT __stdcall CreateInstance(IUnknown *, const IID& iid, void **ppv);
- HRESULT __stdcall LockServer(BOOL);
- };
- #endif // __CompB_FACTORY__