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

Using C# in Fortran

bebekduduk
Beginner
415 Views
Hello All,
i am a newbie in Fortran, and would like to connect C# to F90.
I am trying to write a F90 Subroutine, which controlled a C# Windows.Forms but it always failed. I use VS2005 with IVF9.1
t
he F90 Code:

program test1
implicit none
interface
subroutine THISFORM1(xSize,ySize)
!DEC$ ATTRIBUTES STDCALL, ALIAS :'Form1' :: THISFORM1
integer xSize
integer ySize
end subroutine
end interface
call THISFORM1(500,500)
end program test1
----------------------------------------
and the C# code (Form1.cs)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace WindowForm
{

public class Form1 : System.Windows.Forms.Form
{

private System.ComponentModel.IContainer components = null;

public Form1(int xSize, int ySize)
{
InitializeComponent(xSize, ySize);
}
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

private void InitializeComponent(int xSize, int ySize)
{
components = new System.ComponentModel.Container();
this.Size = new System.Drawing.Size(xSize, ySize);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
}
}

can you help me?, thanks very much

Erwin
0 Kudos
0 Replies
Reply