I received ten replies to the post whose subject was "CINs vs. DLLs - your
comments". Only three of the replies were copied to info-LabVIEW, so I'll
try to summarize the responses. (Side note: one person thought my use of
"DLL" was too Microsoft-ish. Apologies; I think everyone knows what I mean,
and DLL is easier to write than "shared library". This conversation is
certainly relevant on all platforms.)
First, it appears that there are two distinct groups of people out there:
1. Those who know darn well what they are doing, understand the tradeoffs
between CINs and DLLs, and have good reasons for choosing one or the other.
2. Those who have some legacy code lying around, or know that they need to
write something in a text-based language, but aren't sure which option to
choose.
Group 1 brought up some good reasons why they sometimes prefer using CINs:
- They like using the manager functions because they're cross-platform, and
generally useful.
- They really do use the special CIN entry points (CINLoad, CINUnload,
etc.).
- They don't need to carry an extra file around.
They also mentioned some advantages to using DLLs:
- They can update the DLL without modifying the calling VIs.
- They can use the language and development environment of their choice (one
user named Fortran and Ada).
- They tend to be easier to build than CINs, if you are a novice.
Group 2 confirmed a fear that I've had for some time. If you are a user
faced with calling external code, and you don't have a basis for making a
choice between a CIN and a DLL, you'll probably pick the one for which
there's more documentation. Because CINs have so many intricacies, we had
to devote an entire manual to the subject. Unfortunately, in creating this
manual and making it CIN-specific we've unwittingly led many new users down
the CIN path when a DLL might have been a better choice. (The procedure for
calling DLLs is described in the G Programming Reference Manual, but it
could admittedly use more depth.) For this reason, we plan to revise the
documentation on CINs and DLLs that will release with the next major version
of LabVIEW to give a more balanced view of the two options.
Thanks again to all who gave their input.
Steven Harrison