|
|
@ -5,7 +5,7 @@ class CProxy_IpEpEngineEvents : |
|
|
|
public ATL::IConnectionPointImpl<T, &__uuidof(_IpEpEngineEvents)> |
|
|
|
{ |
|
|
|
public: |
|
|
|
HRESULT Fire_messageToSend(text_message * msg) |
|
|
|
HRESULT Fire_MessageToSend(text_message * msg) |
|
|
|
{ |
|
|
|
HRESULT hr = S_OK; |
|
|
|
T * pThis = static_cast<T *>(this); |
|
|
@ -17,16 +17,21 @@ public: |
|
|
|
CComPtr<IUnknown> punkConnection = m_vec.GetAt(iConnection); |
|
|
|
pThis->Unlock(); |
|
|
|
|
|
|
|
_IpEpEngineEvents * pConnection = static_cast<_IpEpEngineEvents *>(punkConnection.p); |
|
|
|
IDispatch * pConnection = static_cast<IDispatch *>(punkConnection.p); |
|
|
|
|
|
|
|
if (pConnection) |
|
|
|
{ |
|
|
|
hr = pConnection->messageToSend(msg); |
|
|
|
CComVariant avarParams[1]; |
|
|
|
avarParams[0] = msg; |
|
|
|
CComVariant varResult; |
|
|
|
|
|
|
|
DISPPARAMS params = { avarParams, NULL, 1, 0 }; |
|
|
|
hr = pConnection->Invoke(1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, ¶ms, &varResult, NULL, NULL); |
|
|
|
} |
|
|
|
} |
|
|
|
return hr; |
|
|
|
} |
|
|
|
HRESULT Fire_showHandshake(pEp_identity_s * self, pEp_identity_s * partner, sync_handshake_result * result) |
|
|
|
HRESULT Fire_ShowHandshake(pEp_identity_s * self, pEp_identity_s * partner, sync_handshake_result_s * result) |
|
|
|
{ |
|
|
|
HRESULT hr = S_OK; |
|
|
|
T * pThis = static_cast<T *>(this); |
|
|
@ -38,11 +43,18 @@ public: |
|
|
|
CComPtr<IUnknown> punkConnection = m_vec.GetAt(iConnection); |
|
|
|
pThis->Unlock(); |
|
|
|
|
|
|
|
_IpEpEngineEvents * pConnection = static_cast<_IpEpEngineEvents *>(punkConnection.p); |
|
|
|
IDispatch * pConnection = static_cast<IDispatch *>(punkConnection.p); |
|
|
|
|
|
|
|
if (pConnection) |
|
|
|
{ |
|
|
|
hr = pConnection->showHandshake(self, partner, result); |
|
|
|
CComVariant avarParams[3]; |
|
|
|
avarParams[2] = self; |
|
|
|
avarParams[1] = partner; |
|
|
|
avarParams[0] = result; |
|
|
|
CComVariant varResult; |
|
|
|
|
|
|
|
DISPPARAMS params = { avarParams, NULL, 3, 0 }; |
|
|
|
hr = pConnection->Invoke(2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, ¶ms, &varResult, NULL, NULL); |
|
|
|
} |
|
|
|
} |
|
|
|
return hr; |
|
|
|