Type Conversion to COM Variant
Mark Hammond
mhammond at skippinet.com.au
Wed Apr 17 08:14:07 EDT 2002
Haegi Kim wrote:
> Hi, experts,
>
> I have a COM client which gets a reference to a COM server.
> The COM client has a exec expression in order to execute a script in
> which the reference to the COM server is used.
> It works find with the COM server in InProcServer mode, but doesn't in
> LocalServer and raises the following error.
> -----------------------------------------------------------------------------
> exceptions.TypeError: Objects of type 'instance' can not be converted
> to a COM VARIANT"
> -----------------------------------------------------------------------------
> In what case the type conversion causes the error? And what should I
> do?
> Thanks in advance.
It looks like you are trying to pass a class instance as a param to a
COM call. Only COM objects can be passed in this way - arbitrary Python
objects can not. I can not give any more details without extra
information, such as the traceback.
Mark.
More information about the Python-list
mailing list