ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Passing variant arrays to C/C++ dll's (https://www.excelbanter.com/excel-programming/313830-passing-variant-arrays-c-c-dlls.html)

agarwaldvk[_35_]

Passing variant arrays to C/C++ dll's
 

Hi All

I wrote a very generic function that I use extensively in my wor
here!

An Excel range is passed to this custom VBA function of mine. I rea
this whole range first in to a variant variable (as suggested b
Charles on this forum) then read this variant variable and load a
array with a subset of the contents of this variant variable. Th
function works ok with reasonable speed. I have no complaints with thi
but I am apprehensive about making it globally available in m
organisation because I feel that as the search range become
increasingly large and as the function may get called quit
frequently, the recalculation times may become unpalatable. (I hav
checked with a range of 4000 rows and 30 columns - and it seems to wor
reasonably quickly).

I am looking at ways to speed up the process and was wondering that i
I could pass the array (now containing the subset of the contents o
the variant variable) to a C or C++ dll. I am not particularly familia
with programming in Visual C++ but am reasonably comfortable wit
programming in C.

Can someone adivse/refer/guide me as how do I pass this whole arra
(this array will contain data of any data type - hence contain varian
data type data) to a C function that I would like to use purely to us
the processing speed of C. Alternatively, how can I pass this varian
array to a Visual C++ dll function.

Any assistance would be highly valued.


Best regards


Deepak Agarwa

--
agarwaldv
-----------------------------------------------------------------------
agarwaldvk's Profile: http://www.excelforum.com/member.php...fo&userid=1134
View this thread: http://www.excelforum.com/showthread.php?threadid=27002



All times are GMT +1. The time now is 02:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com