connectioncomcp.h
来自「EVC com试用于EVC4.0模拟 具体见原代码 包括com的服务器、客户」· C头文件 代码 · 共 28 行
H
28 行
#ifndef _CONNECTIONCOMCP_H_
#define _CONNECTIONCOMCP_H_
template <class T>
class CProxy_IAddEvents : public IConnectionPointImpl<T, &IID__IAddEvents, CComDynamicUnkArray>
{
//Warning this class may be recreated by the wizard.
public:
HRESULT Fire_ExecutionOver(INT Result)
{
HRESULT ret;
T* pT = static_cast<T*>(this);
int nConnectionIndex;
int nConnections = m_vec.GetSize();
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
{
pT->Lock();
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
pT->Unlock();
_IAddEvents* p_IAddEvents = reinterpret_cast<_IAddEvents*>(sp.p);
if (p_IAddEvents != NULL)
ret = p_IAddEvents->ExecutionOver(Result);
} return ret;
}
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?