Board index » delphi » thunking 16 bit to 32 bit

thunking 16 bit to 32 bit

I want to call a 32 bit DLL from a 16 bit Delphi
app.  I have read the Win32 SDK and know what to
do.

The functions to be called are not in Delphi's
Wintypes unit (LoadLibraryEx32W is one of them).  
They are only meaningful when running a 16 bit app
on Win95/NT and are part of WOW.

Does anybody know what DLL they might be in so I
can write an import library or if anyone has done
it are they willing to share it.

Post reply here or email to
strayli...@southcom.com.au

Cheers
Rodney Delanty

 

Re:thunking 16 bit to 32 bit


Quote
Rodney Delanty wrote:

> I want to call a 32 bit DLL from a 16 bit Delphi
> app.  I have read the Win32 SDK and know what to
> do.

> The functions to be called are not in Delphi's
> Wintypes unit (LoadLibraryEx32W is one of them).
> They are only meaningful when running a 16 bit app
> on Win95/NT and are part of WOW.

> Does anybody know what DLL they might be in so I
> can write an import library or if anyone has done
> it are they willing to share it.

> Post reply here or email to
> strayli...@southcom.com.au

> Cheers
> Rodney Delanty

They are in the KERNEL.
Stevie Texiera has in his book Delphi2.0 developers Guide a unit WOW16
interfaced the api calls and convertion of 16 bit poineters to 32-bit.
Search for WOW16 WOW32 or buy the Book.

I have looked in to this and It seams to work fine if you have the DLL
compiled in Delphi2.0. But if you have the DLL in C++ you run randome in
to a Page fault error. If any one have working sample code or input on
how to get pascal 16.exe call C++32.DLL.
-please let me know.

Fredrik
Work: Fredrik.L...@Liber.se
home: Fredrik.L...@mailbox.swipnet.se

Re:thunking 16 bit to 32 bit


Quote
Rodney Delanty <aa...@ozemail.com.au> wrote:
>I want to call a 32 bit DLL from a 16 bit Delphi
>app.  I have read the Win32 SDK and know what to
>do.

>The functions to be called are not in Delphi's
>Wintypes unit (LoadLibraryEx32W is one of them).  
>They are only meaningful when running a 16 bit app
>on Win95/NT and are part of WOW.

>Does anybody know what DLL they might be in so I
>can write an import library or if anyone has done
>it are they willing to share it.

Steve Texeira has posted his WOW16 unit here a while back:

Quote
>From: "Steve Teixeira" <steixe...@corp.borland.com>
>Newsgroups: comp.lang.pascal.delphi.misc
>Subject: Re: Calling 32-bit DLLs from Delphi 1.0?
>Date: 7 Jan 1997 21:54:08 GMT
>Message-ID: <01bbfce5$4c16e5e0$8d60b...@stevet.borland.com>

If you cannot find this unit, you may want to try CALL32NT.zip
(available, for instance, from the Delphi Super Page).

If you cannot find any of the above feel free to contact me and I will
send them via email.

If you manage to get it to work I would be very happy to learn how you
did it - I am trying to call a 32bit DLL from Delphi 1, but already
the LoadLibraryEx32W fails with a GPF.
--
Stefan.Hoffmeis...@Uni-Passau.de
http://www.rz.uni-passau.de/~w4hoff01/
University of Passau, Bavaria, Germany

Other Threads