From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

optional nidaq.dll load?

I have a MS C++ application that may (or may not) need access to
the NIDAQ.DLL.  That is, this application will sometimes be installed
on a PC which has NIDAQ and a board in it, but at other times the
application will be installed on a laptop which (ideally) would not need
to have the NIDAQ.DLL installed on it.

When I link NIDAQ32.LIB into my C++ project, it requires that
the NIDAQ32.DLL be present on my system.

I recall that under CVI, it appeared I was able to write applications
that could run whether or not NIDAQ was installed, even if such
CVI applications had references to NIDAQ function calls in them.

Is there a way to pull off this same behavior using MS C++?

It seems that if the attempt to load the NIDAQ32.DLL fails, then
there ought to be a way to gracefully sense this fact and then
have my application refrain from making any further calls to
the NIDAQ library.

Any help on this would be appreciated.  Thanks.

(I am using traditional NIDAQ 6.9.1 or 7.4.1 because I am supporting some
rather old NI boards.)


0 Kudos
Message 1 of 2
(2,535 Views)
Michael Faraday schrieb:
> I recall that under CVI, it appeared I was able to write applications
> that could run whether or not NIDAQ was installed, even if such
> CVI applications had references to NIDAQ function calls in them.
>
> Is there a way to pull off this same behavior using MS C++?
>
Look for "LoadLibrary", "GetProcAddress" and "FreeLibrary" in the MSDN.

Babak
0 Kudos
Message 2 of 2
(2,525 Views)