From: Masaki Suketa Date: 2002-08-07T21:18:55+09:00 Subject: Re: win32ole and excel In message "Re: win32ole and excel" on 02/08/07, "MikkelFJ" writes: > I think they generate wrapper code from the typelib. So the wrapper uses > invoke but the user doesn't. FYI, sample/olegen.rb creates wrapper code from the typelib. olegen.rb 'Microsoft Excel 9.0 Object Library' > COM objects implement the IDispatch interface as they choose. > It could be that the Excel implementation is more tolerant towards different > types than the MDM object. Could you try the following patch for 0.4.8.1? (I have not tested because I have no mdm object.) --- win32ole.c.org Sun Aug 4 00:00:00 2002 +++ win32ole.c Wed Aug 7 21:29:44 2002 @@ -1762,11 +1762,8 @@ VariantInit(&realargs[n]); VariantInit(&op.dp.rgvarg[n]); param = rb_ary_entry(paramS, i-cNamedArgs); - ole_val2variant(param, &realargs[n]); - V_VT(&op.dp.rgvarg[n]) = VT_VARIANT | VT_BYREF; - V_VARIANTREF(&op.dp.rgvarg[n]) = &realargs[n]; - + ole_val2variant(param, &op.dp.rgvarg[n]); } } /* apparent you need to call propput, you need this */ Regards, Masaki Suketa