I cannot solve the following problem:
I have a DLL dll_1 that opens a file for output, this DLL calls another DLL dll_2 (using Loadlibrary, GetProcAdress,...) and if I use use the same logical unit for output in dll_2, I get a file fort.x (x being the logical unit number). I don't want that dll_2 manage the open/close operations on this file. The other problem is that if I try to open the file fort.x after dll_2 call, I get a severe error that completely crashes my main application (the same thing happens the second time I call dll_2, because I guess that the file fort.x is then locked after the first call).
I use VisualFortran and I would like to find a solution for this problem.
Thanks.
I have a DLL dll_1 that opens a file for output, this DLL calls another DLL dll_2 (using Loadlibrary, GetProcAdress,...) and if I use use the same logical unit for output in dll_2, I get a file fort.x (x being the logical unit number). I don't want that dll_2 manage the open/close operations on this file. The other problem is that if I try to open the file fort.x after dll_2 call, I get a severe error that completely crashes my main application (the same thing happens the second time I call dll_2, because I guess that the file fort.x is then locked after the first call).
I use VisualFortran and I would like to find a solution for this problem.
Thanks.