I'm using some legacy code that I want to call back to VB rather than print code to a command window and wait for input there. I've create a solution that has a VB front end exe project, a FORTRAN .dll project and a VB .dll that is somewhat of a go-between. It's the one that FORTRAN calls subs from, it gets the input from the user and returns it to the FORTRAN code. Now, I've done the examples in the help file, and I've done while similar to it, and I've done something somewhat like it in this case and I keep running into the following problem (I've left some code out since it's working and doesn't have anything to do with this part) :
ASSEMBLY_EXTERNAL(NAME='VBINT.fortranPubs.loadChooseType') CHTYPE
....
....
....
CALL CHTYPE(VTYPE,RT,NRT)
The VB sub it calls to (VBINT.fortranPubs.loadChooseType) is :
Imports System.Windows.Forms
Public Class fortranPubs
Public Shared Sub loadChooseType(ByVal VTYPE() As String, ByVal RT() As Double, ByVal NRT As Integer)
ReDim VbVTYPE(29)
Dim chType As New chooseType(NRT)
Dim j As Integer = -1
For i As Integer = 0 To NRT - 1
VbVTYPE(i) = VTYPE(CInt(RT(i)))
Next
ReDim Preserve VbVTYPE(NRT - 1)
chType.ShowDialog()
End Sub
End Class
These are all in three different projects in one solution, and when I try to build the solution it builds the VB part first, successfully, then the FORTRAN part of the code, where the compiler stops and gives the following error : error 1119 - No .NET method matches this call. At which point, of course, the compiler stops.
Any thoughts?