SDC C-Project CF Review 프로그램
LYW
2021-07-29 bd13fa3f9396f1f681759f4623c55d5f91d74a9c
ReviewSystem/ReviewSystem/stdafx.h
@@ -38,6 +38,9 @@
#include "CHReviewResult/GlassResult.h"
#include "CHReviewSetting/MotorParameter.h"
#include <DbgHelp.h>
#pragma comment ( lib, "DbgHelp" )
#include <WinNetWk.h>
//#pragma comment(lib,"Mpr.lib")
@@ -404,3 +407,29 @@
};
BOOL KillProcess(CString ProcessName);BOOL getStateProcess(CString ProcessName);
// 선언
static LONG CALLBACK TopLevelExceptionFilterCallBack(EXCEPTION_POINTERS* exceptionInfo);
LONG CALLBACK TopLevelExceptionFilterCallBack(EXCEPTION_POINTERS * exceptionInfo)
{
   MINIDUMP_EXCEPTION_INFORMATION dmpInfo = { 0 };
   dmpInfo.ThreadId = ::GetCurrentThreadId(); // Threae ID
   dmpInfo.ExceptionPointers = exceptionInfo; // Exception Info
   dmpInfo.ClientPointers = FALSE;
   CTime time;
   CString strStamp;
   SYSTEMTIME   currentTime;
   ::GetLocalTime(&currentTime);
   time = CTime::GetCurrentTime();
   strStamp.Format(_T("Dump\\%02d_%02d_%02d_%02d_%02d_%02d.dmp"), time.GetYear(), time.GetMonth(), time.GetDay(), time.GetHour(), time.GetMinute(), time.GetSecond());
   HANDLE hFile = CreateFile(strStamp, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
   // 덤프 생성
   BOOL bWrite = ::MiniDumpWriteDump(::GetCurrentProcess(), ::GetCurrentProcessId(), hFile, MiniDumpNormal, &dmpInfo, NULL, NULL);
   return 0L;
}