--- In [email protected], "Sheri" <sheri...@...> wrote:

> Glad to hear that IErrorInfo might be useful. In case you missed this info 
> relevant to skipping parameters (ala your type t):
 
> A skipped optional parameter is a variant of type VT_ERROR with
> an .scode field value of DISP_E_PARAMNOTFOUND
> <http://support.microsoft.com/kb/238981>

Yeah, got that, ta.

Try comPlugin0.72_100111.zip in
http://tech.groups.yahoo.com/group/power-pro/files/0_TEMP_/AlansPluginProvisional/

My intention with set_arg_types was that "t" would mark an absent
parameter: so like this:

com.set_arg_types("s t t s ")
objApp.GetSaveAsFileName("TestVariants.xls", "Hello")

not this
objApp.GetSaveAsFileName("TestVariants.xls", "", "", "Hello")

But anyway doesn't work yet.  Among other things I should be picking up any 
default value available via FUNCDESC, or at least I think I should.

Does comPlugin0.72_100111.zip take care of problems with your Search 
method?

I'm getting oddest behaviour with stuff like

local objSheet = appRef.ActiveWorkbook.Worksheets(1)

before a new worksheet is added.

I'm getting IDispatch::Invoke calls that 

 -- return HRESULT 0 (not failure)

 -- for which QueryInterface(IID_ISupportErrorInfo, etc
    indicates support for ErrorInfo

 -- but then don't return a valid ErrorInfo* (not too surprising
    with HRESULT 0)

 -- but produce a result VARIANT with vt == VT_DISPATCH 
    but a NULL pdispval.  Very odd.

comPlugin0.72_100111.zip version dances around all that.

Getting better error messages...well, I've done the 
QueryInterface(IID_ISupportErrorInfo/ErrorInfo, but that only applies just 
after an Invoke has vbeen done on an IDispatch.  I can
add a lot more detailed reporting when doing all the parameter checking stuff, 
but that's a lot of work.  Not gonna do it for now.
The dll has grown like topsy since I started doing more rigourous param 
checking/conversion, and a lot of error-reporting code would inflate it 
further.  Maybe sometime later.




 




Reply via email to