Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to call 16bitDLL from 32bitAPP?

Posted on 1997-11-02
1
Medium Priority
?
194 Views
Last Modified: 2013-12-03

HellO!

Win95 includes a DLL, called DISPDIB.DLL. I need to call a function in
this DLL, twice: once at the beginning, and once at the end.
Unfortunately, it is not directly possible to call a 16bit function from
32bit code. I have had a 16bit program working that calls the proper
function in the DLL, so I know it works... but I need to write a 32bit
program of course.

I have read about thunking, and it will probably not be as hard because
I do not need to translate any pointers, as I am not passing any. Is
there any way to do this without assembly? It seems to me that
translating pointers and sizes would be a perfectly mechanical process,
and there should be a Thunk() function. Is there one? I think it would
be silly of MS not to have included something along those lines.

ALTERNATIVELY, is it possible to use DDE instead? Instead of
thunking I would like to set up a tiny 16-bit "server" that operates
this DLL, and allows my client (32bit app) to send it messages. Can this
be done through SendMessage? I don't need to pass/translate any
pointers, but I do need to return focus to the client.
Can I pass the client hWnd to the server, and have the server give focus
to the client? If I spawn the server from the client, how do I get its
hWnd in order to send a message to it?

thanks!
dto@iname.com
0
Comment
Question by:davidotoole
1 Comment
 
LVL 7

Accepted Solution

by:
faster earned 300 total points
ID: 1408132
I think the easiest way is to use the WM_COPYDATA message, since the amount your data is quite small.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question