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

CVF to VB.net

g_krishnan1
Beginner
1,885 Views
Steve:
In one of the old posting you have mentioned a code for VB.net calling CVF. ( This link seems to no longer exist. It would be of great help if you could provide that example again or point me in the right direction. Actuallyweare trying to pass strings to and from a fortran.dll from/to VB.net and running into problems. I dont have much background in VB.net
Thanks for the help
GK
0 Kudos
2 Replies
Steven_L_Intel1
Employee
1,885 Views
Yeah, HP has really messed up their Fortran web site...

I have attached an example of VB calling Fortran that uses Intel Fortran. The concepts are the same for CVF. This sample passes an array of reals. If you want to pass a string, you pass it "by value" in VB and accept in Fortran with the REFERENCE attribute on the routine and argument to prevent it from looking for a length (or pass the length as a long by value in the appropriate position.)

Note that you need to make sure the Fortran DLL is where VB wants to see it. In this sample, I had it put in the VB project's Debugin subfolder.
0 Kudos
g_krishnan1
Beginner
1,885 Views
Thank you very much. I will give it a shot
Regards
GK
0 Kudos
Reply