out parameters in Python and COM

Henk Henk
Mon Oct 21 05:36:10 EDT 2002


Hi,

Code snippet at the end of the post.

I have an exe which exposes some functionality through an IDispatch
interface. The GetCodeTable-method has 4 parameters:
first 3 are [out] BSTR*
last one [out,retval] long *

When debugging my exe using Python I always get empty values for a,b
and c (see below) allthough they are filled in correctly inside the
exe (checked with a debugger).

Any idea what could be wrong?

Thanks,

Henk

import win32com.client

atm = win32com.client.Dispatch("ATM.Shell")
b4 = atm.LogOn("Administrator", "EHSW", "Python")


a=""
b=""
c=""
HEMgr = atm.ATMHeadEndManager
HEMgr.SetCodeTable("BS","ES","EE")
HEMgr.GetCodeTable(a,b,c)
print a
print b
print c



More information about the Python-list mailing list