This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Excel DLLs
- To: Roland Ruehl <roland at PDF dot COM>
- Subject: Re: Excel DLLs
- From: Jeff Sturm <jsturm at sigma6 dot com>
- Date: Tue, 07 Mar 2000 14:05:33 -0500
- CC: cygwin at sourceware dot cygnus dot com
- Organization: AppNet
- References: <200003071646.IAA15827@PDF.COM>
Roland Ruehl wrote:
> - Does anybody know about detailed documentation for passing parameters
> from Visual basic to Cygwin ? For instance, by trial and error,
> I found out that Strings are passed as pointers to C arrays of
> shorts, but am wondering about more complex structures, i.e.
> records, arrays, etc. How do I pass an unknown number of
> parameters, similar to the Excel SUM() construct, for example ?
Those strings are really BSTR, which are generally equivalent to wchar_t
* (same size as a short, as you found out). The difference is that they
must be allocated with SysAllocString and released with SysFreeString to
avoid memory corruption.
VBA/Excel rely extensively on the IDispatch (automation) interface,
which defines a special type, VARIANT, for arguments and return values.
The VARIANT is a large union of all possible automation types. See the
MSDN docs for more information.
I also find "Inside Distributed COM" from Microsoft Press very helpful.
--
Jeff Sturm
jsturm@sigma6.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com