Calling 16 bit Dll from 32 bit program

Calling 16 bit Dll from 32 bit program

Post by Gal Betse » Mon, 19 May 1997 04:00:00



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

 
 
 

Calling 16 bit Dll from 32 bit program

Post by Paul Whittingto » Mon, 19 May 1997 04:00:00



> 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


 
 
 

Calling 16 bit Dll from 32 bit program

Post by Peter Johnso » Tue, 20 May 1997 04:00:00


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.
 
 
 

1. Calling a 16 bits DLL from a 32 bits program

Hi everybody,

I'm very sorry to ask such a basic question, but i'm very new in
programing on Windows platform.

I just need to call a 16 bits DLL from a 32 bits program running on
Win95 or WinNT.
It does not work. I tried with Excel, Visual Basic, or a C test program
: I can't load the library. (LoadLibrary failed).
If I try to load a 32 bits DLL, it works fine.
So, what am I suppose to do ?
What do I need in my C program (I just used "LoadLibrary, then
GetProcAddress) ? Is there particular declaration ?
Is it necessary to modify the 16 bits DLL ? or any related file ?
Is there some parameter to set in Windows 95 ?

Thanks a lot for help.
Bernard Faure

2. Download Accelerator Plus & Zone Alarm?

3. What's better: 16 or 32 bits dll's for 16 bits programs?

4. HD New Partition

5. Calling 16-bit DLLs from 32-bit Apps

6. Unable to copy a very larger file from the CD to hard disk

7. Problem: Creating dialog box from 32 bit DLL called from 16 bit app.

8. Windows update site on the blitz?

9. Win 3.11 -> Can 32-bit app call 16-bit DLL?

10. use 16-bit DLL in 32-bit program by VC4.0

11. 16 bit DLL in 32 bit program

12. Porting 16 bit DLL to 32 bit DLL ?

13. 16 bits Dll to 32 bits Dll