_icompletedevents_cp.h
来自「C#高级编程第6版随书源代码 值得下载」· C头文件 代码 · 共 37 行
H
37 行
// Wizard-generated connection point proxy class
// WARNING: This file may be regenerated by the wizard
#pragma once
template<class T>
class CProxy_ICompletedEvents :
public IConnectionPointImpl<T, &__uuidof(_ICompletedEvents)>
{
public:
HRESULT Fire_Completed()
{
HRESULT hr = S_OK;
T * pThis = static_cast<T *>(this);
int cConnections = m_vec.GetSize();
for (int iConnection = 0; iConnection < cConnections; iConnection++)
{
pThis->Lock();
CComPtr<IUnknown> punkConnection = m_vec.GetAt(iConnection);
pThis->Unlock();
IDispatch * pConnection = static_cast<IDispatch *>(punkConnection.p);
if (pConnection)
{
DISPPARAMS params = { NULL, NULL, 0, 0 };
hr = pConnection->Invoke(1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, ¶ms, NULL, NULL, NULL);
}
}
return hr;
}
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?