LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview as COM client to my COM server. Class not found?

Hello all,

I have created a COM server in python, a type library and associated it with my python com server. I am able to access the com server from excel, vbs, python, TCL, etc. But not labview. The IDispatch interface seems to be working to the extent I've tested it... for example, GetIDsOfNames works. I presume it is the IDispatch interface which labview uses to automate stuff.

According to labview the COM server cannot be found. I get the following error:
---

Error -2147221164 occurred at Automation Open

This error code is undefined. No one has provided a description for this code, or you might have wired a number that is not an error code to the error code input.

---

which is REGDB_E
_CLASSNOTREG = &H80040154

From the labview side of things, the only difference I can tell between my COM server which fails to work and a working COM server like excel is when picking a com server to use there is some additional information in parathesis after the object I can create, like so:

Type Library: Microsoft Excel 9.0 Object Library Version 1.3
Objects: Application (Excel.Application.9)

Here we have this extra info (Excel.Application.9), and I wonder if it is required for labview to find the com server. With my COM sever all I get is:

Type Library: TestComServer 1.0 Type Library Version 1.0
Objects: TestCom

So I wonder where the information in the parathesis comes from. Perhaps I have something incorrected in my .IDL file used to create the type library which should provide this information? The type library definitely seems to be registered as I see it from both labview and oleview.


To help me troubleshoot, can someone tell me the API calls the 'Autom
ation Open' block runs? Perhaps if I know the exact API call failing I can fix the problem if it is with my server or at least replicate it in a vbs script.

73,
Timothy
0 Kudos
Message 1 of 5
(3,148 Views)
Do you see your object when you drop Automation Open primitive,right click "Select ActiveX Class>>Browse"? I assume you do.
Did you also try browsing to your COM dll? I created COM server from VB and that works fine in LV.Don't know what would be different in python...

A Rafiq
0 Kudos
Message 2 of 5
(3,147 Views)
Yes I do see the object in the ActiveX Class -> Browse.. That's what I was referring to about the notation of the elements in the Select ActiveX and parenthetical information.

Do you know if there is a way to enable debugging information? From what I understand if win32traceutil is imported by a program (LabView?) and you have an output display tool, which I do - debugging information will be displayed, this could help me.

What tool do you use to browse your COM dll and what do you hope to see?

73,
Timothy
0 Kudos
Message 3 of 5
(3,147 Views)
Hello, please see the attached jpgs to show what I think is the problem with labview being unable to 'find' my com server. What causes the parenthetical information to be displayed?? Does labview get this data from the registery somewhere? This is the ProgID - but for some reason there seems to be an association not being made which would normally permit labview to find the com server, which instead returns a component not registered error.

I've been able to register my server in a debugging mode. From other applications I see it get loaded. With labview there is no connection made at all! Labview seems to fail to use the proper ProgID to instate the object. So where is it getting the ProgID from?

73,
Timothy
Download All
0 Kudos
Message 4 of 5
(3,147 Views)
I believe I have solved the problem. My lack of understanding of COM bit me here... It appears that when creating the GUIDs for the Type Library, Application Interface, CoClass, and COM Server... the CoClass and COM Server GUID must be the same.

Needless to say, mine were all different. Once fixed LabView was able to find the ProgID and open the COM server.

73,
Timothy
0 Kudos
Message 5 of 5
(3,147 Views)