- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
I spent some time searching the forums, both here and "out yonder" and thought I would contribute something that seems to never go out of fashion. The attached zip file contains a VB2010 windows form program that calls an open file dialog, gets the filename, and passes the filename to a Fortran DLL that opens it.
The VB side contains Open File Dialog control, and calls several subroutines from the Fortran DLL
1. Subroutine Hypot - sends two single precision numbers and returns the hypotenuse
2. Subroutine StringAdjust - sends a VB string variable to Fortran DLL which changes it and sends it back
3. Subroutine CharPass - sends a character variable to DLL which changes it and sends it back
4. Subroutine FileWork - takes the filename from Open File Dialog and sends to DLL so DLL can open in
and sends a couple lines to it, then closes it. ***Must have a text file already created so the Open File
Dialog can find it ****...just use Notepad to create a text file (.txt)
5. Subroutine MatMult - Sends two single precision matrices to DLL and returns the solution matrix.
Hope this is helpful. This was tested on VS2010 for the VB2010 part and VS2008 for the Fortran 11 dll.
I spent some time searching the forums, both here and "out yonder" and thought I would contribute something that seems to never go out of fashion. The attached zip file contains a VB2010 windows form program that calls an open file dialog, gets the filename, and passes the filename to a Fortran DLL that opens it.
The VB side contains Open File Dialog control, and calls several subroutines from the Fortran DLL
1. Subroutine Hypot - sends two single precision numbers and returns the hypotenuse
2. Subroutine StringAdjust - sends a VB string variable to Fortran DLL which changes it and sends it back
3. Subroutine CharPass - sends a character variable to DLL which changes it and sends it back
4. Subroutine FileWork - takes the filename from Open File Dialog and sends to DLL so DLL can open in
and sends a couple lines to it, then closes it. ***Must have a text file already created so the Open File
Dialog can find it ****...just use Notepad to create a text file (.txt)
5. Subroutine MatMult - Sends two single precision matrices to DLL and returns the solution matrix.
Hope this is helpful. This was tested on VS2010 for the VB2010 part and VS2008 for the Fortran 11 dll.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the contribution!
![](/skins/images/9701FEC4E90D143B667C09F3DB2F340F/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page