Board index » delphi » Calling 16 bit Dll from 32 bit program

Calling 16 bit Dll from 32 bit program

Hello to everybody,

How  do I call a 16 bit Dll from a 32 bit application?

If I call it by 'LoadLibrary' the Return Handle is 0.

Thank in advance

Gal and Ronit

 

Re:Calling 16 bit Dll from 32 bit program


Quote
Gal Betser wrote:
> Hello to everybody,

> How  do I call a 16 bit Dll from a 32 bit application?

Welcome to the wide and wonderful world of thunking.  If you have a copy
of Microsofts MSDN handy look up something called thunking.  Thunking is
a technique of using a 16-bit DLL in Win32 land.  Try it you'll like it
:)
Quote
> If I call it by 'LoadLibrary' the Return Handle is 0.

> Thank in advance

> Gal and Ronit

Re:Calling 16 bit Dll from 32 bit program


Quote
> How  do I call a 16 bit Dll from a 32 bit application?
> If I call it by 'LoadLibrary' the Return Handle is 0.

Have a look at my unoffical Win32 programming FAQ at
http://www.web-span.com/pjohnson/. At the moment there isn't a lot of
detail on this topic but it does give you the idea of where to go looking.
I hope to be adding some specific code examples for this problem in the
next few weeks.

Other Threads