Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3C4BA620.4050407@niles.de> Date: Mon, 21 Jan 2002 06:24:48 +0100 From: "Mader, Alexander" User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.7) Gecko/20011221 X-Accept-Language: en-us MIME-Version: 1.0 To: Tim CC: cygwin AT cygwin DOT com Subject: Re: DLL And Visual Basic References: <007401c1a1dc$86c1a800$fa34fea9 AT rineco DOT com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 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/