--- In [email protected], "Sheri" <sheri...@...> wrote: > > --- In [email protected], "entropyreduction" > <alancampbelllists+yahoo@> wrote:
> Invoke with all strings applies only to guessed parameters, and guessed > parameters are only those that are VARIANTs in the typelib, Right?? Yes, no guessing if VT_VARIANT in typelib: or if you supply a typespec code for param. > > > Strings might be tricky <http://www.devguy.com/fp/Tips/COM/#BSTR> > > > > I use I use ::SysAllocString(L""): CComBStr(L"foo") would destroy > > itself too soon. > > Maybe that is because you had failed to copy it into a VARIANT using > CComBStr.CopyTo ! In which case might as well just use SysAllocString. > Then when the BStr goes out of scope it will destroy itself, but the cargo > for the VT_BSTR will survive. COMplugin0.72_100121.zip: not much tested, but you can play. added com.set_arg_types("guess") com.set_arg_types("noguess") config ini key guessArgTypes=1 (default 1) If guessing on, on failure does the one-param-at-a-time thing if Invoke fails with DISP_E_PARAMNOTFOUND or DISP_E_TYPEMISMATCH, guesses at all that need it if its DISP_E_EXCEPTION.
