"SRS_CONLib.Point2D" is not the "ProgID" of the object - it is the name of the typelib and interface in that typelib.
If your object can be used with Dispatch, it should be possible to create the object in VB using "CreateObject" - CreateObject wants the ProgID too - ie, it will fail with "SRS_CONLib.Point2D". Whatever you can pass to CreateObject can be passed to Python's dispatch. Ask the developer what the "ProgID" of the object is. Cheers, Mark -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Tuesday, 10 May 2005 2:55 AM To: python-win32 Mailinglist Subject: [python-win32] (no subject) Hello again, all- I am still trying to understand Windows COM from Python. This time, I am trying to access a custom COM object an in-house developer has developed in C++. The class is stored in a dll registered with my system, and can be called from VB as follows: >From a working VB project: ' set up the input Dim pConv As New SRS_CONLib.Point2D However, when I try to call the clas via win32com, I get error messages. In Python: srs = win32com.client.Dispatch(r'SRS_CONLib.Point2D') The error: Traceback (most recent call last): File "<pyshell#13>", line 1, in -toplevel- srs = win32com.client.Dispatch(r'SRS_CONLib.Point2D') File "C:\PYTHON23\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx) File "C:\PYTHON23\lib\site-packages\win32com\client\dynamic.py", line 84, in _GetGoodDispatchAndUserName return (_GetGoodDispatch(IDispatch, clsctx), userName) File "C:\PYTHON23\lib\site-packages\win32com\client\dynamic.py", line 72, in _GetGoodDispatch IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) com_error: (-2147221005, 'Invalid class string', None, None) The developer tells me the IDispatch interface is enabled, and the SRSCON_Lib.Point2D should be in the registry. Thanks in advance for any assistance.... Eric Eric B. Powell E&GIS BSRI (803)952-7783 When a true genius appears in this world you may know him by this sign, that the dunces are all in confederacy against him. (Swift) _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32