1

I am trying to capture trading prices from a data feed provider called eSignal. Using their examples on their developer page (Link), I can easily replicate the functionality in C#. Unfortunately the provider does not support python developers and thus I am attempting to do this on my own, using the com object reference in their examples. However, I already fail at the very beginning, since I cannot dispatch the com object in question.

The com object is provided by eSignal (WinSig.exe contains the com object data) and I registered it using makepy (IESignal v.1.0.0):

C:\Python26\Lib\site-packages\win32com\client>python makepy.py
Generating to C:\Python26\lib\site-packages\win32com\gen_py\9C7CCB46-E9E8-4DDD-9784-4458877C2F10x0x1x0.py
Building definitions from type library...
Generating...
Importing module

So the module file is generated successfully. I then try to dispatch it from python:

from win32com.client import Dispatch
from win32com.client.gencache import EnsureDispatch

CLSID = '{9C7CCB46-E9E8-4DDD-9784-4458877C2F10}'
print Dispatch(CLSID)

However, this results in an error:

com_error: (-2147221164, 'Class not registered', None, None)

This happens for Dispatch, as well as EnsureDispatch. I also went through the module generated by makepy and tried to dispatch every single different CLSID provided in there - to no avail.

Anybody knows what the issue might be? Your help is much appreciated!

Thanks!

Muppet
  • 5,767
  • 6
  • 29
  • 39

1 Answers1

1

Are you sure that you instantiate class (but not Interface). Googling on uid {9C7CCB46-E9E8-4DDD-9784-4458877C2F10} I've gotten ServerEsignal - and it is look like interface (IESignal)

Dewfy
  • 23,277
  • 13
  • 73
  • 121
  • thanks for the reply. Yes, I tried all different CLSIDs that were used in the module and that didn't pan out unfortunately. I read somewhere that I might need IDispatch or something similar??? – Muppet Dec 05 '11 at 17:08
  • IDispatch is an interface, but you need a class. Some class instance can implement multiple interfaces. So you need a class instance, and starting from this you already can extract IDispatch reference. – Dewfy Dec 05 '11 at 19:13