- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am new at mixed programming in .NET and Intel fortran, but I am having serious trouble getting .NET to recognize my .dll as valid. I get a message that the .dll is not a valid .net or com object. I took an old CVF project and tried importing that but got nothing better. Can somebody point me in the right direction. (I've even tried the mixed programming example in IF8 under mixed programming and got nowhere).
Thanx for the help.
Thom
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Although this link http://arnholm.org/software/index.htmrefers to calling FORTRAN77 from C++, you may find it very useful. ALong with full documentation, It supplies header files, macros and classes etc. that you need to prototype calls to FORTRAN routines.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To call an unmanaged CVF/IVF dll from managed C# you need to use the P/Invoke technique in conjunction with the InteropServices namespace. Something like:
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace PInvokeDemo
{
class Class1
[DllImport("MyCVF.dll", EntryPoint="CallMe")]
static extern bool CallMe();
etc, etc.
HTH,
Gerry T.
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace PInvokeDemo
{
class Class1
[DllImport("MyCVF.dll", EntryPoint="CallMe")]
static extern bool CallMe();
etc, etc.
HTH,
Gerry T.

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