View previous topic :: View next topic |
Author |
Message |
DavidMustard
Joined: 14 Dec 2006 Posts: 9
|
Posted: Fri Dec 15, 2006 11:52 am Post subject: Fortran dll called from VB6 |
|
|
I'm trying to call an ftn95 dll from Visual Basic 6.
This has worked Ok , but I now find that if I add any more code to the fortran dll the VB crashes with 'Bad DLL calling Convention' .This happens even if I just add blank lines to an ftn95 dll which has previously worked (if I remove these blank lines everything is Ok again) , so it seems it must be the number of lines which is the problem
Any ideas? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Fri Dec 15, 2006 6:00 pm Post subject: |
|
|
David
Are you using F_STDCALL and have you seen "Calling an FTN95 DLL from Visual Basic" in FTN95.chm? |
|
Back to top |
|
|
DavidMustard
Joined: 14 Dec 2006 Posts: 9
|
Posted: Mon Dec 18, 2006 11:37 am Post subject: |
|
|
Paul
I hadn't been using STDCALL ,but now that I've tried that it still doesn't work (with the extra blank lines in place) ,but it now gives a different error. When I now try to run with the extra lines it says 'Visual Basic has Encountered a Problem and Is Closing Down'. Again ,removing the extra lines means eyerything is OK again
David |
|
Back to top |
|
|
DavidMustard
Joined: 14 Dec 2006 Posts: 9
|
Posted: Mon Dec 18, 2006 5:31 pm Post subject: |
|
|
Paul
Actually, I think it is now solved. It was a combination of the STDCALL thing, and a change to the way the SLINK command was being used.
Thnaks for your help
David |
|
Back to top |
|
|
|