Solved

32-bit application call 16-bit dll on Windows NT

Posted on 1997-11-06
3
327 Views
Last Modified: 2013-12-03
Is it possible for a 32 bit application call a third-party 16-bit dll, using Generic Thunk's WOWCallback16....? I can hardly find any example on it either from MSDN or Web.

If it's not possible, are there any other alternatives? The data exchange between applicaiton and DLL are of huge amount.

I would appreciate any hints or details!
0
Comment
Question by:DonLi
3 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 1408246
Generic Thunks allow a 16-bit Windows-based application to load and call a Win32-based DLL on Windows NT and Windows 95. A Win32-based application can load and call a 16-bit DLL on Windows 95 using a thunk compiler.
0
 
LVL 1

Expert Comment

by:Tiutin
ID: 1408247
Windows 95 implements a thunking model called flat thunks. Flat thunks allow 32-bit code to call functions implemented in 16-bit code. They also allow 16-bit code to call functions implemented in 32-bit code. Windows NT does not support flat thunks. Therefore, if you use flat thunks, your application cannot run on Windows NT unless you isolate your thunking code into platform-specific DLLs.

Windows NT uses a different thunking model. Windows NT supports generic thunks, which allow 16-bit code to call functions implemented in 32-bit code. Although Windows 95 supports generic thunks, it does not support the underlying process model used by Windows NT. This means that generic thunking code might not work identically under Windows 95 and Windows NT.

So, there seems to be no answer.
0
 
LVL 3

Accepted Solution

by:
vinniew earned 100 total points
ID: 1408248
You can't load a 16-bit process into a 32-bit process, so no matter what, data has to cross a process boundary.  That's going to cause extra overhead, always.

You could try to write a 16-bit app that uses a global piece of memory to communicate with a 32-bit app.  That's the fastest way that I've seen/used.  Write the 16-bit app to use the .dll and then set global flags when its time to pass data back and forth.

Just don't use pointers (or convert them yourself) and you should be ok.

V

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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 describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…

860 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