Unfortunately, _InvokeTypes_ is the main "entry point" for *all* COM calls with type information. As part of this call, Python packs all Python args into VARIANTs, then makes the actual call to the COM object.
Hmmm. I was afraid of that.
Thus, I see 2 possibilities: * pythoncom has a bug in InvokeTypes, probably in arg packing or unpacking.
Possible, but unlikely, since the args are ints with two pass by reference parameters (string and float). Nothing hairy there, I exepct that the argument unpacking and packing has proven itself over time.
* The COM object has a bug once control has been passed to that.
I wouldn't be surprised, but given that very similar code works in VB, I'm guessing the issue lies somewhere at the interface.
If pythoncom does have such a bug, it is subtle - all other COM objects generally work fine. Also, the symptoms don't really match what Python would do - the only thing I can see that would cause Python to "abort" like that is a call to Py_FatalError - that does indeed call the C 'abort' function, but will always cause some short error text to be printed before termination.
I agree.
I'm afraid that my guess is that it is the remote object. If it happens only after a CastTo, I suspect that something is going wrong there. Even though we "CastTo" an interface (IFMANWiffFile2 in this example), we are *still* using IDispatch on the object. If the remote object expected a "real" interface rather than an IDispatch based one, or the CastTo source object is incorrect, I could see how this could happen.
Given my inexperience with COM etc. I guess I don't really understand the difference between a "real" interface vs a IDispatch one. The VB code declared the variables:
Dim theFMANSpecData As New FMANSpecData Dim theWF As FMANWiffFile Dim theWF2 As IFMANWiffFile2
Here, theWF is declared as a FMANWiffFile (CoClass), while theWF2 is declared as IFMANWiffFile2 (Non-default Dispatch for FMANWiffFile). Using Dispatch(...), when I ask for an FMANWiffFile, I get a IFMANWiffFile (default Dispatch for FMANWiffFile). I can't do an explicit Dispatch('Analyst.IFMANWiffFile2') (not a valid class string).
Later, again in VB, we have
theWF = theFMANSpecData.GetWiffFileObject() theWF2 = theWF
Is the CastTo "equivalent" to this assignment?
Thanks,
nathan
-- Nathan Edwards, Ph.D. Center for Bioinformatics and Computational Biology 3119 Agriculture/Life Sciences Surge Building #296 University of Maryland, College Park, MD 20742-3360 Phone: +1 301-405-9901 Email: [EMAIL PROTECTED] WWWeb: http://www.umiacs.umd.edu/~nedwards _______________________________________________ Python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32
