For a 64 bit compiled VB.NET program, called 64 bit DLL problem

The 64 bit DLL is written in VC2008



The main problem is how to and from a string



One of DLL function declaration

Public Declare Function ws_readBlock Lib "WSR.dll" (ByVal Port As Integer, ByVal Block As Integer, ByRef Data As Byte) As Integer

The problem in this parameter: ByRef Data As Byte


In Basic6, this statement can, under the VB.NET 32 compiler program can also use this function,
Numerical wrong VB.NET 64 compiler program calls the function that however, the first Byte values can only be obtained Byte array,
Numerical unreachable. Please master pointing about, thank you!

Started by Nigel at November 17, 2016 - 2:29 AM

Public Declare Function ws_readBlock Lib "WSR.dll" (ByVal Port As Integer, ByVal Block As Integer, ByRef Data() As Byte) As Integer

Posted by Gino at November 27, 2016 - 3:01 AM