1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/win32ole.c(ole_invoke): retrieve the result value when

retrying the IDispatch::invoke.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
suke 2004-10-19 11:40:33 +00:00
parent 1057902ac7
commit 05a43e2367
2 changed files with 13 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Tue Oct 19 20:32:50 2004 Masaki Suketa <masaki.suketa@nifty.ne.jp>
* ext/win32ole.c(ole_invoke): retrieve the result value when
retrying the IDispatch::invoke.
Tue Oct 19 17:24:11 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* io.c (read_all): block string buffer modification during

View file

@ -78,7 +78,7 @@
#define WC2VSTR(x) ole_wc2vstr((x), TRUE)
#define WIN32OLE_VERSION "0.5.8"
#define WIN32OLE_VERSION "0.5.9"
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
@ -1994,9 +1994,10 @@ ole_invoke(argc, argv, self, wFlags)
ole_val2variant(param, &op.dp.rgvarg[n]);
}
memset(&excepinfo, 0, sizeof(EXCEPINFO));
VariantInit(&result);
hr = pole->pDispatch->lpVtbl->Invoke(pole->pDispatch, DispID,
&IID_NULL, lcid, wFlags,
&op.dp, NULL,
&op.dp, &result,
&excepinfo, &argErr);
for(i = cNamedArgs; i < op.dp.cArgs; i++) {
n = op.dp.cArgs - i + cNamedArgs - 1;
@ -2008,10 +2009,11 @@ ole_invoke(argc, argv, self, wFlags)
* hResult == DISP_E_EXCEPTION. this only happens on
* functions whose DISPID > 0x8000 */
if (hr == DISP_E_EXCEPTION && DispID > 0x8000) {
VariantInit(&result);
memset(&excepinfo, 0, sizeof(EXCEPINFO));
hr = pole->pDispatch->lpVtbl->Invoke(pole->pDispatch, DispID,
&IID_NULL, lcid, wFlags,
&op.dp, NULL,
&op.dp, &result,
&excepinfo, &argErr);
}
@ -2758,7 +2760,7 @@ static VALUE
fole_get_methods( self )
VALUE self;
{
return ole_methods(self, INVOKE_PROPERTYGET);
return ole_methods( self, INVOKE_PROPERTYGET);
}
/*
@ -2770,7 +2772,7 @@ static VALUE
fole_put_methods( self )
VALUE self;
{
return ole_methods(self, INVOKE_PROPERTYPUT);
return ole_methods( self, INVOKE_PROPERTYPUT);
}
/*
@ -2782,7 +2784,7 @@ static VALUE
fole_func_methods( self )
VALUE self;
{
return ole_methods(self, INVOKE_FUNC);
return ole_methods( self, INVOKE_FUNC);
}
/*