Solved

How to call 16bitDLL from 32bitAPP?

Posted on 1997-11-02
1
164 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
faster earned 100 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

752 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