G
Guest
I am trying to call an unmanaged function from vb.net. I have declared the DLL as follows:
Private Declare Function uncompress Lib "zlib.dll" (ByRef dest As Byte(), ByVal destLen As Long, ByRef src As Byte(), ByVal srcLen As Long) As Long
When I try to call the function, I get an error "Object Referennce not set to instance of object". I have dimensioned all the byte arrays and the other two variables to long.
I think it's in the way the variables are handled in unmanaged code versus vb.net but not sure exactly what to do. Any help would be very much appreciated.
Dennis in Houston
Private Declare Function uncompress Lib "zlib.dll" (ByRef dest As Byte(), ByVal destLen As Long, ByRef src As Byte(), ByVal srcLen As Long) As Long
When I try to call the function, I get an error "Object Referennce not set to instance of object". I have dimensioned all the byte arrays and the other two variables to long.
I think it's in the way the variables are handled in unmanaged code versus vb.net but not sure exactly what to do. Any help would be very much appreciated.
Dennis in Houston