diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-06-09 19:03:05 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-06-09 19:03:05 +0400 |
commit | 3076657af5bfdbf13fdcc81ddd1a75b785d7ffc7 (patch) | |
tree | 7848e00c035a6c02e3622bd2154975843b27c15b /src | |
parent | d93173e3af0cacc4b295e3fb2f588d6e0c59b5fe (diff) |
MiniDump.cpp: remove the exe directory from the search path for dbghelp.dll
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@5058 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src')
-rw-r--r-- | src/mpc-hc/MiniDump.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/mpc-hc/MiniDump.cpp b/src/mpc-hc/MiniDump.cpp index 5f0529753..82cc782f2 100644 --- a/src/mpc-hc/MiniDump.cpp +++ b/src/mpc-hc/MiniDump.cpp @@ -90,29 +90,13 @@ LONG WINAPI CMiniDump::UnhandledExceptionFilter( _EXCEPTION_POINTERS *lpTopLevel LONG retval = EXCEPTION_CONTINUE_SEARCH;
HMODULE hDll = NULL;
TCHAR szResult[800];
- TCHAR szDbgHelpPath[_MAX_PATH];
CString strDumpPath;
if ( !m_bMiniDumpEnabled ) {
return retval;
}
- // firstly see if dbghelp.dll is around and has the function we need
- // look next to the EXE first, as the one in System32 might be old
- // (e.g. Windows 2000)
-
- if ( GetModuleFileName(NULL, szDbgHelpPath, _MAX_PATH) ) {
- TCHAR *pSlash = _tcsrchr( szDbgHelpPath, _T('\\') );
- if ( pSlash != NULL ) {
- _tcscpy_s( pSlash + 1, _MAX_PATH + szDbgHelpPath - pSlash, _T("dbghelp.dll") );
- hDll = ::LoadLibrary( szDbgHelpPath );
- }
- }
-
- if ( hDll == NULL ) {
- // load any version we can
- hDll = ::LoadLibrary( _T("dbghelp.dll") );
- }
+ hDll = ::LoadLibrary( _T("dbghelp.dll") );
if ( hDll != NULL ) {
MINIDUMPWRITEDUMP pMiniDumpWriteDump = (MINIDUMPWRITEDUMP)::GetProcAddress( hDll, "MiniDumpWriteDump" );
|