473,386 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Problem calling an external DLL from VB.Net 2003

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\DGGEV_DLL\dggev.dll", EntryPoint:="dggev_",
SetLastError:=True, _
CharSet:=CharSet.Unicode, ExactSpelling:=True, _
CallingConvention:=CallingConvention.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.
Jul 22 '06 #1
0 1773

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: j23 | last post by:
I have library (static) testlib.cpp: #include <stdarg.h> void xxx(...) { char buf; va_list args; va_start(args, buf); va_end(args); }
6
by: Scott Zabolotzky | last post by:
I'm trying to pass a custom object back and forth between forms. This custom object is pulled into the app using an external reference to an assembly DLL that was given to me by a co-worker. A...
3
by: Sukhi R | last post by:
Please help.... My vb.net 2003 application running as service fails on Windows 2003 SP1 with error "The exception generated was c0000005 at address 7C8224B2...
2
by: =?Utf-8?B?YmFzaA==?= | last post by:
Hello, I am compiling a CPP code using Visual studion .net 2003. I get the following error, despite having windldap.h and wldap32.dll in my include and lib paths. Here is the error. uuid.lib...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.