07-23-2014 01:36 PM
Hi, I created a DLL in c++ and fopen is returning NULL.
I have a funciton called int openfile(char *filename), which returns a 1 on success and 0 when fopen returns NULL. This function always returns a 0 when I run it in TestStand 4.2.1. I did development of the DLL in Visual Studio 2013.
When I run this DLL using TestStand 2013 it works, but for this situation, I need to have the dll work in testStand 4.2.1 as well
07-24-2014 06:39 PM
It would probably be useful to enable debugging in your DLL to see what is going on. Microsoft Developer Network (MSDN) has several pages about enabling debugging in a C++ DLL: MSDN: Debugging DLL Projects
In your DLL, does TestStand pass the filename parameter to the DLL? Are there in errors in TestStand or do you just see the incorrect value (0)?
07-25-2014 09:53 AM
TestStand passes the filename parameter to the DLL. I ended up fixing the problem by hard coding the filename into the function so everything is good now
05-12-2021 08:38 AM
Hi, I am having the same issue although I already hardcoded my .csv file name. I am passing a string also but it is not a filename. I always get File could not be opened (fopen returns NULL) error. Do you have any suggestions for me?
Regards.