LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

simple workable example of incorporating cvi dll in Visual c

I tried incorporating cvi into visual c++ without success. Basically, I was able to compile and link ok;however, I got a run error when I excute the code (failed to initialized application). Ideally, I would prefer an example that does not use MFC

Thanks
0 Kudos
Message 1 of 2
(2,818 Views)
Hi,
hopefully this walkthrough will give you enough information to get going.

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/c6e2279078deabdc86256896005d8f02?OpenDocument

You didn't say that you was trying to use callbacks or anything, so the application note might be a little over the top.
Essentially, you need your dllmain as per the Insert Construct -> dllmain one
and make sure you export the appropriate functions (I normally use the include header file method. THen when you make the .dll, you have the .h you can use in c++ and the .lib file (make sure it's made the Microsoft C++ compatible one).
That should be all you really need.

Thanks

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 2
(2,818 Views)