Trying to call an external DLL (compiled within Fortran) and keep on getting
the following error in the main call to the external DLL
' Object reference not set to instance of object'
The DLL import definition is located within its own class as follows:
'
'
Imports System.Runtime. InteropServices
'
Public Class LAPACK
'...
<DllImport("C:\ G95\_LAPACK\DGG EV_DLL\dggev.dl l", EntryPoint:="dg gev_",
SetLastError:=T rue, _
CharSet:=CharSe t.Unicode, ExactSpelling:= True, _
CallingConventi on:=CallingConv ention.StdCall) _
Public Shared Sub _
DGGEV(ByVal JOBVL As Char, ByVal JOBVR As Char, ByVal N As Integer, _
ByRef A(,) As Double, ByVal LDA As Integer, ByRef B(,) As Double, _
ByVal LDB As Integer, ByRef ALPHAR() As Double, ByRef ALPHAI() As
Double, _
ByRef BETA() As Double, ByRef VL(,) As Double, ByVal LDVL As Integer, _
ByRef VR(,) As Double, ByVal LDVR As Integer, ByRef WORK() As Double, _
ByVal LWORK As Integer, ByRef INFO As Integer)
End Sub
'
End Class
The main net program calls the procedure as follows
Call LAPACK.DGGEV("N ", "V", N, S, LDA, T, LDA, ALPHR1, ALPHI1, _
BETA1, Q, LDQ, QE, LDQE, WORK, LWORK, IERR)
As soon as the call occurs the error message appears.
Any ideas would be appreciated
Mike C.