delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/03/07/14:40:23

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <38C552FD.B58A669@sigma6.com>
Date: Tue, 07 Mar 2000 14:05:33 -0500
From: Jeff Sturm <jsturm AT sigma6 DOT com>
Organization: AppNet
X-Mailer: Mozilla 4.51 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Roland Ruehl <roland AT PDF DOT COM>
CC: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: Excel DLLs
References: <200003071646 DOT IAA15827 AT PDF DOT 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 AT sigma6 DOT com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019