Win32Com Question???

Paul E. Bible pbible at home.com
Mon Feb 21 00:37:06 CET 2000


I've been reading Mark Hammond's 'Python Programming on Win32' and am trying
to get a COM component to work under Python.  I've been successful with
components using only VARIANTs, but have not been able to get other
automation types to work.  For example, the following function works just
fine:

FunctionA(VARIANT vParm1, VARIANT vParm2);

but, if the component requires other data types such as BSTRs (see below),
Python gives me attribute errors.

FunctionB(BSTR bstrParm1, BSTR bstrParm2)

I know that Python supports other automation types in Win32Com, but this
feature is not explained very well in Mark's book; or at least I didn't see
where it was explained.  Can someone please elaborate on how to use a COM
component that uses data types other than VARIANTS.

Thank you in advance,
Paul





More information about the Python-list mailing list