Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <20000803211121.45801.qmail@hotmail.com> X-Originating-IP: [203.97.2.246] From: "Danny Smith" To: sjc AT qx DOT net, cygwin AT sources DOT redhat DOT com Subject: Re: DLL runtime problems Date: Fri, 04 Aug 2000 09:11:21 NZST Mime-Version: 1.0 Content-Type: text/plain; format=flowed >From: sjc AT qx DOT net >To: cygwin AT sources DOT redhat DOT com >Subject: DLL runtime problems >Date: Thu, Aug 3 2000 16:37:05 GMT-0400 > >I am trying to implement a Java JNI call into a DLL compiled by Cygwin's >gcc. I've gotten everything to compile correctly but running the example >causes an application error and kills the JVM. I've been doing some asking >around, and have learned that there are differences between __stdcall and >__cdecl methods for calling into DLLs. The existence of the @ symbols and >use of WINAPI in the Cygwin example indicate that __stdcall is being used. >Does anyone know how JNI is implemented on the Windows NT4 platform, either >__stdcall or __cdecl, and whether or not gcc can create __cdecl DLLs if >that's what the Windows NT4 JDK uses? I'm not an experienced Windows >programmer, so I maybe confusing the terminology. > >Also, is there any more information someone could point me to concerning >the meaning of the @12 in the example in case that number should be >different for my example? > Have a look at some of the links on Mumit Kans page here: http://www.xraylith.wisc.edu/~khan/software/gnu-win32/index.html for some hints on building DLL's/JNI's. These are somewhat out of date, but still work. Also has a link to a MSDN article called "DLLs for beginners" which has some good background on __stdcall name mangling and aliasing in DLL's. Also search *this archive for dlltool and ld -shared. Regards Danny ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com