This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: DLL And Visual Basic
- From: "Mader, Alexander" <alexander dot mader at niles dot de>
- To: Tim <tjbynum at swbell dot net>
- Cc: cygwin at cygwin dot com
- Date: Mon, 21 Jan 2002 06:24:48 +0100
- Subject: Re: DLL And Visual Basic
- References: <007401c1a1dc$86c1a800$fa34fea9@rineco.com>
Hallo,
from my understanding during the development of DLLs for VB there are
the following important things:
1. Compile with stdcall: VB uses the stdcall (Pascal) calling
convebtion. Either hardcode it (_I_ wouldn't do that) or use the -mrtd
with gcc.
2. When passing structs mind the sick padding convention in VB! They pad
to 4byte! So you have to fill by hand your c/c++-struct to contain a
multiple of 4bytes and compile with -fpack-struct.
NB: Additionally I compile with -fnative-struct. I found no
documentation for this option (Could anybody explain?) but it is used
for the gtk-port and sounds good to me :-)
Of course DllMainStartup... must be linked with the object files for the DLL
Best wishes,
Alexander.
--
Alexander Mader <alexander.mader@niles.de> Fon: +49-30-93033-636
NILES Werkzeugmaschinen GmbH Fax: +49-30-93033-603
www.niles.de
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/