Solved

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

Posted on 1997-11-06
3
326 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Multi Table MS Access Query 5 76
how to have excel show file name on the title bar 4 49
Application vs Workbook.applicaiton 3 35
SignTool Error with Windows 10 5 148
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
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…

810 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