--- In [email protected], "Sheri" <sheri...@...> wrote:
> 
> > 
> > But what about
> > 
> > local appRef = com.create_object("Excel.Application")
> > local hCell = appRef.ActiveWorkbook.Worksheets(1).Cells(1, 1).value
 
> If those arguments are all in the typelib as "VARIANT" then I'm sure it would 
> also work if you were sending them all as integers, for noguess.

The point is: the hypothetical but possible case where they are
all VT_VARIANT, and one at least of the parameters is poorly handled and must 
be something besides a VT_I8 or VT_I4.  

In that case, multiple type_specs are required; a single type_spec
without persistence will die after being used for worksheets(1), and
if persistent will be appropriate for worksheets(1) but not for Cells(1, 1).

Another situation where multiple type_specs would be handy:

;assume all parameters to com services are declared VT_VARIANT

com.set_arg_types("i s ", "s i ", 1)

for (;;)
 aServer.methodB(1, 2) ;; only works if supplied with VT_I4, VT_BSTR
 aServer.methodA(1, 2) ;; only works if supplied with VT_BSTR, VT_I4
; etc
endfor

com.set_arg_types() ;; turn off persistent type_specs

Try it now.  

Try COMplugin0.72_100208.zip

This one guesses all VT_VARIANT parameter types first (usual caveats, accept 
unicode, com, real handles as what they are, no guessig if type_spec in force)

If invoke fails with guessed params, and reason is a parameter type error, and 
parameter type in question was guessed, retries with the offending parameter a 
string.  Continues until all guessed parameters converted back to strings

set_arg_types("guess"/"noguess") no longer there; instead
set_arg_types("retry"/"noretry") no longer there; retry is default, trun off 
above described 

So if you don't want all the retrying to happen, you can turn it off.  

Can turn off from config ini file as well, see docs (rtf only).

I can't find a case in any of my servers where a number doesn;t work, but 
guessing provides one.  Could you try your Search(333,...) method again please? 
 And it you can find a similar service that I can run so I can step the retry 
code, would be helpful.  

objApp.GetSaveAsFileName(3333) works (i.e. plugin guesses a VT_I4, Excel 
accepts it), so that's no good.





Reply via email to