delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/21/00:25:29

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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" <alexander DOT mader AT niles DOT de>
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 <tjbynum AT swbell DOT net>
CC: cygwin AT cygwin DOT com
Subject: Re: DLL And Visual Basic
References: <007401c1a1dc$86c1a800$fa34fea9 AT rineco DOT 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 DOT mader AT niles DOT 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/

- Raw text -


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