CompB.h
资源名称:COM 原理与应用.rar [点击查看]
上传用户:biuytresa
上传日期:2007-12-07
资源大小:721k
文件大小:1k
源码类别:
DNA
开发平台:
Visual C++
- #ifndef __CompB_H__
- #define __CompB_H__
- #ifndef __ISomeInterface_H__
- #include "SomeIFace.h"
- #endif
- #ifndef __IOtherInterface_H__
- #include "OtherIFace.h"
- #endif
- class CB : public IOtherInterface
- {
- protected:
- ULONG m_Ref;
- public:
- CB();
- ~CB();
- //IUnknown members
- HRESULT __stdcall QueryInterface(const IID& iid, void **ppv);
- ULONG __stdcall AddRef();
- ULONG __stdcall Release();
- //IOtherInterface members
- HRESULT __stdcall OtherFunction( ) ;
- HRESULT Init();
- private :
- IUnknown *m_pUnknownInner; // pointer to A's IUnknown
- ISomeInterface *m_pSomeInterface;
- };
- #endif // __CompB_H__