BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ){ HWND currentHwnd_ = FindWindow(NULL, L"Debugger"); switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: { appThread* t = new appThread; QEventLoop loop; loop.exec(); } break; case DLL_THREAD_ATTACH: SendMessage(currentHwnd_, WM_SETTEXT, 0, (long)_T("DLL_THREAD_ATTACH...")); break; case DLL_THREAD_DETACH: SendMessage(currentHwnd_, WM_SETTEXT, 0, (long)_T("DLL_THREAD_DETACH...")); break; case DLL_PROCESS_DETACH: SendMessage(currentHwnd_, WM_SETTEXT, 0, (long)_T("DLL_PROCESS_DETACH...")); break; } return TRUE;}