Link to home
Start Free TrialLog in
Avatar of gejianye
gejianye

asked on

Help me,please!(A question about DLL)

How to call the functions of the 16-bit
DLL in the windown95/98?
Thanks a lot!
Avatar of gejianye
gejianye

ASKER

I have only a DLL file(16-bit),but I must use VC6.0 to load the function in this file.How can I do this?
Avatar of Zoppo
Hi gejianye,

This is from MSDN:

------------------------------------------------------------------------------------------------------
You can't call directly from a 32-bit program to a 16-bit program (nor the other way around). However, with some restrictions, you can construct a "thunk," or a special chunk of code that translates the call for you.
Check out the section on the "Thunk Compiler" in the "Programmer's Guide to Windows 95" in the Win32 SDK, available in the MSDN Library or in the Visual C++ documentation. Note that you can't call 16-bit DLLs from 32-bit applications under Windows NT—only under Windows 95.
------------------------------------------------------------------------------------------------------

In this 'Thunk compiler' section you can find any desciption you need to do this.

I hope that helps,

ZOPPO
In simple ,you would like to call a 16 bit function from 32 bit code and I use thunking mechanism .Following   those steps: create 16 bit dll, create thunk script, compile with thunk.exe and I obtain the obj.

a DDE server can also do this..
How to do this with DDE?
Sorry.I'm not very familiar with DDE and it's old tech.
You can use thunking mecanism.
Maybe another expert can help on the DDE,i'm sure.
But You can use WM_COPYDATA to pass the params
Regards
W.Yinan
ASKER CERTIFIED SOLUTION
Avatar of danelroisman
danelroisman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
danelroisman ,you should not answer for it's same to comments.You should answer him how do that using DDE or leave it unlocked to make more experts give information here.Otherwise,I have already answered.
According to Wyn's last comment I don't think danelroisman deserves the points (since his comment doesn't provide any new information).