home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 217 / DPCS0306DVD.ISO / Toolkit / Internet / FileZilla / Server / FileZilla_Server-0.9.11.exe / source / misc / ExceptionReport.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-08-29  |  1.9 KB  |  59 lines

  1. // FileZilla - a Windows ftp client
  2.  
  3. // Copyright (C) 2004 - Tim Kosse <tim.kosse@gmx.de>
  4.  
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU General Public License
  7. // as published by the Free Software Foundation; either version 2
  8. // of the License, or (at your option) any later version.
  9.  
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14.  
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  
  19. // OptionsTypePage.cpp: Implementierungsdatei
  20. //
  21.  
  22. #pragma once
  23.  
  24. class CExceptionReport
  25. {
  26. public:
  27.     CExceptionReport();
  28.     ~CExceptionReport();
  29.  
  30.     static LONG WINAPI UnhandledExceptionFilter(PEXCEPTION_POINTERS pExceptionInfo);
  31.  
  32. private:
  33.     static void CreateReport(PEXCEPTION_POINTERS pExceptionInfo);
  34.  
  35.     static void StackWalk(CONTEXT Context);
  36.     static BOOL GetAddrDetails(PVOID addr, PTSTR szModule, DWORD len, DWORD& section, DWORD& offset);
  37.     static bool writeMiniDump(PEXCEPTION_POINTERS pExceptionInfo);
  38.     static LPTSTR GetExceptionString(DWORD dwCode);
  39.  
  40.     static int sendMail();
  41.     static void SuspendThreads();
  42.  
  43.     static void AddToReport(const WCHAR * pText);
  44.     static void AddToReport(const char * pText);
  45.     static void AddToReport(int number);
  46.     static void AddToReportHex(_int64 number, int minDigits = 0);
  47.  
  48.     static LPTOP_LEVEL_EXCEPTION_FILTER m_previousExceptionFilter;
  49.     static TCHAR m_pLogFileName[MAX_PATH];
  50.     static HANDLE m_hReportFile;
  51.     static TCHAR m_pDmpFileName[MAX_PATH];
  52.     static HANDLE m_hDumpFile;
  53.     
  54.     static BOOL m_bFirstRun;
  55. };
  56.  
  57.  
  58. extern CExceptionReport ExceptionReport; //global instance of class
  59.