Board index » delphi » Calling 16-bit DLL's from Delphi32?
petr...@sik.ppoy.fi (Petri Riipinen)
![]() Delphi Developer |
Fri, 07 Aug 1998 03:00:00 GMT
|
petr...@sik.ppoy.fi (Petri Riipinen)
![]() Delphi Developer |
Fri, 07 Aug 1998 03:00:00 GMT
Calling 16-bit DLL's from Delphi32?
Hi there.
I have written this one Delphi program which calls some Question: Can I just compile my program with Peace, -- |
zh..
![]() Delphi Developer |
Fri, 07 Aug 1998 03:00:00 GMT
Re:Calling 16-bit DLL's from Delphi32?Also, can 16bit appication calls 32 bit DLL? Can some expert answer such question? Thanks. QuotePetri Riipinen wrote: |
Martin Larsso
![]() Delphi Developer |
Sat, 08 Aug 1998 03:00:00 GMT
Re:Calling 16-bit DLL's from Delphi32?It is possible to call 16 bit DLL's from 32 bit progs and the other way around. It's no fun, and it's not portable (3.1, 95 does it differently, NT doesn't at all). Take a look at "Mix 16-bit and 32-bit Code in Your Applications with the Win32s Universal Thunk" In the November '93 issue of MSJ. M. -- |
David Samps
![]() Delphi Developer |
Sun, 09 Aug 1998 03:00:00 GMT
Re:Calling 16-bit DLL's from Delphi32?Quotezh...@newton.tuns.ca wrote: I had to explore this for the Win95 product we did last year at work. We I'll tell you how to do it, but be warned, it would be easier to just take The fundamental problem you're dealing with is tow fold: 1) differences in type sizes (i.e. 16 bit integers vs 32 bit integers). 2) Data segments in the 16 bit world. Remember that in the 32 bit world, In the early days of NT, the Evil Empire wanted all developers to switch to On the C++ Win95/NT SDK, there is a subdirectory that contains a critter So to start this explanation, let's say you have a 32 bit exe you just 1) Create a Thunk script file that declares all procedures and functions 2) Run the thunk compiler against this script. It will produce 2 asm The assembly files contain bits of code that adjust the size types of 3) Run MASM on the asm files to generate OBJ files. 4) Now here's where it gets tricky. Remember that you started with a 32 5) Once all that is built, your original 32 bit exe can call the original I told you this wouldn't be pretty. Also, the thunk compiler is virtually brain dead. We had function pointers There is a txt file on the SDK that explains all of this. The doc number It's been months since I've done this (early last summer) so this is all later david sampson //************************************************************* dsamp...@dca.com or dsamp...@atlanta.com |
Francis Pauwel
![]() Delphi Developer |
Sun, 09 Aug 1998 03:00:00 GMT
Re:Calling 16-bit DLL's from Delphi32?Quotezh...@newton.tuns.ca wrote: Francis Pauwelyn Francis.Pauwe...@ping.be 100572....@compuserve.com Http://ourworld.compuserve.com/homepages/Francis_Pauwelyn ---------- If you want it World, and you want it Wide, don't forget that Netscape's not the only ride... |
Francis Pauwel
![]() Delphi Developer |
Sun, 09 Aug 1998 03:00:00 GMT
Re:Calling 16-bit DLL's from Delphi32?QuoteMartin Larsson <martin.larsson@delfi_data.msmail.telemax.no> wrote: So I guess NT does it after all... Francis Pauwelyn |
Simon Wils
![]() Delphi Developer |
Mon, 10 Aug 1998 03:00:00 GMT
Re:Calling 16-bit DLL's from Delphi32?Quotepetr...@sik.ppoy.fi (Petri Riipinen) wrote: Win32s: 16-bit to 32-bit Win95: 16-bit to 32-bit WinNT: 16-bit to 32bit only Even worse is that the methods are different for all three cases, Best option is probably to use the generic thunks (works on NT and 95, When all said and done, if you have the source then convert everything Good luck! |
Jason Irb
![]() Delphi Developer |
Mon, 10 Aug 1998 03:00:00 GMT
Re:Calling 16-bit DLL's from Delphi32?Will this work under WIN95? I thought WIN95 did not support THUNKING? Thanks in advance, Jason |
Steve Teixeir
![]() Delphi Developer |
Tue, 11 Aug 1998 03:00:00 GMT
Re:Calling 16-bit DLL's from Delphi32?Quotezh...@newton.tuns.ca wrote: different Win32 platforms (Win32s, Win 95, Win NT). For calling 32-bit DLLs from 16-bit EXEs under Win 95 and Win NT, the easiest solution I've found is the Generic Thunk. You can get info on this from the MSDN, or (to insert a shameless plug) I'm developing code that does this which will appear in the 2nd edition of Delphi Developer's Guide. -- -Steve Teixeira |
Steve Teixeir
![]() Delphi Developer |
Tue, 11 Aug 1998 03:00:00 GMT
Re:Calling 16-bit DLL's from Delphi32?QuoteSteve Teixeira wrote: 16-bit DLLs from 32-bit EXEs under 95 and NT. -- -Steve Teixeira |
David Samps
![]() Delphi Developer |
Fri, 14 Aug 1998 03:00:00 GMT
Re:Calling 16-bit DLL's from Delphi32?QuoteJason Irby <Ja...@mps.lfwc.lockheed.com> wrote: I was doing this in the Win95 environment, but our target was both david sampson dsamp...@dca.com or dsamp...@atlanta.com |
David Samps
![]() Delphi Developer |
Fri, 14 Aug 1998 03:00:00 GMT
Re:Calling 16-bit DLL's from Delphi32?Quotezh...@newton.tuns.ca wrote: find out that Win95 apparently has a bunch of 16 bit code out there. So that proves it can be done. Look at this site for details: http://www.ora.com/windows/feat/dirty.html david sampson //************************************************************* dsamp...@dca.com or dsamp...@atlanta.com |
Steve Teixeir
![]() Delphi Developer |
Sun, 16 Aug 1998 03:00:00 GMT
Re:Calling 16-bit DLL's from Delphi32?QuoteJason Irby wrote: platforms: Universal Thunking, available under Win32s, allows you to call 16-bit code Generic Thunking, available under Win95 and NT, allows calling of 32-bit Flat thunking is available only under Win95. While this type of thunking -Steve Teixeira |
1. Calling a 16-bit dll in delphi32
2. Calling 16-bit DLL from a Delphi32 application
3. thunking (calling 16 bit dll's from 32 bit app)
5. Calling 16-bits DLL's from a 32-bit program
6. Calling 16-bit DLL's from Delphi 2.0
7. Calling 16 bit Dll from 32 bit program
8. call 16 Bit DLL from 32 Bit Delphi Application