compa.h
来自「中间件技术中间件技术中间件技术中间件技术中间件技术」· C头文件 代码 · 共 42 行
H
42 行
#ifndef __CompA_H__
#define __CompA_H__
#ifndef __ISomeInterface_H__
#include "SomeIFace.h"
#endif
class INondelegatingUnknown
{
public:
virtual HRESULT __stdcall NondelegationQueryInterface(const IID& iid, void **ppv) = 0 ;
virtual ULONG __stdcall NondelegatingAddRef() = 0;
virtual ULONG __stdcall NondelegationRelease() = 0;
};
class CA : public ISomeInterface, public INondelegatingUnknown
{
protected:
ULONG m_Ref;
public:
CA(IUnknown *pUnknownOuter);
~CA();
public :
// Delegating IUnknown
virtual HRESULT __stdcall QueryInterface(const IID& iid, void **ppv) ;
virtual ULONG __stdcall AddRef() ;
virtual ULONG __stdcall Release() ;
// Nondelegating IUnknown
virtual HRESULT __stdcall NondelegationQueryInterface(const IID& iid, void **ppv);
virtual ULONG __stdcall NondelegatingAddRef();
virtual ULONG __stdcall NondelegationRelease();
virtual HRESULT __stdcall SomeFunction( ) ;
private :
IUnknown *m_pUnknownOuter; // pointer to outer IUnknown
};
#endif __CompA_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?