Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29277 Discussions

Calling Intel Fortran DLL from VB6 User Interface

bobm48
Beginner
583 Views
BODY,.aolmailheader {font-size:10pt; color:black; font-family:Arial;} a.aolmailheader:link {color:blue; text-decoration:underline; font-weight:normal;} a.aolmailheader:visited {color:magenta; text-decoration:underline; font-weight:normal;} a.aolmailheader:active {color:blue; text-decoration:underline; font-weight:normal;} a.aolmailheader:hover {color:blue; text-decoration:underline; font-weight:normal;} Background: I have a Fortran (core) program that is called as a DLL by a user interface written in Visual Basic 6.0. I am presently using Lahey Fortran 5.7 and a no-longer-supported interface package called F90VB (Canaima Soft) to handle differences in the calling argument conventions between VB6 and Lahey Fortran.

I would like to switch to using Intel Fortran. I am planning to switch from VB6 to the latest release (VB 2007?), but this will take time (a lot) because of its major incompatabilities with VB6 and the size of my code.

My Question: Can the present or any past version of Intel Fortran be used to generate a DLL that can be called by a User Interface written in VB6?

F90VB also supports DLL's written in Compaq Fortran. Is the calling argument convention in Intel Fortran different from that used in Compaq Fortran?

Thanks for your help.
0 Kudos
2 Replies
DavidWhite
Valued Contributor II
583 Views
Quoting - bobm48
BODY,.aolmailheader {font-size:10pt; color:black; font-family:Arial;} a.aolmailheader:link {color:blue; text-decoration:underline; font-weight:normal;} a.aolmailheader:visited {color:magenta; text-decoration:underline; font-weight:normal;} a.aolmailheader:active {color:blue; text-decoration:underline; font-weight:normal;} a.aolmailheader:hover {color:blue; text-decoration:underline; font-weight:normal;} Background: I have a Fortran (core) program that is called as a DLL by a user interface written in Visual Basic 6.0. I am presently using Lahey Fortran 5.7 and a no-longer-supported interface package called F90VB (Canaima Soft) to handle differences in the calling argument conventions between VB6 and Lahey Fortran.

I would like to switch to using Intel Fortran. I am planning to switch from VB6 to the latest release (VB 2007?), but this will take time (a lot) because of its major incompatabilities with VB6 and the size of my code.

My Question: Can the present or any past version of Intel Fortran be used to generate a DLL that can be called by a User Interface written in VB6?

F90VB also supports DLL's written in Compaq Fortran. Is the calling argument convention in Intel Fortran different from that used in Compaq Fortran?

Thanks for your help.

I am not an expert in this area, others will be able to give you a more exact answer. However, what I can say is that I am routinely developingIntel Fortran DLL's which are called from both VB and VBA in Excel. One of my customers uses VB (5 or 6 I think), and we were able to resolve all of the issues. Can you please post the VB6 declares you are using and the DLL export statement and declares on the Fortran side? I'll check my latest interfaces and post what I am using. We can then compare them.

You may check this post on a recent thread in the forum
http://software.intel.com/en-us/forums/showpost.php?p=82841

Regards,

David
0 Kudos
ArturGuzik
Valued Contributor I
583 Views
Quoting - David White

I am not an expert in this area, others will be able to give you a more exact answer. However, what I can say is that I am routinely developingIntel Fortran DLL's which are called from both VB and VBA in Excel. One of my customers uses VB (5 or 6 I think), and we were able to resolve all of the issues. Can you please post the VB6 declares you are using and the DLL export statement and declares on the Fortran side? I'll check my latest interfaces and post what I am using. We can then compare them.

You may check this post on a recent thread in the forum
http://software.intel.com/en-us/forums/showpost.php?p=82841

Regards,

David
Addind to David's comment. Default calling convention changed between Intel and Compaq VF. Now (Intel) uses CDECL instead of STDCALL by Compaq. If you have working code in CVF (and don't want to change it) you can use a compiler switch to pass arguments in IVF exactly as it was in CVF.


A.
0 Kudos
Reply