诸暨麻将添加redis
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

70 řádky
1.8 KiB

  1. // 下列 ifdef 块是创建使从 DLL 导出更简单的
  2. // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 CREATE_DUMP_EXPORTS
  3. // 符号编译的。在使用此 DLL 的
  4. // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
  5. // CREATE_DUMP_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
  6. // 符号视为是被导出的。
  7. #ifndef __linux__
  8. #ifdef CREATE_DUMP_EXPORTS
  9. #define CREATE_DUMP_API __declspec(dllexport)
  10. #else
  11. #define CREATE_DUMP_API __declspec(dllimport)
  12. #endif
  13. #else
  14. #define CREATE_DUMP_API __attribute__ ((visibility("default")))
  15. #endif
  16. // 此类是从 create_dump.dll 导出的
  17. //class CREATE_DUMP_API Ccreate_dump {
  18. //public:
  19. // Ccreate_dump(void);
  20. // // TODO: 在此添加您的方法。
  21. //};
  22. //
  23. //extern CREATE_DUMP_API int ncreate_dump;
  24. //
  25. //CREATE_DUMP_API int fncreate_dump(void);
  26. #pragma once
  27. #pragma message("Using include dir's ExceptionReport")
  28. #ifndef RSExecptionTString
  29. #include <string>
  30. typedef std::basic_string<TCHAR> RSExecptionTString;
  31. #endif
  32. class CREATE_DUMP_API CExceptionReport
  33. {
  34. public:
  35. CExceptionReport();
  36. ~CExceptionReport();
  37. static LONG WINAPI UnhandledExceptionFilter(PEXCEPTION_POINTERS pExceptionInfo);
  38. private:
  39. static const RSExecptionTString FormatCurrentTimeString();
  40. static bool writeMiniDump(PEXCEPTION_POINTERS pExceptionInfo);
  41. static void SuspendThreads();
  42. static LPTOP_LEVEL_EXCEPTION_FILTER m_previousExceptionFilter;
  43. static TCHAR m_pDmpFileName[MAX_PATH];
  44. static HANDLE m_hDumpFile;
  45. static void InvalidParameterHandler(const wchar_t* expression,
  46. const wchar_t* function,
  47. const wchar_t* file,
  48. unsigned int line,
  49. uintptr_t pReserved);
  50. static BOOL m_bFirstRun;
  51. static _invalid_parameter_handler s_fnInvalidParameterHandler;
  52. };
  53. extern CExceptionReport ExceptionReport; //global instance of class