04-28-2016 08:05 AM
Hello, hello,
I've just been given an ActiveX component (.ocx file) and some samples of Visual Basic to evaluate. Apparently VB is no longer available from MS (or where ?) and I was trying to use it in a new CVI project but what do I do with this ocx ? Adding it to the project doesn't do much. And what's the difference between Tools / Create ActiveX Controller and Server ? If I try the former, it's not in the list provided and selecting the ocx file with the [Browse] button gives me a "The type library is not intended for use on Win32". I'm on Win10 64, and I installed the component from a 64-bit msi...
Looking for the usually helpful CVI samples, I see plenty have the ActiveX keyword, but I don't see ocx files in their projects.
As you can tell I've never used ActiveX before and I'm lost.
Thanks.
04-29-2016 03:37 AM
Hello gdargaud,
First, you must register your ocx file by using "regsvr32 myFile.ocx" (replace myfile with the full pathname of your ocx) . Then, in the UI editor you could find your ActiveX in the control list. Add it to your UIR and generate the code. During this step, depending on your ActiveX, CVI will launch for you the good tool such as "Create ActiveX controler" or "Create activeX serveur". After that you should have a new "Instrument" added to your project.
Best regards.
04-29-2016 04:25 AM
Thanks for the answer. I would have thought that the installer has already done that, but I tried and I get: "The module TrioPC64.ocx was loaded but the call to DllRegisterServer failed with error code 0x80040200". There doesn't seem to be a DLL together with this file (but I don't know where Win10 hides things nowadays).
04-29-2016 06:12 AM
Hi gdargaud,
Did you try to run the command line with administrator rights ?
I don't have a Windows 10 to test but this works fine on Windows 7. Just be careful on Seven, sometimes you must launch "regsvr32" from Windows\SysWOW64 directory or from Windows\System32. Maybe that could be similar on Win 10.
04-29-2016 07:44 AM
OK, as admin it registered. But I still don't see it in the list of available activeX of the Tools/Create controller. OK, I give up for now and will try again in a while...