I am struggling with a problem related to passing a
VARIANT argument to a COM object.
I am getting this exception:
TypeError: The VARIANT type is unknown (001e)
Hmmm - I guess that is a bug in pywin32 - that variant type *is* valid in a
TYPEDESC, so pywin32 probably should convert that during the makepy process.
The makepy generated code-snippet is this:
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
def AddTest(self, lpProperty=defaultNamedNotOptArg,
vValue=defaultNamedNotOptArg):
method AddTest
return self._oleobj_.InvokeTypes(4, LCID, 1, (24,
0), ((30, 1), (12, 1)),lpProperty, vValue)
Can you please try changing the 30 there to 8 (ie, changing from VT_LPSTR to
VT_BSTR) and let me know if it works?
Actually, better yet - if it *does* work, please open a new pywin32 bug at
sourceforge. If it *doesn't* work it may point at an error in the COM
object.
What does the above exception really mean? Regardless
of what I pass as the second argument, I get the same
exception message.
It just complains about unknown type 001e, which
probably corresponds to VT_LPSTR. But, why is it
trying to convert True to a VT_LPSTR?!
It is the first string arg that is causing the problem.
Thanks,
Mark.
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32