win32com, handling byref
Mark Hammond
MarkH at ActiveState.com
Sun Mar 25 17:59:54 EST 2001
Clark C. Evans wrote:
> I am trying to call the following function from an ActiveX
> object. It has a return value, plus three output parameters.
> Unfortunately, the type library doesn't mark the last three
> as "out",
The type lib is clearly broken. I would expect this control would also have problem with COM marshalling.
The best solution is clearly to fix the type lib. This may not be possible tho :)
You are pretty much SOL with makepy as it stands - garbage in, garbage out :)
> Is this even remotely possible? If not, is there a description
> of the low-level hoops that I could possibly jump through?
You will have to pass custom type-tuples to InvokeTypes(). This may be as simple as changing the sample makepy generated code you pased, changing the second integer in the OUT param tuples from 1 to 2 (win32com.PARAMFLAG_FOUT)
Mark.
More information about the Python-list
mailing list