Platform SDK: Win32 API |
After you compile the thunk script to create the 32-bit side of the thunk, you must create the Win32-based thunk DLL. To implement the Win32-based thunk DLL, use the following steps:
To implement the Win32-based thunk DLL
BOOL WINAPI XXX_ThunkConnect32(LPSTR pszDll16, LPSTR pszDll32, DWORD hInst, DWORD dwReason);
Here is an example of a DLL entry-point function calling XXX_ThunkConnect32:
BOOL WINAPI DllMain(DWORD hInst, DWORD dwReason, DWORD dwReserved) { if( !(XXX_ThunkConnect32( "DLL16.DLL", // name of 16-bit DLL "DLL32.DLL", // name of 32-bit DLL hInst, dwReason)) ) { return FALSE; } // Process dwReason. Return TRUE; }
EXPORTS XXX_ThunkData32