T
thekind78
Hello all,
Trying to call a C++ function from VBA. Function is declared as
following in C++:
func(char[],int[],int)
The function reads the char*, does some manipulations on the data
within it, and writes the results to the int*. There are two things I
see as problems:
1) the int values in C++ are greater than the max value permitted in
VBA
2) not sure how to pass the parameters to the dll from VBA
I have been trying some combination of the following:
func(ByRef string, ByRef int(1), ByVal int)
i.e. sending down the address of the string, the address of the
first element of the integer array and the value of an integer which
corresponds to the number of iterations that are required for some
processing done in the C++ code. Can anyone suggest how to address the
two problems above? As it stands now, the code completely shuts down
Excel without even a warning. Some illegal memory addressing I guess
but not sure how to get around it. Thanks in advance.
Trying to call a C++ function from VBA. Function is declared as
following in C++:
func(char[],int[],int)
The function reads the char*, does some manipulations on the data
within it, and writes the results to the int*. There are two things I
see as problems:
1) the int values in C++ are greater than the max value permitted in
VBA
2) not sure how to pass the parameters to the dll from VBA
I have been trying some combination of the following:
func(ByRef string, ByRef int(1), ByVal int)
i.e. sending down the address of the string, the address of the
first element of the integer array and the value of an integer which
corresponds to the number of iterations that are required for some
processing done in the C++ code. Can anyone suggest how to address the
two problems above? As it stands now, the code completely shuts down
Excel without even a warning. Some illegal memory addressing I guess
but not sure how to get around it. Thanks in advance.