• R/O
  • SSH
  • HTTPS

vssjscript: Commit


Commit MetaInfo

Revision5 (tree)
Zeit2011-12-29 05:07:45
Autortejima

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- trunk/EventsImpl.h (revision 4)
+++ trunk/EventsImpl.h (revision 5)
@@ -92,13 +92,18 @@
9292 return E_UNEXPECTED;
9393 }
9494
95- HRESULT __stdcall Invoke(DISPID dispIdMember, REFIID /* riid */, LCID /* lcid */, WORD wFlags, DISPPARAMS *pDispParams, VARIANT * /* pVarResult */, EXCEPINFO * /* pExcepInfo */, UINT * /* puArgErr */) throw () try {
96- if ((dispIdMember == dispidSETTIMEOUT) && (wFlags == DISPATCH_METHOD)) {
95+ HRESULT __stdcall Invoke(DISPID dispIdMember, REFIID /* riid */, LCID /* lcid */, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO * /* pExcepInfo */, UINT * /* puArgErr */) throw () try {
96+ if ((dispIdMember == dispidSETTIMEOUT) && ((wFlags | DISPATCH_METHOD) != 0)) {
9797 if (pDispParams->cArgs != 2) throw _com_error(E_INVALIDARG);
9898 _variant_t m, e;
9999 _com_check(::VariantChangeType(m.GetAddress(), &(pDispParams->rgvarg[0]), 0, VT_I4));
100100 _com_check(::VariantChangeType(e.GetAddress(), &(pDispParams->rgvarg[1]), 0, VT_BSTR));
101- that->SetTimeout(e.bstrVal, m.intVal);
101+ int r = that->SetTimeout(e.bstrVal, m.intVal);
102+ if (pVarResult) {
103+ _com_check(::VariantClear(pVarResult));
104+ pVarResult->vt = VT_I4;
105+ pVarResult->intVal = r;
106+ }
102107 return S_OK;
103108 } else if ((dispIdMember == dispidCLEARTIMEOUT) && (wFlags == DISPATCH_METHOD)) {
104109 if (pDispParams->cArgs != 1) throw _com_error(E_INVALIDARG);
Show on old repository browser