10-25-2011 08:54 AM
Hi,
A basic understanding I do not have so this is the reason for this series of question for where I might get help and direction from yourselves.
I managed to generate an executable in LabWindows/CVI 2010 containing a UIR with a table, which is filled from an ini file. I can select any entry in the resulting table and return it contents (thanks to Roberto Bozzolo).
Now I need to incorporate it in TestStand 2010 SP1 but as a dll.
I have tried to tackle the example cvidll but still the questions are there.
The reason this is been done is that we must rewriting LabView 7.1 and VisualC++ 6.00 code, all dll’s, and moving to LabWindows/CVI 2010.
As always thanks
Simon
10-26-2011 06:03 AM
Hi Simon,
With regards to building a DLL from scratch in LabWindows/CVI the process is:
1. Start a new project
2. Select Build>Target Type>Dynamic Link Library
3. Create a new C source file (the DLL Source Code)
4. Save the source file and add it to the project (File>Add yourfilename.c to Project)
5. Create a new header file that contains the necessary calls to the functions you want to export with the DLL
6. Ensure you save the project
7. Select Build>Target Settings to bring up the "Target Settings" dialog
8. Click "Import Library Settings" and select Generate import libraries for both complilers followed by OK
9. Click "Change"in the Exports section and select the header file you created earlier
10. Select Build>Configuration>Release
11. Select Build>Create Dynamic Linked Library to complete the process and create a dll with the name of your header file (as default)
In addition to a DLL, the import libraries get generated.
Regarding conversion of a exe to a dll I would suggest to start a new DLL-Project in LabWindows/CVI (using process above) and then copying all the functions from your exe-project to the DLL project and declare them to be exported.
Hope this helps getting you started in developing a DLL in LabWindows/CVI.
Thanks