[python-win32] Missing methods from result of Dispatch or EnsureDispatch
Parand Tony Darugar
tdarugar at yahoo.com
Fri Feb 25 19:23:23 CET 2011
Hello,
I'm attempting to use COM to connect with Microsoft Dynamics GP via eConnect. I have a working VB program, and I also have a working IronPython program. However, I can't seem to get it to work with win32com.
The main assembly I'm trying to get at is Microsoft.Dynamics.GP.eConnect.eConnectMethods. In VB this looks like:
Dim eConCall As Microsoft.Dynamics.GP.eConnect.eConnectMethods
And in IronPython I'm able to:
clr.AddReference("Microsoft.Dynamics.GP.eConnect")
from Microsoft.Dynamics.GP.eConnect import eConnectMethods
connect = eConnectMethods()
connect.eConnect_EntryPoint(...)
In cPython 2.6 with win32com I'm able to do the Dispatch or EnsureDispatch, but the resulting handle has no usable methods:
>>> em = win32com.client.gencache.EnsureDispatch("Microsoft.Dynamics.GP.eConnect.eConnectMethods")
>>> dir(em) # only public methods are CLSID and coclass_clsid
>>> instance = em()
AttributeError: _eConnectMethods instance has no __call__ method
>> em.eConnect_EntryPoint(...)
AttributeError: '<win32com.gen_py.7120EE94-41A9-39FF-A2B4-C0F9D2B0897Dx0x10x0._e
ConnectMethods._eConnectMethods instance at 0x12286632>' object has no attribute 'eConnect_EntryPoint'
Any ideas? Words of wisdom would be most appreciated.
Thanks,
Parand
More information about the python-win32
mailing list