Hi CVilla,
What you wanting to do is often called 'late binding' and Microsoft exposes finding available drivers and functions through LoadLibrary and GetProcAddress. There may be other ways to bind dll's to executables at run time, but certainly the hard way is the best practices way as recommended by Microsoft. Perhaps others here in the community can share what they've done in the past.
The basic algorithm you would need to follow is:
1) See if the driver is available (checking for nicaiu.dll will be sufficient)
2) Bind it
3) Make calls
4) Free it
In pseudo code:
if GetProcAddress(LoadLibrary("nicaiu.dll"), "DAQmxStartTask")
make_DAQmx_calls();
FreeLibrary("nicaiu.dll");
else
do_whatever();
Joe Friedchicken| NI Configuration Based Software |
|---|
Get with your fellow OS users [ Linux ] | Principal Software Engineer :: Configuration Based Software Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018) Software Engineer :: Measurements RLP Group (until Mar 2014) Applications Engineer :: High Speed Product Group (until Sep 2008) |