07-25-2011 11:03 AM
I had a need to build a LabVIEW exe and enable the ActiveX server capability. I built a simple project (just a single VI that adds two numbers) and tried to expose the ActiveX interface. When I built this project on my Windows 64 bit OS using LabVIEW2010 SP1 32 bit, I cannot get the type library to register. If I follow the simple path, I build the ActiveX server(exe), run it once (no error returned), build a new LabVIEW VI that has an ActiveX constant connected to the ActiveX Open function, browse to the tlb, show the creatable objects, pick the _Application, and try to open it. I get the "Error -2147221164 occurred at Class not registered in ActiveX Client.vi". OK this already isn't correct - I should be able to load the ActiveX type library.
So next, I try to manually register the tlb - I use the regtlib.exe and it reports success - but I still can't open a ref to the ActiveX object - same error.
So to further explore the problem, I try the same project in LV 8.6 32 bit and get the same result on my 64 bit machine. So both these versions fail the same way. The next thing I try is to build the project on LV2010 SP1 on a Windows XP 32 bit machine (I don't have a Windows 7 32 bit install to try). This time, everything works exactly as advertised. I build the project, run the exe, browse to the tlb and choose the _Application object and I can open a ref and see properties and methods.
So, is this a known issue building ActiveX servers on x64 machines with 32 bit LabVIEW? Would this work if I used 64 bit LabVIEW on a x64 machine (I don't have 64 bit LabVIEW loaded so I haven't tried this)?
Thanks,
Mark
11-05-2011 04:34 PM
I got the answer some time back from NI support - On Windows 7 machines, you must run the exe as admin for the type library to register correctly. I thought I would update this post in case anybody else could use this info.