T
Tom Edelbrok
I have an old 32-bit DLL that is very necessary to our operation. It
extracts data from a proprietary inudstrial database and gives it back to
our VB6 programs. Everything works great under VB6.
But under VB.NET fetching data via this DLL doesn't work (actually parts of
it work - we can open and close a database session, but can't fetch any
data). When we make a call to fetch data we get the error "Object reference
not set to an instance of an object". The 'Declare' is overloaded as follows
(note that prior to converting to VB.NET there was a single 'Declare' that
used 'ByRef value as any'. The 'as any' is not valid in VB.NET and had to be
replaced).
Declare Function Get_FIELD_Data Lib "Accdb32.dll" Alias "acc_getFLDdata"
(ByVal SessionID As Integer, ByVal Table As Integer, ByVal IDX As Integer,
ByVal size As Integer, ByRef value As String, ByRef ret_size As Integer,
ByRef fld_Error As Integer) As Integer
Declare Function Get_FIELD_Data Lib "Accdb32.dll" Alias "acc_getFLDdata"
(ByVal SessionID As Integer, ByVal Table As Integer, ByVal IDX As Integer,
ByVal size As Integer, ByRef value As Integer, ByRef ret_size As Integer,
ByRef fld_Error As Integer) As Integer
Declare Function Get_FIELD_Data Lib "Accdb32.dll" Alias "acc_getFLDdata"
(ByVal SessionID As Integer, ByVal Table As Integer, ByVal IDX As Integer,
ByVal size As Integer, ByRef value As Short, ByRef ret_size As Integer,
ByRef fld_Error As Integer) As Integer
Can anyone suggest a way to tell VB.NET that this DLL is not VB.NET, and
that it should just run it as an old DLL from past history?
Thanks in advance,
Tom Edelbrok
extracts data from a proprietary inudstrial database and gives it back to
our VB6 programs. Everything works great under VB6.
But under VB.NET fetching data via this DLL doesn't work (actually parts of
it work - we can open and close a database session, but can't fetch any
data). When we make a call to fetch data we get the error "Object reference
not set to an instance of an object". The 'Declare' is overloaded as follows
(note that prior to converting to VB.NET there was a single 'Declare' that
used 'ByRef value as any'. The 'as any' is not valid in VB.NET and had to be
replaced).
Declare Function Get_FIELD_Data Lib "Accdb32.dll" Alias "acc_getFLDdata"
(ByVal SessionID As Integer, ByVal Table As Integer, ByVal IDX As Integer,
ByVal size As Integer, ByRef value As String, ByRef ret_size As Integer,
ByRef fld_Error As Integer) As Integer
Declare Function Get_FIELD_Data Lib "Accdb32.dll" Alias "acc_getFLDdata"
(ByVal SessionID As Integer, ByVal Table As Integer, ByVal IDX As Integer,
ByVal size As Integer, ByRef value As Integer, ByRef ret_size As Integer,
ByRef fld_Error As Integer) As Integer
Declare Function Get_FIELD_Data Lib "Accdb32.dll" Alias "acc_getFLDdata"
(ByVal SessionID As Integer, ByVal Table As Integer, ByVal IDX As Integer,
ByVal size As Integer, ByRef value As Short, ByRef ret_size As Integer,
ByRef fld_Error As Integer) As Integer
Can anyone suggest a way to tell VB.NET that this DLL is not VB.NET, and
that it should just run it as an old DLL from past history?
Thanks in advance,
Tom Edelbrok