09-23-2020 12:01 PM - edited 09-23-2020 12:04 PM
Hello,
I am generally wondering how I can call a function that I wrote in CVI using test stand. Test stand is my test executive and I am simply trying to do a function call. I have CVI 2017 and I created a project with one source file in it. It's call Main.c and it's attached. This contains just one function definition and implementation. It's a function that takes an int and converts it into a binary representation which is stored in an array. The function returns a pointer to that array. The function has three parameters and returns the pointer.
How do I build this into a DLL? When I attempt to I get the warning: "DLL has no exports. No Import Library created"
I read somewhere about creating a header file, so I created one and added it to the project and included the function prototype in it.
I want to ultimately use this DLL in test stand and simply be able to access that one function.
I have attached the .c source file.
Thank you
09-23-2020 12:36 PM
UPDATE: I tried to follow the advice of Jamie S. from this related post: https://forums.ni.com/t5/LabWindows-CVI/Writing-dll/m-p/1751708#M55129
Thought the 'target settings' menu has changed from how he described it, I set the header file under the export options and this successfully created a DLL. Though Test Stand doesn't seem to recognize the return type when I load the DLL and call the function (the function returns a pointer to char)
I might post this in TS forum.
09-25-2020 10:46 AM
What versions of TestStand and CVI are you using? We made a bunch of related improvements in the 2019 versions of both, with the caveat that you have to be using the 2019 versions of both
https://zone.ni.com/reference/en-XX/help/370052AA-01/tshelp/infotopics/2019whatsnew/#CVI
Hope this helps!
Trent
09-25-2020 10:51 AM