Hi Carl,
I would be glad to help you with this question. I would recommend that you take take the following steps in order to use your C++ dll in CVI:
1) Make sure that you can call the dll you created from C++
2) Generate your C++ dll with the format __declspec(dllexport) int __stdcall myfunction(int a, int b)
3) After creating the .c file, .h file, and compiling your dll, copy the dll into the current CVI project directory or c:\windows\system32
4) In CVI, create a new project and include the .h file for your dll. When editing this .h file, click on Options >> Generate DLL Import Library in order to create a *.lib file for statically linking your dll into your CVI proect. Click on Edit >> Add Files to Project in order to add the created library file.
5) You should now be able to run the dll that you created without any errors
If you plan on dynamically linking your dll, you will not not have to use an import library. Dynamically linking is a bit more dificult, and requires you to use the LoadLibrary function. Please let me know if you have any additional questions and I would be glad to help you further. If your dll still does not appear to work after following the above steps, I would recommend that you attach the *.dll file to your next post so that I can try it out on my end and we can move forward from there.
Regards,
Casey Weltzin
Applications Engineer
National Instruments