G
Guest
I have a DLL subroutine that I'd like to call from within a class I've
created. I've declared the DLL at the top of my class:
Private Declare Sub latlonlatlon_bd Lib _
"hipcalc.dll" _
(ByVal modelnumber As Long, ByVal txLat As Double, ByVal txLon As
Double, _
ByVal rxlat As Double, ByVal rxlon As Double, ByRef dist As Double, _
ByRef bearingTrans As Double, ByRef bearingReceiver As Double)
I call the subroutine:
Call latlonlatlon_bd(34, phi1, lambda1, phi2, lambda2, d, bear12, bear21)
where: phi1,lamda1, phi2, and lamda2 are passed as input
d, bear12, and bear21 are passed as output
I get the following error when it tries to execute call to the DLL:
An unhandled exception of type 'System.NullReferenceException' occurred in
PointBearingDistance.exe
Additional information: Object reference not set to an instance of an object.
I don't know what I'm doing wrong. I know it works in VB 6.
Any help would be gretly appreciated.
Thanks.
Marianne
created. I've declared the DLL at the top of my class:
Private Declare Sub latlonlatlon_bd Lib _
"hipcalc.dll" _
(ByVal modelnumber As Long, ByVal txLat As Double, ByVal txLon As
Double, _
ByVal rxlat As Double, ByVal rxlon As Double, ByRef dist As Double, _
ByRef bearingTrans As Double, ByRef bearingReceiver As Double)
I call the subroutine:
Call latlonlatlon_bd(34, phi1, lambda1, phi2, lambda2, d, bear12, bear21)
where: phi1,lamda1, phi2, and lamda2 are passed as input
d, bear12, and bear21 are passed as output
I get the following error when it tries to execute call to the DLL:
An unhandled exception of type 'System.NullReferenceException' occurred in
PointBearingDistance.exe
Additional information: Object reference not set to an instance of an object.
I don't know what I'm doing wrong. I know it works in VB 6.
Any help would be gretly appreciated.
Thanks.
Marianne