I have an application for which GUI is written in C# and the logic is written in C++ DLL. The DLL should open a file to read data from it. I have the data.txt file in the same folder as the DLL. When I call
fopen("data.txt","r")
the value returned is NULL. What could be the problem? Please help me in this regard.
Thanks, Rakesh.
The location of the dll file is not relevant. The path of your open must contain the complete path or the file will be opened to your applications current working directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With