Hi all,
I'm trying to get a C++ dll to fill an array that has been passed to it using VB.
I use the following code to test the function:
*******************************************************
' Declare the C++ DLL Function
Private Declare Function test Lib "test.dll" ( ByRef intArray as Integer, ByVal arraySize as Integer) as Integer
.
.
' In my function
.
.
Dim iArray()
ReDim iArray(10)
test ( iArray(0), 10 )
.
.
' print the results... etc....
*******************************************************
Now the problem is that only the element iArray(0) is actually updated by the DLL although, I have verified that all elements are changed within it.
The function within the dll has been defined as:
*******************************************************
int __stdcall test ( int * intArray, int arraySize )
*******************************************************
Also the C++ dll works fine in conjunction with C++ programs.
Appreciate it if anyone could give me a hand with this.
Thanks.
I'm trying to get a C++ dll to fill an array that has been passed to it using VB.
I use the following code to test the function:
*******************************************************
' Declare the C++ DLL Function
Private Declare Function test Lib "test.dll" ( ByRef intArray as Integer, ByVal arraySize as Integer) as Integer
.
.
' In my function
.
.
Dim iArray()
ReDim iArray(10)
test ( iArray(0), 10 )
.
.
' print the results... etc....
*******************************************************
Now the problem is that only the element iArray(0) is actually updated by the DLL although, I have verified that all elements are changed within it.
The function within the dll has been defined as:
*******************************************************
int __stdcall test ( int * intArray, int arraySize )
*******************************************************
Also the C++ dll works fine in conjunction with C++ programs.
Appreciate it if anyone could give me a hand with this.
Thanks.