Article View: borland.public.cppbuilder.nativeapi
Article #12636Re: linking 32 bit modules with 16 bit modules
From: Jonathan Arnold
Date: Mon, 24 Nov 2003 21:59
Date: Mon, 24 Nov 2003 21:59
26 lines
2175 bytes
2175 bytes
Jos� Miguel wrote:
> I need to call functions in a DLL from a Java program, but that DLL is
> compiled in 16 bit mode and I don't have the source code. I need to call
> functions from a Java program by means of JNI.
> I think I have to write a DLL to be compiled in 32 bit mode in order to make
> it callable from JNI and from this DLL call the DLL which has the function I
> actually need.
> I'm using Borland Compiler 5.5
You're right that is a problem. See, C++Builder only does Win32 apps, and
getting Win32 apps to communicate with a 16 bit DLL is painful, ugly, and
non-portable even between Win9x and WinNT. There are two methods of
"thunking" and one works on WinNT and one works on Win95. It ain't very
fun.
For more info, search for thunking on http://msdn.microsoft.com. Also,
there's a *very* simplistic component on Torry's site that might help for
*real simple* cases:
http://www.torry.net/index.htm
--
Jonathan Arnold C/C++/CBuilder Keen Advice:
http://www.keen.com/categories/categorylist_expand.asp?sid=5156620
Comprehensive C++Builder link site:
http://www.buddydog.org/C++Builder/c++builder.html
Technical Details
Message-ID:
<3fc27f2f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fbe87b4@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10cc67,be77a85f0ba0e718 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-24 14:09:56 PST Date: Mon, 24 Nov 2003 16:59:12 -0500 From: Jonathan Arnold <jdarnold@buddydog.org> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20031030 MultiZilla/1.5.0.3l X-Accept-Language: en-us, en, ja MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: linking 32 bit modules with 16 bit modules References: <3fbe87b4@newsgroups.borland.com> In-Reply-To: <3fbe87b4@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 66.92.76.225 Message-ID: <3fc27f2f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1069711151 66.92.76.225 (24 Nov 2003 13:59:11 -0700) Lines: 26 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail