Pythoncom early binding puzzle

P

Paul Keating

I want my Python COM object to do early binding. I have this working
for methods that return floats and dates and variants, but not for
methods that return COM objects. They are returning IDispatch objects
and not the specific COM objects that the client code is expecting.

I've got to the point that makepy reads my type library and generates
this class:

class IArena_MarketDataServer_CurrenciesData(DispatchBaseClass):
#This class is creatable by the name
'Arena_MarketDataServer_CurrenciesData.189'
CLSID = IID('{E15E5C42-1B3F-4815-B434-FA9BBAB5B62E}')
coclass_clsid = IID('{FD32DD22-3A89-430E-8FB9-EDC35852721A}')

... (method definition here) ...

_prop_map_get_ = {}
_prop_map_put_ = {}

But I still seem to get an IDispatch object, whether I do late
binding:
<COMObject Arena_MarketDataServer_CurrenciesData>

or try to force early binding:
1, 8)
<module 'win32com.gen_py.2A4EEEBF (etc)' from
'(path)\2A4EEEBF...x0x1x8.py'><COMObject Arena_MarketDataServer_CurrenciesData>

The second time, it should be something like
<win32com.gen_py.Arena_MarketDataServer 1.8(.9) Type
Library.Arena_MarketDataServer_CurrenciesData>

I've checked the GUIDs, they are ok. Any suggestions on what error
this symptom indicates?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top