How to call a 16-bit dll in a 32-bit application 
Author Message
 How to call a 16-bit dll in a 32-bit application

I would like to call a function in a 16-bit Windows-DLL from a 32-bit
application. The conventional method using the declare statement doesn't
work of course. So I am in sort of a fix. Could anybody please tell me
if making such a call is possible and if so how to make the call.

Arnoud.



Sun, 07 Nov 1999 03:00:00 GMT  
 How to call a 16-bit dll in a 32-bit application


Quote:

>I would like to call a function in a 16-bit Windows-DLL from a 32-bit
>application. The conventional method using the declare statement doesn't
>work of course. So I am in sort of a fix. Could anybody please tell me
>if making such a call is possible and if so how to make the call.

You need to write a 32bit DLL which "thunks" into the 16bit DLL.  Although
not impossible, it is probably impractical.  So offhand, I'd say you are
still in a fix.

However, if you have a lot of money to spend I would be willing to write
the DLL.

John Anderson
Algorithm Engineering



Sun, 07 Nov 1999 03:00:00 GMT  
 How to call a 16-bit dll in a 32-bit application

Quote:


> >I would like to call a function in a 16-bit Windows-DLL from a 32-bit
> >application. The conventional method using the declare statement doesn't
> >work of course. So I am in sort of a fix. Could anybody please tell me
> >if making such a call is possible and if so how to make the call.

> You need to write a 32bit DLL which "thunks" into the 16bit DLL.  Although
> not impossible, it is probably impractical.  So offhand, I'd say you are
> still in a fix.

> However, if you have a lot of money to spend I would be willing to write
> the DLL.

> John Anderson
> Algorithm Engineering

If you want to avoid thunking and can use Visual Basic then you can wrap
your 16 Bit DLL in an OLE server.  You then access the OLE server from
your 32 bit application. It's not the best solution and I haven't tried
it myself yet but it works.

Julian Atkinson.



Sun, 07 Nov 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. calling a 16-bit dll from a 32-bit application

2. Calling 32-bit DLLs from 16-bit-Applications

3. Need Help calling 16-bit from 32-bit application

4. Calling 16 bit DLL's in VB5 ENV(32 bit)

5. calling a 16-bit dll from VB 32-bit

6. Need to write 32-bit DLL to do 16-bit calls to a software interrupt

7. Calling 16 bit DLL from 32 bit app

8. Can VB4.0 32 Bit call a 16 bit DLL

9. Thunking, 16-bit app calls 32-bit DLL???

10. 32 Bit Program to call 16 Bit DLL

11. Advantages of 32 bit applications over 16 bit applications

 

 
Powered by phpBB® Forum Software