[Frhed-commits] SF.net SVN: frhed:[607] trunk/FRHED/main.cpp
Brought to you by:
kimmov
From: <jt...@us...> - 2009-05-03 10:24:57
|
Revision: 607 http://frhed.svn.sourceforge.net/frhed/?rev=607&view=rev Author: jtuc Date: 2009-05-03 10:24:54 +0000 (Sun, 03 May 2009) Log Message: ----------- Prepare for optional System32 build configuration to work with OS-supplied msvcrt.dll Modified Paths: -------------- trunk/FRHED/main.cpp Modified: trunk/FRHED/main.cpp =================================================================== --- trunk/FRHED/main.cpp 2009-05-03 08:04:12 UTC (rev 606) +++ trunk/FRHED/main.cpp 2009-05-03 10:24:54 UTC (rev 607) @@ -64,7 +64,7 @@ LPWSTR szExePath = GetCommandLineW(); LPWSTR szCmdLine = PathGetArgsW(szExePath); - + // Load the heksedit component. static const TCHAR pe_heksedit[] = _T("heksedit.dll"); hMainInstance = LoadLibrary(pe_heksedit); @@ -176,10 +176,13 @@ DispatchMessage(&msg); } } - - FreeLibrary(hMainInstance); +#ifdef _DEBUG + // The System32 build cannot safely FreeLibrary(hMainInstance) because + // frhed.exe and heksedit.dll share the same atexit list. + ::FreeLibrary(hMainInstance); + _CrtDumpMemoryLeaks(); +#endif OleUninitialize(); - _CrtDumpMemoryLeaks(); return msg.wParam; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |