RE:WIN16 DLL in WIN32 System
Ha pasado mucho tiempo desde que pusiste este mensaje, espero aún te sea útil. Es un texto que encontre en la web.
Calling 16-bit Code from Win32-based Apps in Windows 95
PSS ID Number: Q125715
Authored 02-Feb-1995 Last modified 01-Jun-1995
The information in this article applies to:
- Microsoft Win32 Software Development Kit (SDK)
SUMMARY
As a developer, you may need to access the functionality provided by a 16-
bit DLL from your Win32-based applications. This is true particularly when
you do not have the source code for the DLL so that you can port it to
Win32. This article discusses the mechanism by which Win32-based DLLs can
call Windows-based DLLs. The mechanism is called a thunk and the method
implemented under Windows 95 is called a flat thunk.
The three major steps in writing the thunk code are:
1. Creating the Thunk Script
2. Building the Win32-based DLL
3. Building the Windows-based DLL
MORE INFORMATION
The recommended way to design a thunk call is to isolate all thunk
specific code in DLLs (a 16-bit DLL and a 32-bit DLL, to provide both sides
of the thunk). That way, you can install certain DLLs on one platform and
replace them on another platform, for portability.
Designing a new flat thunk involves creating a thunk script (.THK file).
This script is compiled with the Thunk Compiler into an assembly file. This
file is assembled using two different flags: -DIS_32 and -DIS_16. This
allows you to create both the 16-bit and 32-bit object modules. These
object modules are linked in the Windows-based and Win32-based DLLs%