LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Distributing labview code. Should I use Activex or DLLs?

I need to allow VB access to my functions. Is Activex really slow? Can I have operator dialogs embedded in dlls? Has anybody ever distributed serious labview code using either?
0 Kudos
Message 1 of 3
(2,364 Views)
Performance-wise I'm not avare of major differences one way or another. The main thing I would consider is the conceptual differences between the two approaches:

** With ActiveX you have a seperate program running that you are controlling remotely.

** With DLLs you have discrete bits of code that you are linking to from your program.

Given what you and your users are going to want to do, which model fits the application better? Also, how much work do you want the external code to do?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 3
(2,364 Views)
I'm a bit old school, so I prefer using dlls because I understand them better. With ActiveX you have to deal with major / minor revision numbers and GUIDs. I think with LabVIEW, every time you build a new ActiveX server in LabVIEW, it will change the GUIDs (even if it is binary compatible), which may cause some issues with certain development environments. ActiveX is usually slower unless you have SMP and a well designed application. Also, if you create a dll it will be easy to port your application to another OS like Linux or Mac.

Since you are using VB, ActiveX might be the easiest.

I think everyone will have different opinions depending on the experience and application goals.

My best advice is to create the same project, one as a dll and another
as ActiveX and try using them both. Make a small change, recompile the two and try to use the updated dll / ActiveX server again. It will probably take no more than an hour or so, and you'll be able to tell which you prefer or works better for your application and you'll save a lot of time and second guessing in the long run.
0 Kudos
Message 3 of 3
(2,364 Views)