Is there any difference in the way that an array is passed from VB to C++ in VB6.0 as opposed to .NET?
My problem is that I have a working app in VB6 which passes an array by reference to a C++ DLL. However, when running the same app converted into VB.NET, something is wrong with passing the array in the same manner... the return of "Status" is a paramater error.
Ex:
VB code:
Public Declare Function GetString Lib "Test.dll" (ByVal dwNum As Long, ByRef lpvString As Byte, ByVal dwFlags As Long) As Integer
Status = GetString(0, DevStr(0), RETURN_DEVSTRING)
C code:
TEST_API STATUS WINAPI GetString(DWORD dwNum, LPVOID lpvString, DWORD dwFlags);
If I am missing something in the conversion for VB6 to VB.NET, any help would be appreciated!
My problem is that I have a working app in VB6 which passes an array by reference to a C++ DLL. However, when running the same app converted into VB.NET, something is wrong with passing the array in the same manner... the return of "Status" is a paramater error.
Ex:
VB code:
Public Declare Function GetString Lib "Test.dll" (ByVal dwNum As Long, ByRef lpvString As Byte, ByVal dwFlags As Long) As Integer
Status = GetString(0, DevStr(0), RETURN_DEVSTRING)
C code:
TEST_API STATUS WINAPI GetString(DWORD dwNum, LPVOID lpvString, DWORD dwFlags);
If I am missing something in the conversion for VB6 to VB.NET, any help would be appreciated!