LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create a simple ActiveX client-server

I have a strange problem. I'm trying to make a VI ActiveX server that exposes some variables for another VI (a client) that will simply retrieve and display that.
I am attaching all the files I made, project and so on.
Using XP pro SP2 updated, LV 8.2.1
 
I made the following steps:
1) create the server VI file source (see attachment) inside the project
2) create the building specification for the executable server VI, enabling "ActiveX server", giving a name to it.
3) create the client VI source file (see attachment)
At this point my system had the need to link to ActiveX class, so I need to build up the server, in order to let him create the TLB (type library file) and the Executable Server.
BUT as soos they are builded, they aren't registered in the system (I think), and you cannot create an ActiveX reference in the client VI
If you browse your system activeX class, you see all the type libraries registered in the system.
 
QUESTION : Will the executable server run for the first time register the server and the type library in the OS (operative system)?
 
4) I used the utility provided in the link:
http://digital.ni.com/public.nsf/websearch/4F811A9B23F1D46E862566F700615B7A?OpenDocument
to register the TLB file, restart Labview, and it's ok, I have the activeX refnum and the type library in the list.
The utility cannot register ActiveX server EXE file, only .dll files.
5) Now if I start the server (running) and run (by executable or inside the LV developing enviroinment), when I try to open the refnum I get the error 3005 "Automation Open: Object specified is not creatable in Client_reader.vi"

QUESTION: Are you able to run this example??
 
Any hint to understand better the situation?
Thanks
Message 1 of 5
(4,287 Views)

LabVIEW 8.2.1 Application Builder does not create Application ActiveX Type Library Correctly. It is a known issue that has been fixed in the recent LV8.5 version.

When creating an executable with the ActiveX server enabled under "Advanced" in LV 8.2.1, the Type Library (.tlb) that is created cannot be successfully used (generates undefined error 3005).

When attempting the exact same task in LV 8.0 and 8.5, it works fine and you can obtain a reference to the executable and VIs inside of the executable.

 

In order to registry the ActiveX Server you can simply run your EXE as reported in the LV Help file:

" The name of the application that you enter in the ActiveX server name text box uniquely identifies the application in the system registry. After you build the application, run it at least once to enable registry with the system."

 

Good Work!

0 Kudos
Message 2 of 5
(4,235 Views)
I'm stioll having issues with getting this to work even after I have seen this thread.  I have even tried updating my project to 8.5 and still get the error 3005.

I have attached an example project I am trying to get working.  In the project, you will find VTest1.vi and the build for VTest.exe which is supposed to have the ActiveX Server AAAAVTest.  VTest 2.vi (not in project) tries to open the EXE's ActiveX reference and I get an error 3005.  I have run the executable before trying to use VTest2 and I still get the error in 8.2.1 and 8.5.

I would appreciate any help in what I have done wrong.  I need to get this working in 8.2.1, as that is my customer spec.  I have it working in the original 7.1 code, but need to update so it works in 8.2.1.

Thanks.
0 Kudos
Message 3 of 5
(4,185 Views)
I can say this:
 
1) I fixed my problem, and there is NO WAY to make it work on LV8.2.1, forget your customer specifications, update the runtime engine to 8.5, update your LV to 8.5 version, and you are done
 
2) do a BRAND NEW project from scratch in LV8.5, DON'T open a LV8.2.1 project within LV8.5, it doens't work. It seems that the bug infected in some way the project file.
Message 4 of 5
(4,156 Views)
Thank you for this insight.  I took my example and rebuilt the project in 8.5, and as you stated it would, it worked.  I was able to fix the imported 8.2.1 project by turning off the ActiveX server, saving the project, then turning it back on and rebuilding the EXE.

So, in conclusion, what NI states is a workaround does not work, and it appears that ActiveX servers do not work in 8.2.1 at all.  In fact, an imported 8.2.1 project will continue to build bad EXEs in 8.5 unless you recreate the project from scratch, or turn off the Activex server option in the build, save the project, then turn it back on.
0 Kudos
Message 5 of 5
(4,146 Views)