/*
Module : EXCEPTHANDLER.CPP
Purpose: Implementation for a class which intercepts and logs details about unhandled exceptions
such as access violations, stack overflows and division by zero.
The class is based upon the February 2002 MSDN article called "Under the Hood: Improved
Error Reporting with DBGHELP 5.1 by Matt Pietrek.
References:
Bugslayer, MSJ, August 1998 by John Robbins, http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0898/bugslayer0898.htm
Under the Hood, MSDN, March 2002 by Matt Pietrek, http://msdn.microsoft.com/msdnmag/issues/02/03/Hood/Hood0203.asp
Created: PJN / 14-03-2002
History: PJN / 20-03-2003 1. Now includes flags to limit what is displayed in the log file.
2. These flag values and the location of the log file can now optionally be configured at
run time via registry values.
PJN / 26-03-2003 1. Tidied up #pragma message text
2. Removed the unused variable m_bAppendToLog
3. Changed the default flags the class uses
4. Flag values and location of the log file can now optionally be configured at run time
via an API in the XCPTHLR dll ifself. This is now documented and implemented in the XCPTHLR
module.
5. Reworked the sample app to be a GUI based app, where you can change the crash handler
flags manually. Also the crash is now generated by hitting a button.
PJN / 27-03-2003 1. Now pulls in DbgHelp support via GetProcAddress. This makes the code more robust in the absence
of the DbgHelp dll
PJN / 19-04-2003 1. Now optionally writes out the raw machine code at each call stack frame
2. Now optionally writes out the raw stack at each call stack frame.
3. Now optionally writes out the process list on the machine
4. Now optionally writes out system details including Computer Name, User Name, Number of Processors,
Page Size, lowest memory address, highest memory address, OS details, OS version, OS Build, OS
service pack, OS type, Windows Directory, Windows System Directory, Registered Organisation
and Registered User.
5. Now optionally writes out the environment strings
6. Tidied up some indentation and alignment problems.
PJN / 20-04-2003 1. Removed usage of CRT function "_tcsicmp" in preference to lstrcmpi
2. Removed old unused pragma error entry
3. Now optionally writes out stats as returned from GlobalMemoryStatus
4. Code now requires a recent copy of the Platform SDK to compile
5. Now optionally writes out display device stats
6. Now optionally writes out Code page stats
7. Now optionally writes out Locale and language stats
8. Now optionally writes out boot type
PJN / 22-04-2003 1. Fixed a problem in LogRawMemory which was causing an access violation.
2. Now uses GetDC and GetDevCaps to report screen settings instead of EnumDisplaySettings as
a more reliable mechanism.
PJN / 01-06-2003 1. Now optionally logs the File Version details for all processes and dlls which are included
in the log files.
PJN / 19-11-2003 1. Fixed a bug in CExceptionLogger::GetAddressDetails in the usage of VirtualQuery. Thanks to
Fredrik Savander for reporting this problem.
PJN / 21-07-2006 1. Updated copyright details.
2. Integrated the functionality of _EXCEPTION_LOGGER_DATA into the CExceptionLogger class
3. Code now uses newer C++ style casts instead of C style casts.
4. Updated the code to clean compile on VC 2005
5. Now includes support for logging of Windows Longhorn Server and Windows Vista
6. Now includes support for logging of Windows Server 2003 R2
9. Now includes support for logging of various suite flags including: Embedded, Storage Server,
Security Appliance, BackOffice components, MS Small Business Server, Enterprise Edition, Terminal Services,
Datacenter Edition, Home Edition, Web Edition, Media Center Edition, Tablet Edition
10. Updated documentation to use the same style as the web site.
11. Now logs the GDI and User object count.
12. Now reports Page Faults, Peak Working Set Size, Working Set Size, Peak Paged pool, Paged pool usage
Peak Non-paged pool usage, Non-paged pool usage, Peak Pagefile usage and Pagefile usage.
13. Now reports if running on Wow64
14. Now reports the process handle count
15. Now reports if the process is running in a terminal services environment
16. Now reports the Terminal services Session id value
17. Updated code to work correctly for x64 Windows.
18. Exception log file can now be accessed by other apps while CExceptionLogger is writing to it.
19. Now reports the info returned from GetNativeSystemInfo
20. Now reports the info returned from GetSystemWow64Directory
21. Now reports if 3D-Now, cmpxchg, Floating point software emulation, Pentium FDIV bug, MMX, DEP,
PAE, RDTSC, SSE, SSE2, SSE3, cmpxchg16b and cmp8xchg16 are supported
22. Now reports the Shared Windows directory
23. Now reports if the program is running on the Terminal Services session currently attached to the
physical console
24. Now reports on various Terminal Services values returned from WTSQuerySessionInformation
25. Now reports the total number of pages commited by the system, the current maximum number of page commits,
the maximum number of page commit totals since last reboot, the total amount of physical memory in pages,
the amount of physical memory available to user process in pages, the total amount of system cache memory in
pages, the total amount of the sum of paged and nonpaged kernel pools in pages, the total amount of paged
kernel pool in pages, the total amount of nonpaged kernel pool in pages, the size of a page, the total
number of open handles, the total number of processes and the total number of threads.
26. Added support for returning information from WTSQuerySessionInformation.
27. Memory dump is shown as upper case hex now.
28. Now reports the info returned from GetCurrentHwProfile
29. Segment registers are now shown as 4 byte values
PJN / 22-01-2008 1. Updated to support creating minidumps
2. The location for the logging file and the minidump file is now your temp directory. This means
that files will be correctly created even with least-privileged user account
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
记录程序崩溃时异常时的日志信息。 a freeware C++ class and DLL which intercepts and logs details about unhandled exceptions such as access violations, stack overflows and division by zero. The class was originally based upon the February 2002 MSDN article called "Under the Hood: Improved Error Reporting with DBGHELP 5.1 by Matt Pietrek.
资源推荐
资源详情
资源评论
收起资源包目录
exceptionlogger_001.zip (28个子文件)
XCPTHLR.h 3KB
XCPTHLR.dsw 1KB
StdAfx.cpp 205B
ExceptionLogger.htm 17KB
resource.h 411B
XCPTHLR.dsp 7KB
Crasher
Crasher.cpp 493B
StdAfx.cpp 27B
resource.h 1KB
CrasherDlg.cpp 9KB
Crasher.dsp 7KB
CrasherDlg.h 687B
StdAfx.h 469B
Crasher.h 281B
Release
Crasher.pdb 2.81MB
Crasher.exe 56KB
XCPTHLR.dll 108KB
dbghelp.dll 1.01MB
Crasher.rc 6KB
res
Crasher.rc2 399B
Crasher.ico 1KB
StdAfx.h 459B
Release
XCPTHLR.RC 3KB
XCPTHLR.def 194B
ExceptHandler.cpp 95KB
XCPTHLR.cpp 848B
naughter.css 917B
ExceptHandler.h 12KB
共 28 条
- 1
资源评论
cndu
- 粉丝: 1
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功