Silverfrost Forums

Welcome to our forums

passing VB-6 dll's to FTN77 and back??

5 Mar 2007 12:39 (Edited: 5 Mar 2007 5:15) #1775

I have a program on fortran 77 and like to make a GUI on VB-6 How can I pass a dll to FTN77 without any problem or how must I use the stdcall option for correct calling convention on FTN77

5 Mar 2007 2:14 #1776

There is no simple way to call an FTN77 dll from Visual Basic.

You can use FTN95 to compile a Fortran 77 program and then you will find details on how to call an FTN95 dll from Visual Basic in the FTN95 help file under Win32 platform->Mixed language programming->Calling FTN95 dlls from Visual Basic.

Initially you should avoid providing your own LIBMAIN because the linking is not straight forward.

5 Mar 2007 5:13 #1778

Thanks paul. Sorry to heard that this impassible to call a FTN77 dll direct from VB-6 I have a large program on fortran77 and now i most converted to FTN95 by hand a lot of work.

5 Mar 2007 6:15 #1779

A program the compiles with FTN77 will normally compile with FTN95. No conversion is required.

It is not impossible to access an FTN77 dll from Visual Basic but the linking process is quite complex. My recommendation is that you try compiling your program with FTN95 without any changes to the code.

After that you can see what changes are needed to use F_STDCALL.

Please login to reply.