- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Attach is a VS 2010 sample solution. It demonstrates how integers, reals, and character strings may be passed between Visual Basic to/from Fortran and C dll's, and to/from Fortran and C dll's as individual values and as arrays.
The program accepts 2 integers, 2 reals and 2 strings (10 characters max) as input. It returns integer 2 output as the product integer1 and integer 2, real 2 output as the product of real 1 and real 2, and concantenates the character strings with themselves with an underscore in between.
The Fortran code probably does not use the most up-to-date methods. Please feel free to submit new code which meets the latest standard.
The C code does not use the the latest safe functions like strcpy_s and sprintf_s. I'm just a novice C programmer. Again, feel free to update these C routines to the latest standard.
Enjoy, Mike
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would upload a .zip version, but the add files dialog does not recognize the .zip extension.
Regards, Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "Add Files" does not recognize .zip extension or I would have used that originally. I have uploaded the project with a .jpg extension. Download it and change the extension back to .zip and it should work.
Regards, Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I simply can't see .zip files to select them. I'm still working on an XP machine if it makes a difference.
The .jpg version is uploaded.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mike,
Does your code address "Fortran calling VB DLL"? This is my immediate interest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mohanmuthu,
I have not tried calling a VB dll from Fortran. However, I would assume that the same concepts I used would work.
Mike
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page