Board index » cppbuilder » linking 32 bit modules with 16 bit modules
Jos?Miguel
CBuilder Developer |
Jos?Miguel
CBuilder Developer |
linking 32 bit modules with 16 bit modules2003-11-22 05:42:10 AM cppbuilder69 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 Any hint? Thanks a lot in advance |
Sebastian Ledesma
CBuilder Developer |
2003-11-22 07:08:30 AM
Re:linking 32 bit modules with 16 bit modules
Jose:
You must use thunks, but it's not possible in W2k, only in Win9x (to call a 16 bit DLL from a 32bit one). It's possible to do with BC5.0x but dont know about 5.5. You should check a the cppbuilder.commandlinetools newsgroup, that's the official site for the BCC5.5. Saludos Sebastian "Jos?Miguel" < XXXX@XXXXX.COM >escribi?en el mensaje QuoteI need to call functions in a DLL from a Java program, but that DLL is |
Jos?Miguel
CBuilder Developer |
2003-11-22 07:47:42 AM
Re:linking 32 bit modules with 16 bit modules
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 and my system is Windows XP Any hint? Thanks a lot in advance {smallsort} |
Chris244
CBuilder Developer |
2003-11-22 10:04:57 AM
Re:linking 32 bit modules with 16 bit modules
On Sat, 22 Nov 2003 00:47:42 +0100, "Jos?Miguel"
< XXXX@XXXXX.COM >wrote: QuoteI need to call functions in a DLL from a Java program, but that DLL is possibility would be to write a 16-bit EXE that loads the the 16-bit DLL and calls the functions in it. You can then write a 32-bit DLL to be loaded via JNI that launches the 16-bit EXE and communicates with it via a IPC mechanism that works between 16-bit and 32-bit EXEs (Windows messages, DDE, COM, files, etc). Java EXE<->JNI<->32-bit DLL<->IPC<->16-bit EXE<->16-bit DLL Or you could try to find or code a replacement for the 16-bit DLL. Chris Hill XXXX@XXXXX.COM |
Jos?Miguel
CBuilder Developer |
2003-11-22 07:32:23 PM
Re:linking 32 bit modules with 16 bit modules
Thanks for your help.
"Chris Hill" < XXXX@XXXXX.COM >escribi?en el mensaje QuoteOn Sat, 22 Nov 2003 00:47:42 +0100, "Jos?Miguel" |