Although there is some information concerning the interoperability (unfortunately spread over many pieces of information and for my limited knowledge too fragmented and much too complicated to be understood in detail) I could not find a solution for a very simple test problem. My idea is to call a Fortran 95 subroutine from Microsoft Visual Basic 2010 Express. This should in principle be possible via a dll. The test subroutine is
F_STDCALL Subroutine F (x,y)
integer (SELECTED_INT_KIND (9)) :: x, y
y=x
end
In Visual Basic I have created a form with a button starting the test case and an output text box. The code is
Public Class Form1
Declare Sub F Lib 'd:\\dummy_d\\test_dll\\Release\\Win32\\Test.dll' _
(ByRef x As Integer, ByRef y As Integer)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As Integer
Dim y As Integer
x = 5
F(x, y)
TextBox1.AppendText('Call of dll: ' & y)
End Sub
End Class
Obviously, this approach is full of errors. However, several modifications resulted in similar catastrophic errors and I am sure that I miss several essential items. I would like to add that I have created the dll with Plato. Since I suspect that there are already problems with my dll created, I would like to ask whether there is any test which proves that the dll was created correctly?
Can I find anywhere more (and complete) information or can anybody help?
Many thanks in advance for any efforts,
Klaus