Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29279 Discussions

Can a CVF dll read/write from text files?

bkaa
Beginner
455 Views
I want to make a Fortran dll and call it from Excel. The amount of input/output data to the dll is very large so I want the dllto read data and write resultstotext files.
When I compile the Fortran routine as an exe, this works fine. I have also made a small Fortran dll and calling it from Excle works fine.
However, as soon as I try to make the dll read/write from files I get the error message: Run-time error '53': File not found
I am not even able to define the filename...
Character FileName*25
FileName="C:TempInput.dat"
Are there any limitations for what a dll can do, or am I doing things completely wrong.
Any help is appreciated
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
455 Views
No, there's no such limitation at all -- file I/O works the very same way in dll as in .exe. Only, one has to pay special attentionto working directory, which can not be assumed to be the same as dll's directory, (but that's the same with .exe's as well) -- however, since you spell out the full path to the file, that should not be an issue for you. Thus, you're doing something else "completely wrong".
Jugoslav
0 Kudos
Reply