Index: /trunk/Utilities/LogProcessExceptions/LogProcessExceptions.rc
===================================================================
--- /trunk/Utilities/LogProcessExceptions/LogProcessExceptions.rc (revision 129)
+++ /trunk/Utilities/LogProcessExceptions/LogProcessExceptions.rc (revision 130)
@@ -47,4 +47,11 @@
#endif // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// TYPELIB
+//
+
+IDR_EMAILTOOLS TYPELIB "..\\..\\..\\Repository-Private\\Utilities\\EmailTools\\_Bin\\Win32\\Release\\EmailTools\\EmailTools.tlb"
/////////////////////////////////////////////////////////////////////////////
@@ -125,5 +132,5 @@
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LTEXT "Please choose minidump type using controls below. To proceed and start/continue debug session, click Next.",IDC_STATIC,6,6,306,18
+ LTEXT "Please choose minidump type using controls below. To proceed to exception filter rules, click Next.",IDC_STATIC,6,6,306,18
CONTROL "Data Segments ",IDC_MAIN_MINIDUMPTYPE_DATASEGMENTS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,30,67,10
@@ -167,10 +174,44 @@
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LTEXT "Debug session is in progress. To stop debugging, click Next. To review options without stopping debugging, click Back.",IDC_STATIC,6,6,306,18
- EDITTEXT IDC_MAIN_OPERATION_LOG,6,30,306,96,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | WS_HSCROLL
+ LTEXT "Debug session is in progress. To stop debugging, click Next. To review options without stopping debugging, click Back.",IDC_STATIC,6,0,306,18
+ EDITTEXT IDC_MAIN_OPERATION_LOG,6,24,306,102,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | WS_HSCROLL
LTEXT "Write Minidump File Now",IDC_MAIN_OPERATION_WRITEMINIDUMPNOW,6,132,112,8
LTEXT "Open Minidump File Directory",IDC_MAIN_OPERATION_OPENMINIDUMPFILEDIRECTORY,108,132,127,8,WS_TABSTOP
END
+IDD_MAIN_FILTER DIALOGEX 0, 0, 317, 144
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ LTEXT "Use controls below to provide rules that define whether an exception to occur should be skipped, or a minidump file needs to be created. To proceed to configuring email notifications, click Next.",IDC_STATIC,6,0,306,24
+ EDITTEXT IDC_MAIN_FILTER_TEXT,6,30,306,96,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL
+ LTEXT "Reset to Default",IDC_MAIN_FILTER_RESET,6,132,90,8
+ LTEXT "Help on Filters",IDC_MAIN_FILTER_HELP,114,132,186,8
+END
+
+IDD_MAIN_EMAIL DIALOGEX 0, 0, 317, 144
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ LTEXT "Use controls below to enable email notification on exception occurred. To proceed and start/continue debug session, click Next.",IDC_STATIC,6,0,306,18
+ CONTROL "&Send an email on occurred and logged exception",IDC_MAIN_EMAIL_ENABLED,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,24,300,10
+ LTEXT "&From: ",IDC_STATIC,12,44,22,8
+ EDITTEXT IDC_MAIN_EMAIL_FROM,36,42,90,14,ES_AUTOHSCROLL
+ LTEXT "&To: ",IDC_STATIC,138,44,14,8
+ EDITTEXT IDC_MAIN_EMAIL_TO,156,42,150,14,ES_AUTOHSCROLL
+ LTEXT "&Method: ",IDC_STATIC,12,62,30,8
+ COMBOBOX IDC_MAIN_EMAIL_METHOD,48,60,258,90,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "SMTP S&erver Host and Port: ",IDC_STATIC,24,80,92,8
+ EDITTEXT IDC_MAIN_EMAIL_HOST,126,78,120,14,ES_AUTOHSCROLL
+ LTEXT "&Username: ",IDC_STATIC,24,98,38,8
+ EDITTEXT IDC_MAIN_EMAIL_USERNAME,66,96,90,14,ES_AUTOHSCROLL
+ LTEXT "P&assword: ",IDC_STATIC,168,98,36,8
+ EDITTEXT IDC_MAIN_EMAIL_PASSWORD,204,96,90,14,ES_PASSWORD | ES_AUTOHSCROLL
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,12,114,300,20
+ LTEXT "Ma&ximal Dump File Size to Attach, MB: ",IDC_STATIC,12,122,124,8
+ EDITTEXT IDC_MAIN_EMAIL_MAXIMALATTACHMENTSIZE,144,120,60,14,ES_AUTOHSCROLL
+END
+
/////////////////////////////////////////////////////////////////////////////
@@ -205,4 +246,12 @@
BEGIN
END
+
+ IDD_MAIN_FILTER, DIALOG
+ BEGIN
+ END
+
+ IDD_MAIN_EMAIL, DIALOG
+ BEGIN
+ END
END
#endif // APSTUDIO_INVOKED
@@ -215,5 +264,5 @@
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1, 0, 0, 226
+ FILEVERSION 1, 0, 0, 269
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
@@ -234,5 +283,5 @@
VALUE "Created By", "Roman Ryltsov "
VALUE "FileDescription", "Log Process Exceptions Utility"
- VALUE "FileVersion", "1, 0, 0, 226\0"
+ VALUE "FileVersion", "1, 0, 0, 269\0"
VALUE "InternalName", "LogProcessExceptions"
VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2012"
@@ -361,5 +410,21 @@
STRINGTABLE
BEGIN
+ IDD_MAIN_FILTER "Exception Filter\nDefine rules to filter out exceptions of interest"
+END
+
+STRINGTABLE
+BEGIN
+ IDD_MAIN_EMAIL "Email Notification\nConfigure email notifications for detected exceptions"
+END
+
+STRINGTABLE
+BEGIN
+ IDC_MAIN_EMAIL_METHOD "Google Mail (SMTP, TLS Connection)\nSMTP, TLS Connection, Plain Text Authentication (TLS, PLAIN)\nSMTP, SSL Connection, Plain Text Authentication (SSL, PLAIN)\nSMTP, Digest Authentication (CRAM-MD5)\nSMTP, Plain Text Authentication (PLAIN)\nSMTP, No Authentication\n"
+END
+
+STRINGTABLE
+BEGIN
IDD_MAIN_OPERATION "Debug Operation\nReview debug session status and notifications"
+ IDC_MAIN_EMAIL_MAXIMALATTACHMENTSIZE "1, 0xB, , 2, Maximal Attachment Size, ""Maximal minidump file attachment size is a size threshold in megabytes, under which the file is to be attached to the email, and should be a non-negative integer value""\n"
END
Index: /trunk/Utilities/LogProcessExceptions/LogProcessExceptions.vcxproj
===================================================================
--- /trunk/Utilities/LogProcessExceptions/LogProcessExceptions.vcxproj (revision 129)
+++ /trunk/Utilities/LogProcessExceptions/LogProcessExceptions.vcxproj (revision 130)
@@ -308,4 +308,5 @@
+
Index: /trunk/Utilities/LogProcessExceptions/LogProcessExceptions.vcxproj.filters
===================================================================
--- /trunk/Utilities/LogProcessExceptions/LogProcessExceptions.vcxproj.filters (revision 129)
+++ /trunk/Utilities/LogProcessExceptions/LogProcessExceptions.vcxproj.filters (revision 130)
@@ -47,4 +47,5 @@
Resource Files
+
Index: /trunk/Utilities/LogProcessExceptions/MainWizard.h
===================================================================
--- /trunk/Utilities/LogProcessExceptions/MainWizard.h (revision 129)
+++ /trunk/Utilities/LogProcessExceptions/MainWizard.h (revision 130)
@@ -774,4 +774,7 @@
INT OnSetActive() throw()
{
+ #if defined(_DEBUG) && FALSE
+ return -1;
+ #endif // defined(_DEBUG)
_ATLTRY
{
@@ -808,8 +811,663 @@
}
if(!m_Wizard.m_ProcessPropertyPage.IsSelectedProcessActive())
- {
- UpdateButtons();
- __C(E_UNNAMED);
- }
+ return CProcessPropertyPage::IDD;
+ }
+ _ATLCATCHALL()
+ {
+ MessageBeep(MB_ICONERROR);
+ return -1;
+ }
+ return 0;
+ }
+ };
+
+ ////////////////////////////////////////////////////////
+ // CFilterPropertyPage
+
+ class CFilterPropertyPage :
+ public CWizardPropertyPageT
+ {
+ public:
+ enum { IDD = IDD_MAIN_FILTER };
+
+ BEGIN_MSG_MAP_EX(CFilterPropertyPage)
+ CHAIN_MSG_MAP(CWizardPropertyPageT)
+ MSG_WM_INITDIALOG(OnInitDialog)
+ NOTIFY_HANDLER_EX(IDC_MAIN_FILTER_RESET, CRoHyperStatic::NC_ANCHORCLICKED, OnResetStaticAnchorClicked)
+ //NOTIFY_HANDLER_EX(IDC_MAIN_FILTER_HELP, CRoHyperStatic::NC_ANCHORCLICKED, OnHelpStaticAnchorClicked)
+ REFLECT_NOTIFICATIONS()
+ END_MSG_MAP()
+
+ public:
+
+ ////////////////////////////////////////////////////
+ // CFilter
+
+ class CFilter
+ {
+ public:
+
+ ////////////////////////////////////////////////
+ // CValueRange
+
+ class CValueRange
+ {
+ public:
+ LONG m_nMinimalValue;
+ LONG m_nMaximalValue;
+
+ public:
+ // CValueRange
+ VOID Initialize(CString sValue)
+ {
+ CRoArrayT Array;
+ _StringHelper::Split(sValue, _T('-'), Array);
+ __D(!Array.IsEmpty(), E_INVALIDARG);
+ INT nMinimalValue, nMaximalValue;
+ __D(StrToIntEx(Array[0], STIF_SUPPORT_HEX, &nMinimalValue), E_INVALIDARG);
+ if(Array.GetCount() >= 2)
+ {
+ __D(StrToIntEx(Array[1], STIF_SUPPORT_HEX, &nMaximalValue), E_INVALIDARG);
+ if(nMaximalValue < nMinimalValue)
+ SwapMemory(&nMinimalValue, &nMaximalValue);
+ } else
+ nMaximalValue = nMinimalValue;
+ m_nMinimalValue = nMinimalValue;
+ m_nMaximalValue = nMaximalValue;
+ }
+ BOOL Compare(LONG nValue) const throw()
+ {
+ return nValue >= m_nMinimalValue && nValue <= m_nMinimalValue;
+ }
+ };
+
+ public:
+ INT m_nAction;
+ BOOL m_bExceptionCodeAvailable;
+ CValueRange m_ExceptionCode;
+ BOOL m_bNativeExceptionCodeAvailable;
+ CValueRange m_NativeExceptionCode;
+
+ public:
+ // CFilter
+ CFilter() throw() :
+ m_nAction(0),
+ m_bExceptionCodeAvailable(FALSE),
+ m_bNativeExceptionCodeAvailable(FALSE)
+ {
+ }
+ static VOID PreprocessExceptionCode(CString& sValue)
+ {
+ if(sValue.CompareNoCase(_T("*")) == 0)
+ sValue = _T("0x80000000-0x7FFFFFFF");
+ else if(sValue.CompareNoCase(_T("C++")) == 0)
+ sValue = _T("0xE06D7363");
+ }
+ static VOID PreprocessNativeExceptionCode(CString& sValue)
+ {
+ if(sValue.CompareNoCase(_T("*")) == 0)
+ sValue = _T("0x80000000-0x7FFFFFFF");
+ }
+ VOID Initialize(CString sValue)
+ {
+ for(; sValue.Replace(_T(" "), _T(" ")); )
+ ;
+ CRoArrayT Array;
+ _StringHelper::Split(sValue, _T(' '), Array);
+ __D(!Array.IsEmpty(), E_UNNAMED);
+ #pragma region Action
+ __D(!Array[0].IsEmpty(), E_UNNAMED);
+ static LPCTSTR g_ppszActions = _T("-+");
+ LPCTSTR pszAction = _tcschr(g_ppszActions, Array[0][0]);
+ __D(pszAction, E_UNNAMED);
+ m_nAction = (pszAction - g_ppszActions) * 2 - 1;
+ _A(m_nAction == -1 || m_nAction == +1);
+ #pragma endregion
+ m_bExceptionCodeAvailable = FALSE;
+ m_bNativeExceptionCodeAvailable = FALSE;
+ if(Array.GetCount() >= 2)
+ {
+ CString sExceptionCode = Array[1];
+ PreprocessExceptionCode(sExceptionCode);
+ m_ExceptionCode.Initialize(sExceptionCode);
+ m_bExceptionCodeAvailable = TRUE;
+ if(Array.GetCount() >= 3)
+ {
+ CString sNativeExceptionCode = Array[2];
+ PreprocessNativeExceptionCode(sNativeExceptionCode);
+ m_NativeExceptionCode.Initialize(sNativeExceptionCode);
+ m_bNativeExceptionCodeAvailable = TRUE;
+ }
+ }
+ }
+ BOOL Apply(LONG nExceptionCode, const LONG* pnNativeExceptionCode, INT& nAction) const throw()
+ {
+ if(m_bExceptionCodeAvailable)
+ {
+ if(!m_ExceptionCode.Compare(nExceptionCode))
+ return FALSE; // Exception Code Mismatch
+ if(m_bNativeExceptionCodeAvailable)
+ {
+ if(!pnNativeExceptionCode)
+ return FALSE; // No Native Exception Code
+ if(!m_NativeExceptionCode.Compare(*pnNativeExceptionCode))
+ return FALSE; // Native Exception Code Mismatch
+ }
+ }
+ nAction = m_nAction;
+ return TRUE;
+ }
+ VOID Trace() const
+ {
+ #if defined(_DEBUG)
+ CString sText;
+ if(m_bExceptionCodeAvailable)
+ {
+ if(m_ExceptionCode.m_nMinimalValue < m_ExceptionCode.m_nMaximalValue)
+ sText += AtlFormatString(_T("0x%08X-0x%08X "), m_ExceptionCode.m_nMinimalValue, m_ExceptionCode.m_nMaximalValue);
+ else if(m_ExceptionCode.m_nMinimalValue == 0xE06D7363)
+ sText += _T("C++ ");
+ else
+ sText += AtlFormatString(_T("0x%08X "), m_ExceptionCode.m_nMinimalValue);
+ if(m_bNativeExceptionCodeAvailable)
+ {
+ if(m_NativeExceptionCode.m_nMinimalValue < m_NativeExceptionCode.m_nMaximalValue)
+ sText += AtlFormatString(_T("0x%08X-0x%08X "), m_NativeExceptionCode.m_nMinimalValue, m_NativeExceptionCode.m_nMaximalValue);
+ else
+ sText += AtlFormatString(_T("0x%08X "), m_NativeExceptionCode.m_nMinimalValue);
+ }
+ }
+ _Z4(atlTraceGeneral, 4, _T("m_nAction %d, %s\n"), m_nAction, sText);
+ #endif // defined(_DEBUG)
+ }
+ };
+
+ ////////////////////////////////////////////////////
+ // CFilterArray
+
+ class CFilterArray :
+ public CRoAssignableArrayT >
+ {
+ public:
+ // CFilterArray
+ CFilterArray()
+ {
+ }
+ CFilterArray(const CString& sValue)
+ {
+ Initialize(sValue);
+ }
+ VOID Initialize(CString sValue)
+ {
+ RemoveAll();
+ sValue.Replace(_T("\r\n"), _T("\n"));
+ sValue.Replace(_T("\t"), _T(" "));
+ CRoArrayT Array;
+ _StringHelper::Split(sValue, _T('\n'), Array);
+ for(SIZE_T nIndex = 0; nIndex < Array.GetCount(); nIndex++)
+ {
+ CString sLine = Array[nIndex];
+ const INT nPosition = sLine.Find(_T("//"));
+ if(nPosition >= 0)
+ sLine = sLine.Left(nPosition);
+ sLine.Trim();
+ if(sLine.IsEmpty())
+ continue;
+ GetAt(Add()).Initialize(sLine);
+ }
+ }
+ BOOL Apply(LONG nExceptionCode, const LONG* pnNativeExceptionCode, INT& nAction) const throw()
+ {
+ for(SIZE_T nIndex = 0; nIndex < GetCount(); nIndex++)
+ if(GetAt(nIndex).Apply(nExceptionCode, pnNativeExceptionCode, nAction))
+ return TRUE;
+ return FALSE;
+ }
+ VOID Trace() const
+ {
+ #if defined(_DEBUG)
+ _Z4(atlTraceGeneral, 4, _T("GetCount() %d\n"), GetCount());
+ for(SIZE_T nIndex = 0; nIndex < GetCount(); nIndex++)
+ GetAt(nIndex).Trace();
+
+ #endif // defined(_DEBUG)
+ }
+ };
+
+ private:
+ CMainWizard& m_Wizard;
+ BOOL m_bActivating;
+ CRoEdit m_TextEdit;
+ CFont m_TextEditFont;
+ CRoHyperStatic m_ResetStatic;
+ CRoHyperStatic m_HelpStatic;
+ mutable CRoCriticalSection m_DataCriticalSection;
+ CFilterArray m_FilterArray;
+
+ static LPCTSTR GetDefaultText() throw()
+ {
+ return
+ _T("// Filters are processed top to bottom until a match is found.") _T("\r\n")
+ _T("// One filter per line, syntax: ") _T("\r\n")
+ _T("// (+ or -) [(Exception Code) [(C++ ATL Exception HRESULT)]]") _T("\r\n")
+ _T("") _T("\r\n")
+ _T("+")
+ _T("");
+ }
+ VOID UpdateButtons() throw()
+ {
+ const BOOL bAllowNext = m_Wizard.m_ProcessPropertyPage.IsSelectedProcessActive();
+ SetWizardButtons(PSWIZB_BACK | (bAllowNext ? PSWIZB_NEXT : 0));
+ }
+
+ public:
+ // CFilterPropertyPage
+ CFilterPropertyPage(CMainWizard* pWizard) throw() :
+ m_Wizard(*pWizard)
+ {
+ SetHeaderTitles();
+ }
+ BOOL ApplyFilters(LONG nExceptionCode, const LONG* pnNativeExceptionCode, INT& nAction) const
+ {
+ CRoCriticalSectionLock DataLock(m_DataCriticalSection);
+ return m_FilterArray.Apply(nExceptionCode, pnNativeExceptionCode, nAction);
+ }
+
+ // Window message handlers
+ LRESULT OnInitDialog(HWND, LPARAM)
+ {
+ m_bActivating = TRUE;
+ _ATLTRY
+ {
+ CWaitCursor WaitCursor;
+ m_TextEdit = GetDlgItem(IDC_MAIN_FILTER_TEXT);
+ CLogFont LogFont;
+ LogFont.SetMessageBoxFont();
+ _tcsncpy_s(LogFont.lfFaceName, DIM(LogFont.lfFaceName), _T("Courier New"), _TRUNCATE);
+ m_TextEditFont = LogFont.CreateFontIndirect();
+ m_TextEdit.SetFont(m_TextEditFont);
+ _W(m_ResetStatic.SubclassWindow(GetDlgItem(IDC_MAIN_FILTER_RESET)));
+ _W(m_HelpStatic.SubclassWindow(GetDlgItem(IDC_MAIN_FILTER_HELP)));
+ CRoHyperStatic::SetIdealExtentHorizontally(2, &m_ResetStatic, &m_HelpStatic);
+ #pragma region Initialize from Registry
+ CString sText = GetDefaultText();
+ _RegKeyHelper::QueryStringValue(HKEY_CURRENT_USER, REGISTRY_ROOT, _T("Filter"), sText);
+ m_TextEdit.SetValue(sText);
+ #pragma endregion
+ UpdateButtons();
+ m_bActivating = FALSE;
+ }
+ _ATLCATCHALL()
+ {
+ _Z_EXCEPTION();
+ }
+ return TRUE;
+ }
+ LRESULT OnResetStaticAnchorClicked(NMHDR*)
+ {
+ m_TextEdit.SetValue(GetDefaultText());
+ UpdateButtons();
+ return 0;
+ }
+ INT OnSetActive() throw()
+ {
+ #if defined(_DEBUG) && FALSE
+ return -1;
+ #endif // defined(_DEBUG)
+ _ATLTRY
+ {
+ UpdateButtons();
+ }
+ _ATLCATCHALL()
+ {
+ MessageBeep(MB_ICONERROR);
+ return -1;
+ }
+ return 0;
+ }
+ BOOL OnQueryCancel()
+ {
+ return m_Wizard.m_OperationPropertyPage.OnQueryCancel();
+ }
+ INT OnWizardNext() throw()
+ {
+ _ATLTRY
+ {
+ CString sText = m_TextEdit.GetValue();
+ CFilterArray FilterArray;
+ _ATLTRY
+ {
+ FilterArray.Initialize(sText);
+ }
+ _ATLCATCH(Exception)
+ {
+ _Z_ATLEXCEPTION(Exception);
+ AtlExceptionMessageBox(m_hWnd, Exception);
+ m_TextEdit.SetFocus();
+ return -1;
+ }
+ _RegKeyHelper::SetStringValue(HKEY_CURRENT_USER, REGISTRY_ROOT, _T("Filter"), sText);
+ {
+ CRoCriticalSectionLock DataLock(m_DataCriticalSection);
+ m_FilterArray = FilterArray;
+ m_FilterArray.Trace();
+ }
+ if(!m_Wizard.m_ProcessPropertyPage.IsSelectedProcessActive())
+ return CProcessPropertyPage::IDD;
+ }
+ _ATLCATCHALL()
+ {
+ MessageBeep(MB_ICONERROR);
+ return -1;
+ }
+ return 0;
+ }
+ };
+
+ ////////////////////////////////////////////////////////
+ // CEmailPropertyPage
+
+ class CEmailPropertyPage :
+ public CWizardPropertyPageT
+ {
+ public:
+ enum { IDD = IDD_MAIN_EMAIL };
+
+ BEGIN_MSG_MAP_EX(CEmailPropertyPage)
+ CHAIN_MSG_MAP(CWizardPropertyPageT)
+ MSG_WM_INITDIALOG(OnInitDialog)
+ COMMAND_HANDLER_EX(IDC_MAIN_EMAIL_ENABLED, BN_CLICKED, OnEnabledButtonClicked)
+ COMMAND_HANDLER_EX(IDC_MAIN_EMAIL_FROM, EN_CHANGE, OnChanged)
+ COMMAND_HANDLER_EX(IDC_MAIN_EMAIL_TO, EN_CHANGE, OnChanged)
+ COMMAND_HANDLER_EX(IDC_MAIN_EMAIL_METHOD, CBN_SELENDOK, OnChanged)
+ COMMAND_HANDLER_EX(IDC_MAIN_EMAIL_HOST, EN_CHANGE, OnChanged)
+ COMMAND_HANDLER_EX(IDC_MAIN_EMAIL_USERNAME, EN_CHANGE, OnChanged)
+ COMMAND_HANDLER_EX(IDC_MAIN_EMAIL_PASSWORD, EN_CHANGE, OnChanged)
+ NOTIFY_HANDLER_EX(IDC_MAIN_EMAIL_MAXIMALATTACHMENTSIZE, CRoLongEdit::NC_VALUECHANGED, OnChanged)
+ REFLECT_NOTIFICATIONS()
+ END_MSG_MAP()
+
+ public:
+
+ private:
+ CMainWizard& m_Wizard;
+ BOOL m_bActivating;
+ CButton m_EnabledButton;
+ CFont m_BolderFont;
+ CRoEdit m_FromEdit;
+ CRoEdit m_ToEdit;
+ CRoComboBoxT<> m_MethodComboBox;
+ CRoEdit m_HostEdit;
+ CRoEdit m_UsernameEdit;
+ CRoEdit m_PasswordEdit;
+ CRoLongEdit m_MaximalAttachmentSizeEdit;
+ BOOL m_bEnabled;
+ CStringA m_sMessageString;
+ ULONG m_nMaximalAttachmentSize;
+
+ VOID UpdateButtons() throw()
+ {
+ BOOL bAllowNext = m_Wizard.m_ProcessPropertyPage.IsSelectedProcessActive();
+ if(m_EnabledButton.GetCheck())
+ {
+ if(m_ToEdit.GetValue().Trim().IsEmpty())
+ bAllowNext = FALSE;
+ const INT nMethod = m_MethodComboBox.GetCurSel();
+ if(nMethod != 0) // Google Mail
+ if(m_HostEdit.GetValue().Trim().IsEmpty())
+ bAllowNext = FALSE;
+ if(nMethod != 5) // No Authentication
+ {
+ if(m_UsernameEdit.GetValue().Trim().IsEmpty())
+ bAllowNext = FALSE;
+ if(m_PasswordEdit.GetValue().Trim().IsEmpty())
+ bAllowNext = FALSE;
+ }
+ }
+ SetWizardButtons(PSWIZB_BACK | (bAllowNext ? PSWIZB_NEXT : 0));
+ }
+ VOID UpdateControls()
+ {
+ if(m_EnabledButton.GetCheck())
+ {
+ for(CWindow Window = m_EnabledButton.GetWindow(GW_HWNDNEXT); Window; Window = Window.GetWindow(GW_HWNDNEXT))
+ Window.ShowWindow(SW_SHOW);
+ const INT nMethod = m_MethodComboBox.GetCurSel();
+ m_HostEdit.GetWindow(GW_HWNDPREV).EnableWindow(nMethod != 0); // Google Mail
+ m_HostEdit.EnableWindow(nMethod != 0); // Google Mail
+ m_UsernameEdit.GetWindow(GW_HWNDPREV).EnableWindow(nMethod != 5); // No Authentication
+ m_UsernameEdit.EnableWindow(nMethod != 5); // No Authentication
+ m_PasswordEdit.GetWindow(GW_HWNDPREV).EnableWindow(nMethod != 5); // No Authentication
+ m_PasswordEdit.EnableWindow(nMethod != 5); // No Authentication
+ } else
+ {
+ for(CWindow Window = m_EnabledButton.GetWindow(GW_HWNDNEXT); Window; Window = Window.GetWindow(GW_HWNDNEXT))
+ Window.ShowWindow(SW_HIDE);
+ }
+ UpdateButtons();
+ }
+
+ public:
+ // CEmailPropertyPage
+ CEmailPropertyPage(CMainWizard* pWizard) throw() :
+ m_Wizard(*pWizard)
+ {
+ SetHeaderTitles();
+ }
+ CObjectPtr CreateMessage() const
+ {
+ if(!m_bEnabled)
+ return NULL;
+ CObjectPtr pMessage;
+ pMessage.Construct();
+ pMessage->LoadTypeInfo(IDR_EMAILTOOLS);
+ pMessage->SetAsString(m_sMessageString);
+ return pMessage;
+ }
+ ULONG GetMaximalAttachmentSize() const throw()
+ {
+ return m_nMaximalAttachmentSize;
+ }
+
+ // Window message handlers
+ LRESULT OnInitDialog(HWND, LPARAM)
+ {
+ m_bActivating = TRUE;
+ _ATLTRY
+ {
+ CWaitCursor WaitCursor;
+ m_EnabledButton = GetDlgItem(IDC_MAIN_EMAIL_ENABLED);
+ CFontHandle Font(GetFont());
+ if(!m_BolderFont)
+ {
+ CLogFont LogFont;
+ _W(Font.GetLogFont(LogFont));
+ LogFont.SetBold();
+ m_BolderFont = LogFont.CreateFontIndirect();
+ }
+ m_EnabledButton.SetFont(m_BolderFont);
+ m_FromEdit = GetDlgItem(IDC_MAIN_EMAIL_FROM);
+ m_ToEdit = GetDlgItem(IDC_MAIN_EMAIL_TO);
+ m_MethodComboBox.Initialize(GetDlgItem(IDC_MAIN_EMAIL_METHOD));
+ m_MethodComboBox.SetCurSel(0);
+ m_HostEdit = GetDlgItem(IDC_MAIN_EMAIL_HOST);
+ m_UsernameEdit = GetDlgItem(IDC_MAIN_EMAIL_USERNAME);
+ m_PasswordEdit = GetDlgItem(IDC_MAIN_EMAIL_PASSWORD);
+ _W(m_MaximalAttachmentSizeEdit.SubclassWindow(GetDlgItem(IDC_MAIN_EMAIL_MAXIMALATTACHMENTSIZE)));
+ #pragma region Initialize from Registry
+ CRegKey Key;
+ Key.Open(HKEY_CURRENT_USER, REGISTRY_ROOT, KEY_READ);
+ if(Key)
+ {
+ m_EnabledButton.SetCheck(_RegKeyHelper::QueryIntegerValue(Key, _T("Email Enabled")));
+ CString sMessageString = _RegKeyHelper::QueryStringValue(Key, _T("Email Message Template"));
+ if(!sMessageString.IsEmpty())
+ _ATLTRY
+ {
+ CObjectPtr pMessage;
+ pMessage.Construct();
+ pMessage->LoadTypeInfo(IDR_EMAILTOOLS);
+ pMessage->SetAsString(CStringA(sMessageString));
+ #pragma region Sender and Recipients
+ CComBSTR sSender, sToRecipients;
+ __C(pMessage->get_Sender(&sSender));
+ __C(pMessage->get_ToRecipients(&sToRecipients));
+ m_FromEdit.SetValue(CString(sSender));
+ m_ToEdit.SetValue(CString(sToRecipients));
+ #pragma endregion
+ CComBSTR sAuthMethods;
+ __C(pMessage->get_AuthMethods(&sAuthMethods));
+ VARIANT_BOOL bSecureSocketsLayer, bTransportLayerSecurity;
+ __C(pMessage->get_SecureSocketsLayer(&bSecureSocketsLayer));
+ __C(pMessage->get_TransportLayerSecurity(&bTransportLayerSecurity));
+ #pragma region Host and Port
+ CComBSTR sHost;
+ __C(pMessage->get_ServerHost(&sHost));
+ LONG nPort = 0;
+ __C(pMessage->get_ServerPort(&nPort));
+ CString sHostT(sHost);
+ if(nPort)
+ sHostT += AtlFormatString(_T(":%d"), nPort);
+ m_HostEdit.SetValue(sHostT);
+ #pragma endregion
+ #pragma region User Name and Password
+ CComBSTR sAuthName, sAuthPassword;
+ __C(pMessage->get_AuthName(&sAuthName));
+ __C(pMessage->get_AuthPassword(&sAuthPassword));
+ m_UsernameEdit.SetValue(CString(sAuthName));
+ m_PasswordEdit.SetValue(CString(sAuthPassword));
+ #pragma endregion
+ m_MethodComboBox.SetCurSel(0);
+ if(bTransportLayerSecurity != ATL_VARIANT_FALSE && sHostT.CompareNoCase(_T("smtp.gmail.com")) == 0)
+ {
+ //m_MethodComboBox.SetCurSel(0);
+ } else
+ {
+ if(bTransportLayerSecurity != ATL_VARIANT_FALSE)
+ m_MethodComboBox.SetCurSel(1);
+ else if(bSecureSocketsLayer != ATL_VARIANT_FALSE)
+ m_MethodComboBox.SetCurSel(2);
+ else if(CString(sAuthMethods).CompareNoCase(_T("cram-md5")) == 0)
+ m_MethodComboBox.SetCurSel(3);
+ else if(!CString(sAuthName).IsEmpty())
+ m_MethodComboBox.SetCurSel(4);
+ else
+ m_MethodComboBox.SetCurSel(5);
+ }
+ }
+ _ATLCATCHALL()
+ {
+ _Z_EXCEPTION();
+ }
+ const DWORD nMaximalAttachmentSize = _RegKeyHelper::QueryIntegerValue(Key, _T("Email Maximal Attachment Minidump File Size"));
+ if(nMaximalAttachmentSize)
+ m_MaximalAttachmentSizeEdit.SetValue(nMaximalAttachmentSize);
+ }
+ #pragma endregion
+ UpdateControls();
+ UpdateButtons();
+ m_bActivating = FALSE;
+ }
+ _ATLCATCHALL()
+ {
+ _Z_EXCEPTION();
+ }
+ return TRUE;
+ }
+ LRESULT OnEnabledButtonClicked(UINT, INT, HWND)
+ {
+ UpdateControls();
+ return 0;
+ }
+ LRESULT OnChanged(UINT, INT, HWND)
+ {
+ if(!m_bActivating)
+ UpdateControls();
+ return 0;
+ }
+ LRESULT OnChanged(NMHDR*)
+ {
+ if(!m_bActivating)
+ UpdateControls();
+ return 0;
+ }
+ INT OnSetActive() throw()
+ {
+ _ATLTRY
+ {
+ UpdateButtons();
+ }
+ _ATLCATCHALL()
+ {
+ MessageBeep(MB_ICONERROR);
+ return -1;
+ }
+ return 0;
+ }
+ BOOL OnQueryCancel()
+ {
+ return m_Wizard.m_OperationPropertyPage.OnQueryCancel();
+ }
+ INT OnWizardNext() throw()
+ {
+ _ATLTRY
+ {
+ m_bEnabled = m_EnabledButton.GetCheck();
+ _RegKeyHelper::SetIntegerValue(HKEY_CURRENT_USER, REGISTRY_ROOT, _T("Email Enabled"), m_bEnabled);
+ if(m_bEnabled)
+ {
+ CObjectPtr pMessage;
+ pMessage.Construct();
+ pMessage->LoadTypeInfo(IDR_EMAILTOOLS);
+ __C(pMessage->put_Sender(CComBSTR(m_FromEdit.GetValue())));
+ __C(pMessage->put_ToRecipients(CComBSTR(m_ToEdit.GetValue())));
+ // NOTE:
+ // 0 Google Mail (SMTP, TLS Connection)
+ // 1 SMTP, TLS Connection, Plain Text Authentication (TLS, PLAIN)
+ // 2 SMTP, SSL Connection, Plain Text Authentication (SSL, PLAIN)
+ // 3 SMTP, Digest Authentication (CRAM-MD5)
+ // 4 SMTP, Plain Text Authentication (PLAIN)
+ // 5 SMTP, No Authentication
+ const INT nMethod = m_MethodComboBox.GetCurSel();
+ __C(pMessage->put_SecureSocketsLayer((nMethod == 2) ? ATL_VARIANT_TRUE : ATL_VARIANT_FALSE));
+ __C(pMessage->put_TransportLayerSecurity((nMethod < 2) ? ATL_VARIANT_TRUE : ATL_VARIANT_FALSE));
+ if(nMethod != 5)
+ {
+ __C(pMessage->put_AuthMethods(CComBSTR(_T("plain"))));
+ __C(pMessage->put_AuthName(CComBSTR(m_UsernameEdit.GetValue())));
+ __C(pMessage->put_AuthPassword(CComBSTR(m_PasswordEdit.GetValue())));
+ }
+ switch(nMethod)
+ {
+ case 0:
+ __C(pMessage->put_ServerHost(CComBSTR(_T("smtp.gmail.com"))));
+ break;
+ default:
+ CString sHost = m_HostEdit.GetValue();
+ sHost.Trim();
+ const INT nPortPosition = sHost.Find(_T(":"));
+ if(nPortPosition >= 0)
+ {
+ INT nPort;
+ __D(AtlStringToInteger(sHost.Mid(nPortPosition + 1), nPort), E_UNNAMED);
+ __C(pMessage->put_ServerPort(nPort));
+ sHost = sHost.Left(nPortPosition);
+ }
+ __C(pMessage->put_ServerHost(CComBSTR(sHost)));
+ break;
+ }
+ switch(nMethod)
+ {
+ case 3:
+ __C(pMessage->put_AuthMethods(CComBSTR(_T("cram-md5"))));
+ break;
+ }
+ m_sMessageString = pMessage->GetAsString();
+ m_nMaximalAttachmentSize = (ULONG) m_MaximalAttachmentSizeEdit.GetValue();
+ _RegKeyHelper::SetStringValue(HKEY_CURRENT_USER, REGISTRY_ROOT, _T("Email Message Template"), CString(m_sMessageString));
+ _RegKeyHelper::SetIntegerValue(HKEY_CURRENT_USER, REGISTRY_ROOT, _T("Email Maximal Attachment Minidump File Size"), (DWORD) m_nMaximalAttachmentSize);
+ }
+ if(!m_Wizard.m_ProcessPropertyPage.IsSelectedProcessActive())
+ return CProcessPropertyPage::IDD;
}
_ATLCATCHALL()
@@ -923,7 +1581,10 @@
_Z4(atlTraceGeneral, 4, _T("Debug event, DebugEvent.dwDebugEventCode %d, .dwProcessId %d, .dwThreadId %d\n"), DebugEvent.dwDebugEventCode, DebugEvent.dwProcessId, DebugEvent.dwThreadId);
// TODO: Handle load/unload DLL, output debug strings (configurable)
+ CObjectPtr pMessage;
+ CPath sMessageAttachmentPath;
BOOL bExitProcess = FALSE;
switch(DebugEvent.dwDebugEventCode)
{
+ #pragma region CREATE_PROCESS_DEBUG_EVENT
case CREATE_PROCESS_DEBUG_EVENT:
{
@@ -931,4 +1592,6 @@
}
break;
+ #pragma endregion
+ #pragma region EXIT_PROCESS_DEBUG_EVENT
case EXIT_PROCESS_DEBUG_EVENT:
{
@@ -938,4 +1601,6 @@
}
break;
+ #pragma endregion
+ #pragma region EXCEPTION_DEBUG_EVENT
case EXCEPTION_DEBUG_EVENT:
{
@@ -958,34 +1623,25 @@
}
#pragma endregion
- #pragma region Skip C++ Exceptions (Debug)
- #if _DEVELOPMENT //&& FALSE
- #if !defined(_WIN64)
- COMPILER_MESSAGE("Debug: Skip C++ Exceptions")
- if(DebugInformation.ExceptionRecord.ExceptionCode == 0xE06D7363)
+ #pragma region Apply Exception Filter
+ const LONG nExceptionCode = DebugInformation.ExceptionRecord.ExceptionCode;
+ const LONG* pnNativeExceptionCode = NULL;
+ LONG nNativeExceptionCode;
+ if(nExceptionCode == 0xE06D7363 && DebugInformation.ExceptionRecord.NumberParameters >= 2)
{
- BOOL bSkip = TRUE;
- if(DebugInformation.ExceptionRecord.NumberParameters >= 2)
- {
- HRESULT nNativeExceptionCode = S_OK;
- SIZE_T nReadDataSize = 0;
- if(ReadProcessMemory(Process, (const VOID*) DebugInformation.ExceptionRecord.ExceptionInformation[1], &nNativeExceptionCode, sizeof nNativeExceptionCode, &nReadDataSize))
- if(nReadDataSize == sizeof nNativeExceptionCode)
- {
- if((nNativeExceptionCode & 0x0FFF0000) != 0x01390000) // DVRServerStretch
- {
- AppendLog(AtlFormatString(_T("Skipping C++ exception (0x%08X, 0x%08X)\r\n"), DebugInformation.ExceptionRecord.ExceptionCode, nNativeExceptionCode));
- break;
- } else
- bSkip = FALSE;
- }
- }
- if(bSkip)
- {
- AppendLog(AtlFormatString(_T("Skipping C++ exception (0x%08X)\r\n"), DebugInformation.ExceptionRecord.ExceptionCode));
- break;
- }
+ SIZE_T nReadDataSize = 0;
+ if(ReadProcessMemory(Process, (const VOID*) DebugInformation.ExceptionRecord.ExceptionInformation[1], &nNativeExceptionCode, sizeof nNativeExceptionCode, &nReadDataSize))
+ if(nReadDataSize == sizeof nNativeExceptionCode)
+ pnNativeExceptionCode = &nNativeExceptionCode;
}
- #endif // !defined(_WIN64)
- #endif // _DEVELOPMENT
+ INT nAction = 1;
+ m_Wizard.m_FilterPropertyPage.ApplyFilters(nExceptionCode, pnNativeExceptionCode, nAction);
+ if(nAction < 1)
+ {
+ if(pnNativeExceptionCode)
+ AppendLog(AtlFormatString(_T("Skipping C++ exception (0x%08X, 0x%08X)\r\n"), nExceptionCode, nNativeExceptionCode));
+ else
+ AppendLog(AtlFormatString(_T("Skipping exception (0x%08X)\r\n"), nExceptionCode));
+ break;
+ }
#pragma endregion
_ATLTRY
@@ -1004,4 +1660,5 @@
ExceptionInformation.ExceptionPointers = &ExceptionPointers;
ExceptionInformation.ClientPointers = FALSE;
+ #pragma region File Name
CString sName;
sName.AppendFormat(_T("%s-%d-%03d"), pszProcessFileName, nProcessIdentifier, m_nExceptionIndex++);
@@ -1018,4 +1675,5 @@
CPath sPath;
sPath.Combine(m_sDataDirectory, sName);
+ #pragma endregion
CAtlFile File;
__C(File.Create(sPath, GENERIC_WRITE, CREATE_ALWAYS, FILE_SHARE_READ));
@@ -1026,45 +1684,31 @@
_ATLTRY
{
- if(!m_pMessageQueue)
- m_pMessageQueue.Construct();
- CObjectPtr pMessage;
- pMessage.Construct();
- #pragma region Fixed Initialization
- __C(pMessage->put_ServerHost(CComBSTR(_T("smtp.gmail.com"))));
- __C(pMessage->put_Sender(CComBSTR(_T("Roman Ryltsov "))));
- __C(pMessage->put_ToRecipients(CComBSTR(_T("Roman Ryltsov "))));
- __C(pMessage->put_TransportLayerSecurity(ATL_VARIANT_TRUE));
- __C(pMessage->put_AuthMethods(CComBSTR(_T("login"))));
- __C(pMessage->put_AuthName(CComBSTR(_T("ryltsov@gmail.com"))));
- __C(pMessage->put_AuthPassword(CComBSTR(_T(""))));
- #pragma endregion
- TCHAR pszComputerName[MAX_COMPUTERNAME_LENGTH] = { 0 };
- DWORD nComputerNameLength = DIM(pszComputerName);
- _W(GetComputerName(pszComputerName, &nComputerNameLength));
- CString sSubject = AtlFormatString(_T("Exception 0x%08X in %s on %s"), DebugInformation.ExceptionRecord.ExceptionCode, pszProcessFileName, pszComputerName);
- CString sBody;
- sBody += _T("Hi,") _T("\r\n")
- _T("\r\n");
- sBody += AtlFormatString(_T("This is Log Process Exception notifying on exception occurred:") _T("\r\n")
- _T("\r\n"),
- pszComputerName);
- sBody += AtlFormatString(_T(" * ") _T("Code: 0x%08X") _T("\r\n"), DebugInformation.ExceptionRecord.ExceptionCode);
- if(nNativeExceptionCode != S_OK)
- sBody += AtlFormatString(_T(" * ") _T("Native ATL Code: 0x%08X") _T("\r\n"), nNativeExceptionCode);
- sBody += AtlFormatString(_T(" * ") _T("Local Time: %s") _T("\r\n"), _StringHelper::FormatDateTime());
- sBody += AtlFormatString(_T(" * ") _T("Computer Name: %s") _T("\r\n"), pszComputerName);
- // WARN: Attaching a minidump file requires it being closed by API (should we do ContinueDebugEvent and/or wait?)
- //sBody += _T("\r\n")
- // _T("Minidump attached.") _T("\r\n");
- __C(pMessage->put_Subject(CComBSTR(sSubject)));
- __C(pMessage->put_Body(CComBSTR(sBody)));
- //CObjectPtr pAttachment = pMessage->GetAttachments()->Add();
- //__C(pAttachment->put_Name(CComBSTR(sName)));
- //__C(pAttachment->LoadFromFile(CComBSTR(sPath)));
- m_pMessageQueue->Add(pMessage);
+ pMessage = m_Wizard.m_EmailPropertyPage.CreateMessage();
+ if(pMessage)
+ {
+ TCHAR pszComputerName[MAX_COMPUTERNAME_LENGTH] = { 0 };
+ DWORD nComputerNameLength = DIM(pszComputerName);
+ _W(GetComputerName(pszComputerName, &nComputerNameLength));
+ CString sSubject = AtlFormatString(_T("Exception 0x%08X in %s on %s"), DebugInformation.ExceptionRecord.ExceptionCode, pszProcessFileName, pszComputerName);
+ CString sBody;
+ sBody += _T("Hi,") _T("\r\n")
+ _T("\r\n");
+ sBody += AtlFormatString(_T("This is Log Process Exceptions notifying on exception occurred:") _T("\r\n")
+ _T("\r\n"),
+ pszComputerName);
+ sBody += AtlFormatString(_T(" * ") _T("Code: 0x%08X") _T("\r\n"), DebugInformation.ExceptionRecord.ExceptionCode);
+ if(nNativeExceptionCode != S_OK)
+ sBody += AtlFormatString(_T(" * ") _T("Native ATL Code: 0x%08X") _T("\r\n"), nNativeExceptionCode);
+ sBody += AtlFormatString(_T(" * ") _T("Local Time: %s") _T("\r\n"), _StringHelper::FormatDateTime());
+ sBody += AtlFormatString(_T(" * ") _T("Computer Name: %s") _T("\r\n"), pszComputerName);
+ __C(pMessage->put_Subject(CComBSTR(sSubject)));
+ __C(pMessage->put_Body(CComBSTR(sBody)));
+ sMessageAttachmentPath = sPath;
+ }
}
_ATLCATCHALL()
{
_Z_EXCEPTION();
+ pMessage.Release();
}
#pragma endregion
@@ -1076,8 +1720,51 @@
}
break;
+ #pragma endregion
}
__E(ContinueDebugEvent(DebugEvent.dwProcessId, DebugEvent.dwThreadId, DBG_EXCEPTION_NOT_HANDLED));
+ #pragma region Message Notification (Delivery)
+ if(pMessage)
+ _ATLTRY
+ {
+ // WARN: Attaching a minidump file requires it being closed by API (should we do ContinueDebugEvent and/or wait?)
+ if(_tcslen(sMessageAttachmentPath))
+ _ATLTRY
+ {
+ ULONGLONG nFileSize;
+ {
+ CAtlFile File;
+ __C(File.Create(sMessageAttachmentPath, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING));
+ __C(File.GetSize(nFileSize));
+ }
+ if((ULONG) (nFileSize >> 20) < m_Wizard.m_EmailPropertyPage.GetMaximalAttachmentSize())
+ {
+ CComBSTR sBody;
+ __C(pMessage->get_Body(&sBody));
+ CString sBodyT(sBody);
+ sBodyT += _T("\r\n")
+ _T("Minidump attached.") _T("\r\n");
+ __C(pMessage->put_Body(CComBSTR(sBodyT)));
+ CObjectPtr pAttachment = pMessage->GetAttachments()->Add();
+ __C(pAttachment->put_Name(CComBSTR((LPCTSTR) sMessageAttachmentPath + sMessageAttachmentPath.FindFileName())));
+ __C(pAttachment->put_Type(CComBSTR(_T("application/x-mdmp"))));
+ __C(pAttachment->LoadFromFile(CComBSTR(sMessageAttachmentPath)));
+ }
+ }
+ _ATLCATCHALL()
+ {
+ _Z_EXCEPTION();
+ }
+ if(!m_pMessageQueue)
+ m_pMessageQueue.Construct();
+ m_pMessageQueue->Add(pMessage);
+ }
+ _ATLCATCHALL()
+ {
+ _Z_EXCEPTION();
+ }
+ #pragma endregion
if(bExitProcess)
break;
+ #pragma endregion
}
}
@@ -1333,4 +2020,6 @@
CProcessPropertyPage m_ProcessPropertyPage;
CMinidumpTypePropertyPage m_MinidumpTypePropertyPage;
+ CFilterPropertyPage m_FilterPropertyPage;
+ CEmailPropertyPage m_EmailPropertyPage;
COperationPropertyPage m_OperationPropertyPage;
CCompletionPropertyPage m_CompletionPropertyPage;
@@ -1374,4 +2063,6 @@
m_ProcessPropertyPage(this),
m_MinidumpTypePropertyPage(this),
+ m_FilterPropertyPage(this),
+ m_EmailPropertyPage(this),
m_OperationPropertyPage(this),
m_CompletionPropertyPage(this)
@@ -1384,4 +2075,6 @@
AddPage(m_ProcessPropertyPage);
AddPage(m_MinidumpTypePropertyPage);
+ AddPage(m_FilterPropertyPage);
+ AddPage(m_EmailPropertyPage);
AddPage(m_OperationPropertyPage);
AddPage(m_CompletionPropertyPage);
Index: /trunk/Utilities/LogProcessExceptions/resource.h
===================================================================
--- /trunk/Utilities/LogProcessExceptions/resource.h (revision 129)
+++ /trunk/Utilities/LogProcessExceptions/resource.h (revision 130)
@@ -5,9 +5,8 @@
#define IDI_MODULE 10
#define IDS_PROJNAME 100
+#define IDR_EMAILTOOLS 101
#define IDS_MAINWIZARD_CAPTION 1000
#define IDB_WIZARDWATERMARK 1011
#define IDB_WIZARDHEADER 1012
-#define IDC_MAIN_OPERATION_OPENMINIDUMPFILEDIRECTORY 1512
-#define IDC_MAIN_OPERATION_WRITEMINIDUMPNOW 1511
#define IDD_MAIN_INTRODUCTION 1100
#define IDC_WIZARDINTRODUCTION_TITLE 1110
@@ -46,4 +45,21 @@
#define IDD_MAIN_OPERATION 1500
#define IDC_MAIN_OPERATION_LOG 1510
+#define IDC_MAIN_OPERATION_WRITEMINIDUMPNOW 1511
+#define IDC_MAIN_OPERATION_OPENMINIDUMPFILEDIRECTORY 1512
+#define IDD_MAIN_FILTER 1600
+#define IDC_MAIN_FILTER_TEXT 1610
+#define IDC_MAIN_FILTER_HELP 1611
+#define IDC_MAIN_FILTER_RESET 1612
+
+#define IDD_MAIN_EMAIL 1700
+#define IDC_MAIN_EMAIL_ENABLED 1710
+#define IDC_MAIN_EMAIL_FROM 1712
+#define IDC_MAIN_EMAIL_TO 1713
+#define IDC_MAIN_EMAIL_METHOD 1714
+#define IDC_MAIN_EMAIL_HOST 1715
+#define IDC_MAIN_EMAIL_USERNAME 1716
+#define IDC_MAIN_EMAIL_PASSWORD 1717
+#define IDC_MAIN_EMAIL_MAXIMALATTACHMENTSIZE 1718
+
#define IDD_ABOUT 29900
#define IDC_ABOUT_ICON 29901
@@ -65,5 +81,5 @@
#define _APS_NEXT_RESOURCE_VALUE 202
#define _APS_NEXT_COMMAND_VALUE 32775
-#define _APS_NEXT_CONTROL_VALUE 1065
+#define _APS_NEXT_CONTROL_VALUE 1072
#define _APS_NEXT_SYMED_VALUE 101
#endif
Index: /trunk/Utilities/LogProcessExceptions/stdafx.h
===================================================================
--- /trunk/Utilities/LogProcessExceptions/stdafx.h (revision 129)
+++ /trunk/Utilities/LogProcessExceptions/stdafx.h (revision 130)
@@ -68,5 +68,5 @@
#define SRWLOCK_THROUGH_CRITICALSECTION // Legacy Compatibility
-#define REGISTRY_PRODUCTROOT _T("SOFTWARE\\Alax.Info\\Utilities\\Log Process Exceptions")
+#define REGISTRY_PRODUCTROOT _T("SOFTWARE\\Alax.Info\\Utility\\LogProcessExceptions")
#define REGISTRY_FILEROOT REGISTRY_PRODUCTROOT
#define REGISTRY_ROOT REGISTRY_FILEROOT