Strategy For Debugging Thunks

The best strategy for debugging thunks is to divide the task into small, manageable tests. This approach is relatively easy and can eliminate most problems, without requiring advanced debugging techniques, such as tracing through assembly language code in a system-level debugger. Flat thunks consist of a Win32-based DLL and a 16-bit DLL, so it is possible to test each of these in isolation before testing them together. Create a 16-bit Windows-based application to test the 16-bit DLL, and create a Win32-based application to test the Win32-based DLL. Doing so allows you to use a wide variety of debugging tools to verify that each side works properly.