G
Guest
I have a WAPI in C++, which pass an array as parameter to a function
DWORD WINAPI Function1 (DWORD *IN_TBL)
DWORD Var1[32]
Var1[1]=1
..
DWORD dwRv = Function1 (Var1)
This is what I did in vb.net, It doesn't work
<DllImport("example.dll", EntryPoint:="_Function1@16")>
Private Shared Function Function1(ByVal Function1 As Integerr) As Intege
End Functio
Dim ptr1 as intPt
Private Var1() As Intege
Redim Var1(31
..
intPtr = Marshal.AllocCoTaskMem(Marshal.SizeOf(Var1)
Dim iResult as integer = Function1 (intPtr.ToInt32
1. How could I declare integer array and this funciton with DLLIMPORT in vb.net?
2. How could pass integer array to the function
Thanks
DWORD WINAPI Function1 (DWORD *IN_TBL)
DWORD Var1[32]
Var1[1]=1
..
DWORD dwRv = Function1 (Var1)
This is what I did in vb.net, It doesn't work
<DllImport("example.dll", EntryPoint:="_Function1@16")>
Private Shared Function Function1(ByVal Function1 As Integerr) As Intege
End Functio
Dim ptr1 as intPt
Private Var1() As Intege
Redim Var1(31
..
intPtr = Marshal.AllocCoTaskMem(Marshal.SizeOf(Var1)
Dim iResult as integer = Function1 (intPtr.ToInt32
1. How could I declare integer array and this funciton with DLLIMPORT in vb.net?
2. How could pass integer array to the function
Thanks