Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with C++ App. using traditional NI-DAQ

Hi,

I have developed a Visual C++ app using Visual Studio .NET. The app is using nidaqex.h and nidaq.h. I have included this files in the project (including the path NI-DAQ\include in Visual C++ directories) and I have added the libraries (Nidaq32.lib and nidaqex32.lib) to the project.

The exe is builded without problem and I can run the app in my computer (where NI-DAQ 7.3, MAX and measurement Studio are installed).

But when I try to run the app in a computer where the NI-DAQ driver isn't installed I get an System.IO.FileNotFoundException that said to me that my dll (that is using NI-DAQ functions) or one his references can be founded.

Is this an error?

Thanks a lot,


Kiko Llaneras
0 Kudos
Message 1 of 3
(3,438 Views)
Hello

You need to have the Traditional DAQ driver installed on the system where your application will run. Otherwise it will not work. So that error is expected.

Are you using managed C++ with Traditional DAQ? System.IO.FileNotFound is a .NET exception. The newer DAQmx driver includes a native .NET API that could use with C# and VB.NET shipping examples. We also provide a ANSI API for NI-DAQmx.

Is there a reason why you need to use Traditional DAQ?

Thanks
Bilal Durrani
NI
0 Kudos
Message 2 of 3
(3,432 Views)
Hello,

Thanks a lot, I have been working on that problem all the day...

Yes, I am using managed C++ with Traditional DAQ. I have two reason for this:

1) I am trying to make a wrapper of a C++ class (this class use traditional DAQ). This class was develop in the past and I want to reuse it in my new C# app. is a simple class (it read and write on analog channels and set DAQ card's config) I think that rewrite it (in C#) seems to be easy but...

2) The DAQ card is being used by another aplication using Traditional DAQ (a matlab application). Right now the installed drivers are 6.9 version, and DAQmx isn't available. I have to be sure that installing NI-DAQ 7.3 this app will run properly.

I would like to reuse old C++ class, but I think that, in near future, rewrite the class in native C# using DAQmx will be a better solution.

what do you think about?

Again... thanks a lot for really useful help,

Kiko Llaneras.
0 Kudos
Message 3 of 3
(3,429 Views)