|
|
//////////////////////////////////////////////////////////////////////////////
// CProxy_RefDialEvents
template <class T> class CProxy_RefDialEvents : public IConnectionPointImpl<T, &DIID__RefDialEvents, CComDynamicUnkArray> { public: //methods:
//_RefDialEvents : IDispatch
public: void Fire_RasDialStatus(WORD wRasEvent) { T* pT = (T*)this; pT->Lock(); IUnknown** pp = m_vec.begin(); while (pp < m_vec.end()) { if (*pp != NULL) { VARIANTARG* pvars = new VARIANTARG[1]; VariantInit(&pvars[0]); pvars[0].vt = VT_I2; pvars[0].iVal= wRasEvent; DISPPARAMS disp = { pvars, NULL, 1, 0 }; IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp); pDispatch->Invoke(0x1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL); } pp++; } pT->Unlock(); } void Fire_DownloadProgress( long lProgress) { VARIANTARG* pvars = new VARIANTARG[1]; for (int i = 0; i < 1; i++) VariantInit(&pvars[i]); T* pT = (T*)this; pT->Lock(); IUnknown** pp = m_vec.begin(); while (pp < m_vec.end()) { if (*pp != NULL) { pvars[0].vt = VT_I4; pvars[0].lVal= lProgress; DISPPARAMS disp = { pvars, NULL, 1, 0 }; IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp); pDispatch->Invoke(0x2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL); } pp++; } pT->Unlock(); delete[] pvars; } void Fire_DownloadComplete( BSTR bstrURL, long lStatus) { VARIANTARG* pvars = new VARIANTARG[2]; for (int i = 0; i < 2; i++) VariantInit(&pvars[i]); T* pT = (T*)this; pT->Lock(); IUnknown** pp = m_vec.begin(); while (pp < m_vec.end()) { if (*pp != NULL) { pvars[1].vt = VT_BSTR; pvars[1].bstrVal= bstrURL; pvars[0].vt = VT_I4; pvars[0].lVal= lStatus; DISPPARAMS disp = { pvars, NULL, 2, 0 }; IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp); pDispatch->Invoke(0x3, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL); } pp++; } pT->Unlock(); delete[] pvars; } void Fire_RasConnectComplete( long bSuccess) { VARIANTARG* pvars = new VARIANTARG[1]; for (int i = 0; i < 1; i++) VariantInit(&pvars[i]); T* pT = (T*)this; pT->Lock(); IUnknown** pp = m_vec.begin(); while (pp < m_vec.end()) { if (*pp != NULL) { pvars[0].vt = VT_I4; pvars[0].lVal= bSuccess; DISPPARAMS disp = { pvars, NULL, 1, 0 }; IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp); pDispatch->Invoke(0x4, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL); } pp++; } pT->Unlock(); delete[] pvars; }
};
//////////////////////////////////////////////////////////////////////////////
// CProxy_WebGateEvents
template <class T> class CProxy_WebGateEvents : public IConnectionPointImpl<T, &DIID__WebGateEvents, CComDynamicUnkArray> { public: //methods:
//_WebGateEvents : IDispatch
public: void Fire_WebGateDownloadComplete( long lProgress) { VARIANTARG* pvars = new VARIANTARG[1]; for (int i = 0; i < 1; i++) VariantInit(&pvars[i]); T* pT = (T*)this; pT->Lock(); IUnknown** pp = m_vec.begin(); while (pp < m_vec.end()) { if (*pp != NULL) { pvars[0].vt = VT_I4; pvars[0].lVal= lProgress; DISPPARAMS disp = { pvars, NULL, 1, 0 }; IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp); pDispatch->Invoke(0x1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL); } pp++; } pT->Unlock(); delete[] pvars; }
void Fire_WebGateDownloadProgress( long lProgress) { VARIANTARG* pvars = new VARIANTARG[1]; for (int i = 0; i < 1; i++) VariantInit(&pvars[i]); T* pT = (T*)this; pT->Lock(); IUnknown** pp = m_vec.begin(); while (pp < m_vec.end()) { if (*pp != NULL) { pvars[0].vt = VT_I4; pvars[0].lVal= lProgress; DISPPARAMS disp = { pvars, NULL, 1, 0 }; IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp); pDispatch->Invoke(0x2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL); } pp++; } pT->Unlock(); delete[] pvars; }
};
//////////////////////////////////////////////////////////////////////////////
// CProxy_INSHandlerEvents
template <class T> class CProxy_INSHandlerEvents : public IConnectionPointImpl<T, &DIID__INSHandlerEvents, CComDynamicUnkArray> { public: //methods:
//_INSHandlerEvents : IDispatch
public: void Fire_RunningCustomExecutable() { T* pT = (T*)this; pT->Lock(); IUnknown** pp = m_vec.begin(); while (pp < m_vec.end()) { if (*pp != NULL) { DISPPARAMS disp = { NULL, NULL, 0, 0 }; IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp); pDispatch->Invoke(0x1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL); } pp++; } pT->Unlock(); } void Fire_KillConnection() { T* pT = (T*)this; pT->Lock(); IUnknown** pp = m_vec.begin(); while (pp < m_vec.end()) { if (*pp != NULL) { DISPPARAMS disp = { NULL, NULL, 0, 0 }; IDispatch* pDispatch = reinterpret_cast<IDispatch*>(*pp); pDispatch->Invoke(0x2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL); } pp++; } pT->Unlock(); }
};
|