Limitations on What a Target DLL Can Do
Before debugging your thunks, keep in mind that there are some limitations on what a target DLL can do from code executed through a thunk. Common specific limitations include:
-
You cannot create threads inside a thunk from a 16-bit Windows-based application to a Win32-based DLL.
-
The code inside Win32-based DLLs called by thunks should require little stack space because the calling 16-bit processes have much smaller stacks than do 32-bit processes.
-
16-bit DLLs that contain interrupt service routines (ISRs) must not thunk to Win32-based DLLs while handling interrupts.
-
Win32-based applications must not pass pointers to data located on the stack as parameters of thunks; nor can they call 16-bit DLLs that switch stacks.