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 

STDCALL and FTN95

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



Joined: 27 May 2005
Posts: 5

PostPosted: Wed Aug 17, 2005 2:50 am    Post subject: STDCALL and FTN95 Reply with quote

I am writing a FTN95 application which uses ClearWin to produce a GUI (hence there are call-back functions in the program). The program uses several STDCALL statements to set up function calls to a DLL which is supplied by the manufacturer of an interface card which the application is controlling.

Where do I put the STDCALL statements? Should they be all in the main program (i.e. before ClearWin calls the call-back functions) or should they be repeated in each call-back function (assuming that this has a reference within it to a particular DLL function)?


Barry Chambers
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Aug 22, 2005 12:49 am    Post subject: STDCALL and FTN95 Reply with quote

If you are accessing a DLL that uses the STDCALL protocol then all you need is /IMPORT_LIB <DLL path> on the FTN95 command line. You can do this using Plato and the properties of a Reference in the Propject Explorer window.

Your own code does not need any modification.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Fri Aug 26, 2005 2:59 am    Post subject: STDCALL and FTN95 Reply with quote

Thank you for your email.
This is to confirm my original reply.
The normal way to access a DLL that uses STDCALL is to use /IMPORT_LIB
<dll_name> alone.
This will lookup all function calls in the DLL and do everything for you.

If /IMPORT_LIB fails to work as intended then it will be necessary to
provide a STDCALL declaration in each external subprogram for every function
call (to the DLL) in the subprogram. The simplest way to do this is to
create an INCLUDE file for all the declarations. An alternative would be to
try using a MODULE to declare the relevant functions.
Back to top
View user's profile Send private message AIM Address
Barry



Joined: 27 May 2005
Posts: 5

PostPosted: Fri Aug 26, 2005 10:43 am    Post subject: STDCALL and FTN95 Reply with quote

Paul

Many thanks

Barry
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