View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Passing an Excel Range object to C++ DLL

Martin,
You can call Windows API functions directly from the worksheet, so make your
VBA Declare statement something similar. So it would be a standard DLL, not
ActiveX.
Need to be able to handle Unicode, or at least calling the APIs this way
needs the W version not the A version.

NickHK

"Martin" wrote in message
oups.com...
Hello,
I want to pass an excel selection to a C++ dll in order to get a result
an display it in a cell.
I could allready do it by copying the content of the Range object into
a Double array that is passed by reference to the dll.
Now I would like to avoid the copy, and pass the Range object by
reference to the C++ dll.

Is there a corresponding C++ type (and associated utility functions)
for maniuplating the Range object?

Any link to detailed documentation/example would be appreciated (I do
know really few concerning COM).

Thanks in advance
Martin