View previous topic :: View next topic |
Author |
Message |
john62
Joined: 20 Feb 2007 Posts: 10
|
Posted: Mon Mar 05, 2007 1:39 pm Post subject: passing VB-6 dll's to FTN77 and back?? |
|
|
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
Last edited by john62 on Mon Mar 05, 2007 6:15 pm; edited 3 times in total |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7926 Location: Salford, UK
|
Posted: Mon Mar 05, 2007 3:14 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
john62
Joined: 20 Feb 2007 Posts: 10
|
Posted: Mon Mar 05, 2007 6:13 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7926 Location: Salford, UK
|
Posted: Mon Mar 05, 2007 7:15 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
|