forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fortran dll called from VB6

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
DavidMustard



Joined: 14 Dec 2006
Posts: 9

PostPosted: Fri Dec 15, 2006 11:52 am    Post subject: Fortran dll called from VB6 Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7928
Location: Salford, UK

PostPosted: Fri Dec 15, 2006 6:00 pm    Post subject: Reply with quote

David

Are you using F_STDCALL and have you seen "Calling an FTN95 DLL from Visual Basic" in FTN95.chm?
Back to top
View user's profile Send private message AIM Address
DavidMustard



Joined: 14 Dec 2006
Posts: 9

PostPosted: Mon Dec 18, 2006 11:37 am    Post subject: Reply with quote

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
View user's profile Send private message
DavidMustard



Joined: 14 Dec 2006
Posts: 9

PostPosted: Mon Dec 18, 2006 5:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group