Files
2022-10-26 12:25:11 +08:00

140 lines
3.1 KiB
C++

// CrashReportDlg.h : 헤더 파일
//
#pragma once
#include "afxcmn.h"
#include "CCrashInfo.h"
#include "MapProcess.h"
#include "ProcessManager.h"
#include "DumpProcess.h"
#include <algorithm>
#include <list>
#include <Map>
#include "afxwin.h"
#include "DlgMailSender.h"
enum eSTRINGTABLE
{
eSTRINGTABLE_NUMBER = 0,
eSTRINGTABLE_CRASHLINE,
eSTRINGTABLE_CRASHMODULE,
eSTRINGTABLE_CRASHADDR,
eSTRINGTABLE_CRASHFUNC,
eSTRINGTABLE_CRASHCOUNT,
eSTRINGTABLE_CRASHPERCENT,
eSTRINGTABLE_CRASHSHOW,
eSTRINGTABLE_TABLEMAX,
};
struct ExceptionListStruct
{
//user info
DWORD ExceptionAddr;
int versionInfo;
sExceptionInfomation ExceptionInfo;
int ExceptionListCount;
TCHAR ExceptionshowString[256];
//덤프 파일 이름 정보
std::vector<CString> FindDumpMemoryList_;
ExceptionListStruct() :
ExceptionAddr(0),
ExceptionInfo(),
versionInfo(-1),
ExceptionListCount(1)
{
FindDumpMemoryList_.clear();
memset(ExceptionshowString,0,sizeof(TCHAR)*256);
}
void OnInit()
{
ExceptionInfo.OnInit();
ExceptionAddr = 0;
versionInfo = -1;
ExceptionListCount = 1;
FindDumpMemoryList_.clear();
memset(ExceptionshowString,0,sizeof(TCHAR)*256);
}
bool operator== (const DWORD rhs )
{
if(ExceptionAddr == rhs)
return true;
return false;
}
};
// CCrashReportDlg 대화 상자
class CCrashReportDlg : public CDialog
{
// 생성입니다.
public:
CCrashReportDlg(CWnd* pParent = NULL); // 표준 생성자입니다.
// 대화 상자 데이터입니다.
enum { IDD = IDD_CRASHREPORT_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 지원입니다.
private:
CListCtrl cListCtrl_CrashInfo_;
CListBox ListExceptionDmpFile_;
CListBox ResultDumpListView_;
CListBox CallStackList_;
CDlgMailSender DialogMailSender_;
std::vector<ExceptionListStruct> ExceptionListStruct_List_;
std::vector<CString> NotFindDumpMemoryList_;
std::map<CString,CDumpProcess> DumpFileList_;
//내부 셋팅 함수 입니다.
private:
bool SetListCtrlPush(const ExceptionListStruct& info,int cell);
void ReleaseFileSetting();
// 구현입니다.
protected:
HICON m_hIcon;
// 생성된 메시지 맵 함수
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
afx_msg void OnLoaddir();
afx_msg void OnLoadpdb();
public:
bool GetFolderPath(CString& Path);
void InitListCtrl();
afx_msg void OnUpdateLoadmap(CCmdUI *pCmdUI);
afx_msg void OnBnClickedButton1();
afx_msg void OnLvnColumnclickReportlist(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnNMRClickReportlist(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnNMClickReportlist(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnLbnSelchangeListresultdmp();
afx_msg void OnExportex();
afx_msg void OnSendmail();
};