Have a quite large program in Fortran that I've converted to a DLL. It takes a bit of time to run (~ 20 secs) and need to be run via a web page.
OK, I have written a Delphi ISAPI DLL that calls this CVF DLL passing it a few startup parameters.
The Delphi DLL can be called by multiple users via the webserver (IIS 5.0).
Now, I assumed that the ISAPI DLL runs each time in its own thread on IIS. I kind of assumed that the called CVF DLL would also have an area to itself.
However, if you call the application twice at the same time, data within the CVF DLL is corrupted/overwritten by the second call if it occurs at the same time.
I.e. call 1 and call 2 both send their startup parameters correctly and on both occasions the CVF DLL recieves them fine (proved that).
However, large data arrays within the CVF DLL are overwritten by data from the 2nd call while the 1st call is progressing.
I've tried using the Multi-Thread Library, but that doesn't seem to help at all.
I need some pointers as for what to look at. Or clues how to force a calling program to use a 'new' copy of the CVF DLL.