Catherine,
We have just converted three of our Fortran programs into DLL and they are
called by a VC++ program. All the Fortran DLLs open and create several files
during the call and that does not caused any problem.
However we need to modify the Fortran sources since it is no longer a
stand-lone program:
1. Remove all the STOP statement. This cause the entire program to
terminate.
2. Before return to the calling program, make sure all the opened units are
closed. The original codes simply let the clean up code to do the job.
3. Check the calling convention between VB and Fortran. Write a small test
program to see if the arguments are passed correctly.
4. Check if your Fortran program write output to the screen, it might not
work since there might be no STDOUT. Ditto for STDIN.
These are the issues I could think of. Please let me know if these help.
Shyan Lam
[log in to unmask]
"McCallum, Catherine" <[log in to unmask]> wrote:
> Hi.
> I've got a fortran program that I'm trying to convert into a dll and then
> use in a Visual Basic program.
> But...the fortran program opens several files, and this causes Visual Basic
> to close itself everytime I run it. How do I go about opening files from a
> dll? Or opening them from the VB.exe program, and using them in the
fortran
> part?
> If anyone could help me out with this, I'll be so, so very grateful. It's
> been driving me nuts.
> Thanks a bunch!
>
> catherine
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|