C
Chris Atwood
I'm new to win32ole in ruby and I've run in to a problem I don't know
how to solve.
The COM method I'm trying to call has the definition:
retval = ModelDoc2.SaveAs4 ( Name, Version, Options, &Errors,
&Warnings )
In the Ruby OLE browser this method is:
Class ModelDoc2
GUID : {27526253-6119-4B38-A1F9-2DC877E72334}
PROGID :
DESCRIPTION :
FUNC BOOL SaveAs4
Dispatch ID : 66296
DESCRIPTION : Saves the document under a different name
arg1 - BSTR Name [IN]
arg2 - I4 Version [IN]
arg3 - I4 Options [IN]
arg4 - I4 Errors [IN,OUT]
arg5 - I4 Warnings [IN,OUT]
I've tried 0, integer variable names, nil - the errors look like:
in `method_missing`: SaveAs4 (WIN32OLERuntimeError)
OLE error code 0: in <Unknown>
<No Description>
HRESULT error code: 0x80020005
Type mismatch.
It seems I need to pass in a reference to an integer so that the method
can output an errors through these arguments. I found a few posts
years ago about ByRef call in win32ole not being possible - is that
still the case? or this there a way around this?
Thanks,
Chris
how to solve.
The COM method I'm trying to call has the definition:
retval = ModelDoc2.SaveAs4 ( Name, Version, Options, &Errors,
&Warnings )
In the Ruby OLE browser this method is:
Class ModelDoc2
GUID : {27526253-6119-4B38-A1F9-2DC877E72334}
PROGID :
DESCRIPTION :
FUNC BOOL SaveAs4
Dispatch ID : 66296
DESCRIPTION : Saves the document under a different name
arg1 - BSTR Name [IN]
arg2 - I4 Version [IN]
arg3 - I4 Options [IN]
arg4 - I4 Errors [IN,OUT]
arg5 - I4 Warnings [IN,OUT]
I've tried 0, integer variable names, nil - the errors look like:
in `method_missing`: SaveAs4 (WIN32OLERuntimeError)
OLE error code 0: in <Unknown>
<No Description>
HRESULT error code: 0x80020005
Type mismatch.
It seems I need to pass in a reference to an integer so that the method
can output an errors through these arguments. I found a few posts
years ago about ByRef call in win32ole not being possible - is that
still the case? or this there a way around this?
Thanks,
Chris