Print this window

// This is from the calling application
 
// This one passes in the handles to the app and to the DLL
typedef void (__stdcall *setDLLHandle)(HINSTANCE);
setDLLHandle setWTPSDLLKeyHandle;

setWTPSDLLKeyHandle = (setDLLHandle)GetProcAddress(hinstDLL, "setWTPSDLLKeyHandle");
if (!setWTPSDLLKeyHandle)
Application->MessageBox("Could not set handles in DLL",
"Aborting", MB_OK);
else
{
setWTPSDLLKeyHandle(hinstDLL); // hinstDLL was the returned module handle from the LoadLibary function
} // End the else

// This is the in dll itself
extern "C" __declspec(dllexport)
__stdcall void setWTPSDLLKeyHandle(HINSTANCE hs)
{
hPrintInstDLL = hs;
} // End the setDLLKeyHandle function