10-11-2016 12:40 PM
I have an application where I am building a dll and the functions in the dll need to be wrapped to be used in another software package. I am trying to create the text based wrapper file automatically. Ideally I ould like to only use the project file to do this but there is some information that I do not see in the file.
I do not see where the the function prototype. Because of this, I have tried to build it from the VIProtoInfo which I can get all the paramater names, if they are controlls or indicators and can determine is they are strings but I do not see the datatype of other types of controls. I aslo do not see a way to determine which source is for which vi. I know I could open the VIs' and match stuff up but I am hoping for a cleaner solution.
Is there any documentation available that would help me wit this information?
Solved! Go to Solution.
10-12-2016 10:40 AM
Hi terrill, check the next link, it is for creating wrappers automatically
Tutorial: Creating Wrapper VIs for C/C++ DLL functions using the Import Shared Library Wizard
https://decibel.ni.com/content/docs/DOC-9078
could you clarify the problem you have with the function prototype? the description is a bit confusing, maybe attach the vi or some screenshots of what you have until now
10-12-2016 01:16 PM
Hi niarena,
Thank you for your input. I am actually going in the other direction. I have a project that I have built into a dll. I am using the dll functions in c code. I am trying to automate the writing of the c code that is needed to use them. Sorry, I do not have any code except reading of the project file.
To simplify I just need to either read of create the function prototype for each function that is created. I have attacted a picture of the build specfication window that shows the function prototype. My guess is that I should be able to use the application builder code to do this but I have not found clear documentation of how to do this.
10-13-2016 04:28 AM
When you generate the DLL, it will also produce a .h header file that contains the function prototypes of the exposed functions in the DLL. Look in the 'build specification output' picture - you'll see the generated files: http://digital.ni.com/public.nsf/allkb/A3804F88FCDB1E6286257CE00043C1A7
10-14-2016 09:38 AM
Hey Sam_Sharp,
Thank you for your suggestion. I have no idea why I never thought to use the header file.
10-15-2016 03:27 AM
10-27-2016 09:52 AM
Sorry. Somehow I accepted my thank you to you as the solution.