Index: /trunk/Verify/StdAfx.cpp
===================================================================
--- /trunk/Verify/StdAfx.cpp	(revision 7)
+++ /trunk/Verify/StdAfx.cpp	(revision 7)
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+//	Verify.pch will be the pre-compiled header
+//	stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+
+
Index: /trunk/Verify/Verify.h
===================================================================
--- /trunk/Verify/Verify.h	(revision 7)
+++ /trunk/Verify/Verify.h	(revision 7)
@@ -0,0 +1,50 @@
+// Verify.h : main header file for the VERIFY application
+//
+
+#if !defined(AFX_VERIFY_H__27133678_2120_4B3E_9B6B_3B9BDF651E07__INCLUDED_)
+#define AFX_VERIFY_H__27133678_2120_4B3E_9B6B_3B9BDF651E07__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#ifndef __AFXWIN_H__
+	#error include 'stdafx.h' before including this file for PCH
+#endif
+
+#include "resource.h"		// main symbols
+
+/////////////////////////////////////////////////////////////////////////////
+// CVerifyApp:
+// See Verify.cpp for the implementation of this class
+//
+
+class CVerifyApp : public CWinApp
+{
+public:
+	CVerifyApp();
+
+// Overrides
+	// ClassWizard generated virtual function overrides
+	//{{AFX_VIRTUAL(CVerifyApp)
+	public:
+	virtual BOOL InitInstance();
+	virtual int ExitInstance();
+	//}}AFX_VIRTUAL
+
+// Implementation
+
+	//{{AFX_MSG(CVerifyApp)
+		// NOTE - the ClassWizard will add and remove member functions here.
+		//    DO NOT EDIT what you see in these blocks of generated code !
+	//}}AFX_MSG
+	DECLARE_MESSAGE_MAP()
+};
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_VERIFY_H__27133678_2120_4B3E_9B6B_3B9BDF651E07__INCLUDED_)
Index: /trunk/Verify/VerifyDlg.cpp
===================================================================
--- /trunk/Verify/VerifyDlg.cpp	(revision 7)
+++ /trunk/Verify/VerifyDlg.cpp	(revision 7)
@@ -0,0 +1,355 @@
+// VerifyDlg.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "..\EraserDll\EraserDll.h"
+//#include "..\shared\FiledialogEx.h"
+#include "resource.h"
+#include "newDialog.h"
+#include "Verify.h"
+#include "VerifyDlg.h"
+#include "ViewerDlg.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+#define TIMER_CONTINUE  100
+const DWORD uWait = 2; // seconds
+
+const LPCTSTR szProgress = "Now overwriting pass %u / %u (%u%% completed)";
+
+/////////////////////////////////////////////////////////////////////////////
+// CVerifyDlg dialog
+
+CVerifyDlg::CVerifyDlg(CWnd* pParent /*=NULL*/) :
+CDialog(CVerifyDlg::IDD, pParent),
+m_pfSave(0),
+m_ehContext(ERASER_INVALID_CONTEXT),
+m_bFileSelected(FALSE),
+m_bTerminated(FALSE)
+{
+	//{{AFX_DATA_INIT(CVerifyDlg)
+	m_strFileName = _T("");
+	m_strProgress = _T("");
+	//}}AFX_DATA_INIT
+	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
+	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
+}
+
+void CVerifyDlg::DoDataExchange(CDataExchange* pDX)
+{
+	CDialog::DoDataExchange(pDX);
+	//{{AFX_DATA_MAP(CVerifyDlg)
+	DDX_Text(pDX, IDC_EDIT_FILE, m_strFileName);
+	DDX_Text(pDX, IDC_STATIC_PROGRESS, m_strProgress);
+	//}}AFX_DATA_MAP
+}
+
+BEGIN_MESSAGE_MAP(CVerifyDlg, CDialog)
+	//{{AFX_MSG_MAP(CVerifyDlg)
+	ON_WM_PAINT()
+	ON_WM_QUERYDRAGICON()
+	ON_BN_CLICKED(IDC_BUTTON_BROWSE, OnButtonBrowse)
+	ON_BN_CLICKED(IDC_BUTTON_ERASE, OnButtonErase)
+	ON_BN_CLICKED(IDC_BUTTON_METHOD, OnButtonMethod)
+	ON_BN_CLICKED(IDC_BUTTON_STOP, OnButtonStop)
+	ON_WM_TIMER()
+	ON_WM_DESTROY()
+	//}}AFX_MSG_MAP
+    ON_MESSAGE(WM_ERASERNOTIFY, OnEraserNotify)
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CVerifyDlg message handlers
+
+BOOL CVerifyDlg::OnInitDialog()
+{
+	CDialog::OnInitDialog();
+
+    // create and set bold font
+    LOGFONT lgFont;
+    ZeroMemory(&lgFont, sizeof(LOGFONT));
+
+    m_pfSave = GetDlgItem(IDC_STATIC_STEP1)->GetFont();
+    m_pfSave->GetLogFont(&lgFont);
+    lgFont.lfWeight = FW_BOLD;
+
+    m_fBold.CreateFontIndirect(&lgFont);
+    GetDlgItem(IDC_STATIC_STEP1)->SetFont(&m_fBold);
+    GetDlgItem(IDC_STATIC_PROGRESS)->SetFont(&m_fBold);
+
+
+	GetDlgItem(IDC_BUTTON_ERASE)->EnableWindow(FALSE);
+    GetDlgItem(IDC_BUTTON_STOP)->EnableWindow(FALSE);
+
+	return TRUE;  // return TRUE  unless you set the focus to a control
+}
+
+// If you add a minimize button to your dialog, you will need the code below
+//  to draw the icon.  For MFC applications using the document/view model,
+//  this is automatically done for you by the framework.
+
+void CVerifyDlg::OnPaint()
+{
+	if (IsIconic()) {
+		CPaintDC dc(this); // device context for painting
+
+		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
+
+		// Center icon in client rectangle
+		int cxIcon = GetSystemMetrics(SM_CXICON);
+		int cyIcon = GetSystemMetrics(SM_CYICON);
+		CRect rect;
+		GetClientRect(&rect);
+		int x = (rect.Width() - cxIcon + 1) / 2;
+		int y = (rect.Height() - cyIcon + 1) / 2;
+
+		// Draw the icon
+		dc.DrawIcon(x, y, m_hIcon);
+    } else {
+		CDialog::OnPaint();
+	}
+}
+
+// The system calls this to obtain the cursor to display while the user drags
+//  the minimized window.
+HCURSOR CVerifyDlg::OnQueryDragIcon()
+{
+	return (HCURSOR) m_hIcon;
+}
+
+void CVerifyDlg::OnButtonBrowse()
+{
+   /* CFileDialogEx fdlg(TRUE, NULL, NULL,
+                       OFN_PATHMUSTEXIST |OFN_NODEREFERENCELINKS | OFN_FILEMUSTEXIST | OFN_SHOWHELP |OFN_EXPLORER,
+					   "All Files (*.*) | *.*||", this);
+	fdlg.m_ofn.lpstrTitle = "Select File to be Erased";*/
+UpdateData(TRUE);
+	CNewDialog fdlg;
+    if (fdlg.DoModal() == IDOK) {
+        m_strFileName = fdlg.m_sPath;		//fdlg.GetPathName();
+
+        if (!m_bFileSelected) {
+            // move to step 2
+            GetDlgItem(IDC_STATIC_STEP1)->SetFont(m_pfSave);
+            m_pfSave = GetDlgItem(IDC_STATIC_STEP2)->GetFont();
+            GetDlgItem(IDC_STATIC_STEP2)->SetFont(&m_fBold);
+            // enable "Erase" button
+            GetDlgItem(IDC_BUTTON_ERASE)->EnableWindow(TRUE);
+            // clear possible message
+            m_strProgress.Empty();
+        }
+
+        UpdateData(FALSE);
+        m_bFileSelected = TRUE;
+    }
+}
+
+void CVerifyDlg::OnButtonErase()
+{
+    // only one click, thanks
+	GetDlgItem(IDC_BUTTON_ERASE)->EnableWindow(FALSE);
+
+    // no changing preferences at this point
+    GetDlgItem(IDC_BUTTON_METHOD)->EnableWindow(FALSE);
+
+    BOOL bSuccess = FALSE;
+
+    // start erasing
+    if (eraserError(eraserIsValidContext(m_ehContext)) && !m_strFileName.IsEmpty()) {
+        if (eraserOK(eraserCreateContext(&m_ehContext))) {
+            // set data type
+            if (eraserOK(eraserSetDataType(m_ehContext, ERASER_DATA_FILES))) {
+                // add file to erase
+                if (eraserOK(eraserAddItem(m_ehContext, (LPVOID)(LPCTSTR)m_strFileName,
+                        (E_UINT16)m_strFileName.GetLength()))) {
+
+                    // set notification window & message and enable test API notifications
+                    if (eraserOK(eraserSetWindow(m_ehContext, GetSafeHwnd())) &&
+                        eraserOK(eraserSetWindowMessage(m_ehContext, WM_ERASERNOTIFY)) &&
+                        eraserOK(eraserTestEnable(m_ehContext))) {
+
+                        // before...
+                        CViewerDlg viewer(this);
+                        viewer.m_strFileName = m_strFileName;
+                        viewer.m_strMessage = "Before Erasing";
+                        viewer.DoModal();
+
+                        // start erasing (the library will launch a new thread for this)
+                        bSuccess = eraserOK(eraserStart(m_ehContext));
+                    }
+                }
+            }
+        }
+    }
+
+    if (bSuccess) {
+        // move to step 3
+        GetDlgItem(IDC_STATIC_STEP2)->SetFont(m_pfSave);
+        m_pfSave = GetDlgItem(IDC_STATIC_STEP3)->GetFont();
+        GetDlgItem(IDC_STATIC_STEP3)->SetFont(&m_fBold);
+
+        // enable "Stop" button
+        GetDlgItem(IDC_BUTTON_STOP)->EnableWindow(TRUE);
+
+        // disable "Close" button
+        GetDlgItem(IDCANCEL)->EnableWindow(FALSE);
+    } else {
+        // back to step 1
+        GetDlgItem(IDC_STATIC_STEP2)->SetFont(m_pfSave);
+        m_pfSave = GetDlgItem(IDC_STATIC_STEP1)->GetFont();
+        GetDlgItem(IDC_STATIC_STEP1)->SetFont(&m_fBold);
+
+        // re-enable preferences button
+        GetDlgItem(IDC_BUTTON_METHOD)->EnableWindow(TRUE);
+
+        // clear file name
+        m_strFileName.Empty();
+        m_bFileSelected = FALSE;
+
+        // destroy possibly created context
+        eraserDestroyContext(m_ehContext);
+        m_ehContext = ERASER_INVALID_CONTEXT;
+
+        // notify the user
+        m_strProgress = "Failed to start erasing.";
+        UpdateData(FALSE);
+    }
+}
+
+void CVerifyDlg::OnButtonMethod()
+{
+	eraserShowOptions(GetSafeHwnd(), ERASER_PAGE_FILES);
+}
+
+void CVerifyDlg::OnButtonStop()
+{
+    if (eraserOK(eraserIsValidContext(m_ehContext))) {
+        GetDlgItem(IDC_BUTTON_STOP)->EnableWindow(FALSE);
+        m_bTerminated = TRUE;
+        eraserStop(m_ehContext);
+    }
+}
+
+LRESULT CVerifyDlg::OnEraserNotify(WPARAM wParam, LPARAM)
+{
+    if (eraserError(eraserIsValidContext(m_ehContext))) {
+        return 0;
+    }
+
+    switch (wParam) {
+    case ERASER_WIPE_BEGIN:
+        m_strProgress = "Erasing started...";
+        break;
+    case ERASER_WIPE_UPDATE:
+        {
+            E_UINT16 uCurrent = 0, uPasses = 0;
+            E_UINT8 uPercent = 0;
+
+            // percent
+            if (eraserOK(eraserProgGetPercent(m_ehContext, &uPercent)) &&
+                eraserOK(eraserProgGetCurrentPass(m_ehContext, &uCurrent)) &&
+                eraserOK(eraserProgGetPasses(m_ehContext, &uPasses))) {
+                if (uPasses > 0 && uCurrent > 0) {
+                    m_strProgress.Format(szProgress, uCurrent, uPasses,
+                        (uPercent - ((uCurrent - 1) * 100 / uPasses)) * uPasses );
+                }
+            } else {
+                m_strProgress = "Erasing...";
+            }
+        }
+        break;
+    case ERASER_WIPE_DONE:
+        if (!m_bTerminated) {
+            m_strProgress = "Erasing completed.";
+        } else {
+            m_strProgress = "Erasing terminated.";
+        }
+
+        // and we're back to step 1
+        GetDlgItem(IDC_STATIC_STEP3)->SetFont(m_pfSave);
+        m_pfSave = GetDlgItem(IDC_STATIC_STEP1)->GetFont();
+        GetDlgItem(IDC_STATIC_STEP1)->SetFont(&m_fBold);
+
+        // re-enable preferences button
+        GetDlgItem(IDC_BUTTON_METHOD)->EnableWindow(TRUE);
+
+        // and "Close" button
+        GetDlgItem(IDCANCEL)->EnableWindow(TRUE);
+
+        // no more stopping
+        GetDlgItem(IDC_BUTTON_STOP)->EnableWindow(FALSE);
+        m_bTerminated = FALSE;
+
+        // clear file name
+        m_strFileName.Empty();
+        m_bFileSelected = FALSE;
+
+        // destroy context
+        eraserDestroyContext(m_ehContext);
+        m_ehContext = ERASER_INVALID_CONTEXT;
+
+        break;
+    case ERASER_TEST_PAUSED:
+        {
+            TCHAR szCurrentData[_MAX_PATH];
+            m_strProgress = "Viewing File Contents...";
+            UpdateData(FALSE);
+
+            E_UINT16 uLength = _MAX_PATH, uCurrent = 0, uPasses = 0;
+
+            eraserProgGetCurrentPass(m_ehContext, &uCurrent);
+            eraserProgGetPasses(m_ehContext, &uPasses);
+
+            // if the file has alternate data streams and user has opted to
+            // erase them, the file name will change at some point
+            eraserProgGetCurrentDataString(m_ehContext, (LPVOID)szCurrentData, &uLength);
+
+            try {
+                CViewerDlg viewer(this);
+                viewer.m_strFileName = szCurrentData;
+
+                if (uCurrent > 0) {
+                    viewer.m_strMessage.Format("After Pass %u", uCurrent);
+                }
+                viewer.DoModal();
+            } catch (...) {
+                ASSERT(0);
+            }
+
+            if (uCurrent < uPasses) {
+                // and continue after uWait seconds
+                if (!SetTimer(TIMER_CONTINUE, uWait * 1000, NULL)) {
+                    eraserTestContinueProcess(m_ehContext);
+                }
+                m_strProgress = "Starting next overwriting pass...";
+            } else {
+                eraserTestContinueProcess(m_ehContext);
+            }
+        }
+        break;
+    default:
+        break;
+    }
+
+    UpdateData(FALSE);
+    return 1;
+}
+
+void CVerifyDlg::OnTimer(UINT_PTR nIDEvent)
+{
+    if (nIDEvent == TIMER_CONTINUE && eraserOK(eraserIsValidContext(m_ehContext))) {
+        KillTimer(TIMER_CONTINUE);
+        eraserTestContinueProcess(m_ehContext);
+    }
+	CDialog::OnTimer(nIDEvent);
+}
+
+void CVerifyDlg::OnDestroy()
+{
+    eraserDestroyContext(m_ehContext);
+	CDialog::OnDestroy();
+}
Index: /trunk/Verify/resource.h
===================================================================
--- /trunk/Verify/resource.h	(revision 7)
+++ /trunk/Verify/resource.h	(revision 7)
@@ -0,0 +1,50 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by Verify.rc
+//
+#define IDD_DLGNEW_DIALOG               93
+#define IDR_TREEFILECTRL_NO_DROPMOVE    94
+#define IDR_TREEFILECTRL_NO_DROPCOPY    95
+#define IDR_TREEFILECTRL_DROPCOPY       96
+#define IDB_FILETREECTRL_NETWORK        97
+#define IDC_TREE1                       98
+#define IDD_VERIFY_DIALOG               102
+#define IDR_TREEFILECTRL_POPUP          114
+#define IDR_MAINFRAME                   128
+#define IDD_DIALOG_VIEWER               129
+#define IDC_EDIT_FILE                   1000
+#define IDC_BUTTON_BROWSE               1001
+#define IDC_STATIC_STEP1                1002
+#define IDC_STATIC_STEP2                1003
+#define IDC_BUTTON_ERASE                1004
+#define IDC_STATIC_STEP3                1005
+#define IDC_BUTTON_STOP                 1006
+#define IDC_STATIC_STEP0                1007
+#define IDC_BUTTON_METHOD               1008
+#define IDC_RICHEDIT_VIEW               1009
+#define IDC_BUTTON_FIRST                1010
+#define IDC_BUTTON_LAST                 1011
+#define IDC_BUTTON_PREVIOUS             1012
+#define IDC_BUTTON_NEXT                 1013
+#define IDC_BUTTON_GO                   1014
+#define IDC_EDIT_CLUSTER                1015
+#define IDC_STATIC_PROGRESS             1016
+#define ID_TREEFILECTRL_UPONELEVEL      32778
+#define ID_TREEFILECTRL_OPEN            32782
+#define ID_TREEFILECTRL_DELETE          32783
+#define ID_TREEFILECTRL_RENAME          32784
+#define ID_TREEFILECTRL_PROPERTIES      32785
+#define ID_TREEFILECTRL_REFRESH         32790
+#define ID_TREEFILECTRL_BACK            32803
+#define ID_TREEFILECTRL_FORWARD         32804
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        132
+#define _APS_NEXT_COMMAND_VALUE         32771
+#define _APS_NEXT_CONTROL_VALUE         1017
+#define _APS_NEXT_SYMED_VALUE           111
+#endif
+#endif
Index: /trunk/Verify/ViewerDlg.h
===================================================================
--- /trunk/Verify/ViewerDlg.h	(revision 7)
+++ /trunk/Verify/ViewerDlg.h	(revision 7)
@@ -0,0 +1,63 @@
+#if !defined(AFX_VIEWERDLG_H__037EC108_598D_413C_B5B7_A8270562C2E6__INCLUDED_)
+#define AFX_VIEWERDLG_H__037EC108_598D_413C_B5B7_A8270562C2E6__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+// ViewerDlg.h : header file
+//
+
+/////////////////////////////////////////////////////////////////////////////
+// CViewerDlg dialog
+
+class CViewerDlg : public CDialog
+{
+// Construction
+public:
+	CViewerDlg(CWnd* pParent = NULL);   // standard constructor
+    CString m_strFileName;
+    CString m_strMessage;
+
+// Dialog Data
+	//{{AFX_DATA(CViewerDlg)
+	enum { IDD = IDD_DIALOG_VIEWER };
+	CRichEditCtrl	m_recView;
+	DWORD	m_dwCurrentCluster;
+	//}}AFX_DATA
+
+
+// Overrides
+	// ClassWizard generated virtual function overrides
+	//{{AFX_VIRTUAL(CViewerDlg)
+	protected:
+	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
+	//}}AFX_VIRTUAL
+
+// Implementation
+protected:
+    BOOL DisplayCluster(DWORD dwCluster, DWORD dwSpecial = 0);
+    
+    inline void AddDataLine(DWORD dwOffset, DWORD *pdwData, LPCTSTR szString);
+    inline int  AppendText(LPCTSTR szString);
+    inline void AppendFormattedText(LPCTSTR szString, CHARFORMAT& cf);
+
+    HANDLE m_hFile;
+    DWORD m_dwClusterSize;
+
+	// Generated message map functions
+	//{{AFX_MSG(CViewerDlg)
+	afx_msg void OnButtonFirst();
+	afx_msg void OnButtonGo();
+	afx_msg void OnButtonLast();
+	afx_msg void OnButtonNext();
+	afx_msg void OnButtonPrevious();
+	virtual BOOL OnInitDialog();
+	afx_msg void OnDestroy();
+	//}}AFX_MSG
+	DECLARE_MESSAGE_MAP()
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_VIEWERDLG_H__037EC108_598D_413C_B5B7_A8270562C2E6__INCLUDED_)
Index: /trunk/Verify/StdAfx.h
===================================================================
--- /trunk/Verify/StdAfx.h	(revision 7)
+++ /trunk/Verify/StdAfx.h	(revision 7)
@@ -0,0 +1,58 @@
+// stdafx.h : include file for standard system include files,
+//  or project specific include files that are used frequently, but
+//      are changed infrequently
+//
+#if !defined(AFX_STDAFX_H__23AAFC39_A230_4F47_9D92_63F8181F183B__INCLUDED_)
+#define AFX_STDAFX_H__23AAFC39_A230_4F47_9D92_63F8181F183B__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN	// Exclude rarely-used items from Windows headers.
+#endif
+
+// Modify the following defines if you have to target an OS before the ones
+// specified in the following code. See MSDN for the latest information
+// about corresponding values for different operating systems.
+#ifndef WINVER		// Permit use of features specific to Windows 95 and Windows NT 4.0 or later.
+#define WINVER 0x0400	// Change this to the appropriate value to target
+#endif                     // Windows 98 and Windows 2000 or later.
+
+#ifndef _WIN32_WINNT	// Permit use of features specific to Windows NT 4.0 or later.
+#define _WIN32_WINNT 0x0400	// Change this to the appropriate value to target
+#endif		         // Windows 98 and Windows 2000 or later.
+
+#ifndef _WIN32_WINDOWS	      // Permit use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410    // Change this to the appropriate value to target
+#endif			      // Windows Millennium Edition or later.
+
+#ifndef _WIN32_IE		// Permit use of features specific to Internet Explorer 4.0 or later.
+#define _WIN32_IE 0x0400   // Change this to the appropriate value to target
+#endif			// Internet Explorer 5.0 or later.
+
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS  // Some CString constructors will be explicit.
+
+// Turns off MFC feature that hides of some common warning messages
+// that are frequently and safely ignored .
+#define _AFX_ALL_WARNINGS
+#include <afxwin.h>         // MFC core and standard components
+#include <afxext.h>         // MFC extensions
+//#include <afxdtctl.h>		// MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h>			// MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+#include <afxdisp.h>
+#include <afxtempl.h>
+#include <afxmt.h>
+#include <shlobj.h>
+#include <lm.h>
+#include <eh.h>             // structured exception
+#include "..\shared\SeException.h"    // handling
+#include "..\shared\FileDialogEx.h"
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__23AAFC39_A230_4F47_9D92_63F8181F183B__INCLUDED_)
Index: /trunk/Verify/VerifyDlg.h
===================================================================
--- /trunk/Verify/VerifyDlg.h	(revision 7)
+++ /trunk/Verify/VerifyDlg.h	(revision 7)
@@ -0,0 +1,65 @@
+// VerifyDlg.h : header file
+//
+
+#if !defined(AFX_VERIFYDLG_H__1BD4386B_61DD_4477_AB19_A7676C3A94DF__INCLUDED_)
+#define AFX_VERIFYDLG_H__1BD4386B_61DD_4477_AB19_A7676C3A94DF__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "..\EraserDll\EraserDll.h"
+
+/////////////////////////////////////////////////////////////////////////////
+// CVerifyDlg dialog
+
+class CVerifyDlg : public CDialog
+{
+// Construction
+public:
+	CVerifyDlg(CWnd* pParent = NULL);	// standard constructor
+
+// Dialog Data
+	//{{AFX_DATA(CVerifyDlg)
+	enum { IDD = IDD_VERIFY_DIALOG };
+	CString	m_strFileName;
+	CString	m_strProgress;
+	//}}AFX_DATA
+
+	// ClassWizard generated virtual function overrides
+	//{{AFX_VIRTUAL(CVerifyDlg)
+	protected:
+	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
+	//}}AFX_VIRTUAL
+
+// Implementation
+protected:
+	HICON m_hIcon;
+
+    CFont *m_pfSave;
+    CFont m_fBold;
+
+    ERASER_HANDLE m_ehContext;
+    BOOL m_bFileSelected;
+    BOOL m_bTerminated;
+
+	// Generated message map functions
+	//{{AFX_MSG(CVerifyDlg)
+	virtual BOOL OnInitDialog();
+	afx_msg void OnPaint();
+	afx_msg HCURSOR OnQueryDragIcon();
+	afx_msg void OnButtonBrowse();
+	afx_msg void OnButtonErase();
+	afx_msg void OnButtonMethod();
+	afx_msg void OnButtonStop();
+	afx_msg void OnTimer(UINT_PTR nIDEvent);
+	afx_msg void OnDestroy();
+	//}}AFX_MSG
+    afx_msg LRESULT OnEraserNotify(WPARAM wParam, LPARAM lParam);
+	DECLARE_MESSAGE_MAP()
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_VERIFYDLG_H__1BD4386B_61DD_4477_AB19_A7676C3A94DF__INCLUDED_)
Index: /trunk/Verify/Verify.cpp
===================================================================
--- /trunk/Verify/Verify.cpp	(revision 7)
+++ /trunk/Verify/Verify.cpp	(revision 7)
@@ -0,0 +1,80 @@
+// Verify.cpp : Defines the class behaviors for the application.
+//
+
+#include "stdafx.h"
+#include "Verify.h"
+#include "VerifyDlg.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CVerifyApp
+
+BEGIN_MESSAGE_MAP(CVerifyApp, CWinApp)
+	//{{AFX_MSG_MAP(CVerifyApp)
+		// NOTE - the ClassWizard will add and remove mapping macros here.
+		//    DO NOT EDIT what you see in these blocks of generated code!
+	//}}AFX_MSG
+	ON_COMMAND(ID_HELP, CWinApp::OnHelp)
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CVerifyApp construction
+
+CVerifyApp::CVerifyApp()
+{
+	// TODO: add construction code here,
+	// Place all significant initialization in InitInstance
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// The one and only CVerifyApp object
+
+CVerifyApp theApp;
+
+/////////////////////////////////////////////////////////////////////////////
+// CVerifyApp initialization
+
+BOOL CVerifyApp::InitInstance()
+{
+	// Standard initialization
+	// If you are not using these features and wish to reduce the size
+	//  of your final executable, you should remove from the following
+	//  the specific initialization routines you do not need.
+
+#ifdef _AFXDLL
+	Enable3dControls();			// Call this when using MFC in a shared DLL
+#else
+	Enable3dControlsStatic();	// Call this when linking to MFC statically
+#endif
+
+    AfxInitRichEdit();
+
+    // initialize Eraser library
+    eraserInit();
+
+    CVerifyDlg dlg;
+	m_pMainWnd = &dlg;
+
+    try {
+	    dlg.DoModal();
+    } catch (CException *e) {
+        e->ReportError(MB_ICONERROR);
+        e->Delete();
+    }
+
+	// Since the dialog has been closed, return FALSE so that we exit the
+	//  application, rather than start the application's message pump.
+	return FALSE;
+}
+
+int CVerifyApp::ExitInstance() 
+{
+    // free allocated resources
+	eraserEnd();
+	return CWinApp::ExitInstance();
+}
Index: /trunk/Verify/Verify.vcproj
===================================================================
--- /trunk/Verify/Verify.vcproj	(revision 7)
+++ /trunk/Verify/Verify.vcproj	(revision 7)
@@ -0,0 +1,743 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="Verify"
+	ProjectGUID="{870168AC-012D-4E78-AB70-CC20D02C0EBE}"
+	RootNamespace="Verify"
+	Keyword="MFCProj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)\bin\80\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)\tmp\80\$(ConfigurationName)\$(ProjectName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Release/Verify.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="1"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories=".;..\shared"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdafx.h"
+				PrecompiledHeaderFile="$(IntDir)\Verify.pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)/"
+				ProgramDataBaseFileName="$(IntDir)/vc70.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1035"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\Verify.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				ProgramDatabaseFile=""
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Release/Verify.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="1"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories=".;..\shared"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdafx.h"
+				PrecompiledHeaderFile="$(IntDir)\Verify.pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)/"
+				ProgramDataBaseFileName="$(IntDir)/vc70.pdb"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1035"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\Verify.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				ProgramDatabaseFile=""
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)\bin\80\$(ConfigurationName)"
+			IntermediateDirectory="$(SolutionDir)\tmp\80\$(ConfigurationName)\$(ProjectName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Debug/Verify.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..\shared"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdafx.h"
+				PrecompiledHeaderFile="$(IntDir)\Verify.pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)/"
+				ProgramDataBaseFileName="$(IntDir)/vc70.pdb"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1035"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\Verify.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\Verify.pdb"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="1"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="3"
+				TypeLibraryName=".\Debug/Verify.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..\shared"
+				PreprocessorDefinitions="_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="stdafx.h"
+				PrecompiledHeaderFile="$(IntDir)\Verify.pch"
+				AssemblerListingLocation=""
+				ObjectFile="$(IntDir)/"
+				ProgramDataBaseFileName="$(IntDir)/vc70.pdb"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1035"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\Verify.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\Verify.pdb"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\shared\FileDialogEx.cpp"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="1"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="1"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\shared\FileTreeCtrl.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\shared\NewDialog.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\shared\SeException.cpp"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="1"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="1"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="StdAfx.cpp"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="1"
+						PreprocessorDefinitions=""
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="1"
+						PreprocessorDefinitions=""
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="Verify.cpp"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="1"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="1"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="Verify.rc"
+				>
+			</File>
+			<File
+				RelativePath="VerifyDlg.cpp"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="1"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="1"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="ViewerDlg.cpp"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="1"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="1"
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\EraserDll\EraserDll.h"
+				>
+			</File>
+			<File
+				RelativePath="..\shared\FileDialogEx.h"
+				>
+			</File>
+			<File
+				RelativePath="..\shared\FileTreeCtrl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\shared\NewDialog.h"
+				>
+			</File>
+			<File
+				RelativePath="Resource.h"
+				>
+			</File>
+			<File
+				RelativePath="..\shared\SeException.h"
+				>
+			</File>
+			<File
+				RelativePath="StdAfx.h"
+				>
+			</File>
+			<File
+				RelativePath="Verify.h"
+				>
+			</File>
+			<File
+				RelativePath="VerifyDlg.h"
+				>
+			</File>
+			<File
+				RelativePath="..\version.h"
+				>
+			</File>
+			<File
+				RelativePath="ViewerDlg.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+			<File
+				RelativePath="res\Verify.ico"
+				>
+			</File>
+			<File
+				RelativePath="res\Verify.rc2"
+				>
+			</File>
+		</Filter>
+		<File
+			RelativePath="ReadMe.txt"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /trunk/Verify/Verify.rc
===================================================================
--- /trunk/Verify/Verify.rc	(revision 7)
+++ /trunk/Verify/Verify.rc	(revision 7)
@@ -0,0 +1,217 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_VERIFY_DIALOG DIALOGEX 0, 0, 320, 238
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
+    WS_SYSMENU
+EXSTYLE WS_EX_APPWINDOW
+CAPTION "Eraser: Verify"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    PUSHBUTTON      "&Browse...",IDC_BUTTON_BROWSE,263,102,50,14
+    PUSHBUTTON      "&Erase",IDC_BUTTON_ERASE,45,141,50,14
+    PUSHBUTTON      "&Stop",IDC_BUTTON_STOP,45,180,50,14
+    PUSHBUTTON      "&Close",IDCANCEL,263,216,50,14
+    PUSHBUTTON      "Edit Erasing &Preferences",IDC_BUTTON_METHOD,45,63,96,
+                    14
+    LTEXT           "This program uses the Eraser library to securely overwrite a file using the predefined settings. After each overwriting pass, you are shown the contents of the file so you can verify that the operation was successful.",
+                    IDC_STATIC,38,7,275,31
+    ICON            IDR_MAINFRAME,IDC_STATIC,7,7,20,20
+    LTEXT           "1. Select the file you want to erase.",IDC_STATIC_STEP1,
+                    38,90,275,8
+    EDITTEXT        IDC_EDIT_FILE,45,102,214,14,ES_AUTOHSCROLL | ES_READONLY
+    LTEXT           "2. Start overwriting by pressing ""Erase"".",
+                    IDC_STATIC_STEP2,38,129,275,8
+    LTEXT           "3. Follow the overwriting process.",IDC_STATIC_STEP3,38,
+                    168,275,8
+    LTEXT           "",IDC_STATIC_PROGRESS,121,183,192,8
+    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME,38,38,275,1
+    LTEXT           "0. Select the overwriting method you want to use.",
+                    IDC_STATIC_STEP0,38,51,275,8
+    CONTROL         "",IDC_STATIC,"Static",SS_BLACKFRAME,38,207,275,1
+END
+
+IDD_DLGNEW_DIALOG DIALOGEX 0, 0, 267, 226
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
+    WS_SYSMENU
+EXSTYLE WS_EX_APPWINDOW
+CAPTION "Choose File/Folder"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,210,205,50,14
+    CONTROL         "Tree1",IDC_TREE1,"SysTreeView32",WS_BORDER | WS_TABSTOP,
+                    7,7,253,187
+END
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO 
+BEGIN
+    IDD_VERIFY_DIALOG, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 313
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 231
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Finnish resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FIN)
+#ifdef _WIN32
+LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG_VIEWER DIALOG  0, 0, 399, 305
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Eraser: Verify: File Viewer"
+FONT 8, "MS Sans Serif"
+BEGIN
+    PUSHBUTTON      "<<",IDC_BUTTON_FIRST,7,284,27,14
+    PUSHBUTTON      "<",IDC_BUTTON_PREVIOUS,41,284,19,14
+    PUSHBUTTON      ">",IDC_BUTTON_NEXT,65,284,19,14
+    PUSHBUTTON      ">>",IDC_BUTTON_LAST,91,284,27,14
+    LTEXT           "Move to cluster:",IDC_STATIC,125,286,60,8
+    EDITTEXT        IDC_EDIT_CLUSTER,190,284,40,14,ES_AUTOHSCROLL
+    PUSHBUTTON      "&Go",IDC_BUTTON_GO,235,284,32,14
+    DEFPUSHBUTTON   "&Continue",IDOK,336,284,56,14
+    CONTROL         "",IDC_RICHEDIT_VIEW,"RICHEDIT",TCS_RAGGEDRIGHT | 
+                    TCS_MULTISELECT | WS_BORDER | WS_VSCROLL | WS_HSCROLL | 
+                    WS_TABSTOP,7,7,385,270
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO 
+BEGIN
+    IDD_DIALOG_VIEWER, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 392
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 298
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+    "#define _AFX_NO_OLE_RESOURCES\r\n"
+    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+    "\r\n"
+    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+    "#ifdef _WIN32\r\n"
+    "LANGUAGE 9, 1\r\n"
+    "#pragma code_page(1252)\r\n"
+    "#endif //_WIN32\r\n"
+    "#include ""res\\Verify.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
+    "#include ""afxres.rc""         // Standard components\r\n"
+    "#endif\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDR_MAINFRAME           ICON                    "res\\Verify.ico"
+#endif    // Finnish resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#define _AFX_NO_SPLITTER_RESOURCES
+#define _AFX_NO_OLE_RESOURCES
+#define _AFX_NO_TRACKER_RESOURCES
+#define _AFX_NO_PROPERTY_RESOURCES
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE 9, 1
+#pragma code_page(1252)
+#endif //_WIN32
+#include "res\Verify.rc2"  // non-Microsoft Visual C++ edited resources
+#include "afxres.rc"         // Standard components
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
Index: /trunk/Verify/ViewerDlg.cpp
===================================================================
--- /trunk/Verify/ViewerDlg.cpp	(revision 7)
+++ /trunk/Verify/ViewerDlg.cpp	(revision 7)
@@ -0,0 +1,270 @@
+// ViewerDlg.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "..\EraserDll\EraserDll.h"
+#include "Verify.h"
+#include "ViewerDlg.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+#define DISPLAY_LAST    1
+
+const LPCTSTR szWindowTitle   = "Eraser: Verify: File Viewer [%s]";
+const LPCTSTR szHeader        = "%s (%I64u bytes)\r\n\r\nCluster %u (%u bytes, offset: %I64u bytes):\r\n";
+const LPCTSTR szLineFormat    = "%.4X:  %.8X  %.8X  %.8X  %.8X   : %s\r\n";
+const LPCTSTR szEndOfFile     = "\r\nEnd Of File at 0x%.4X.\r\n";
+
+const int iOffsetLength       = 5;
+const int iStringStart        = 48;
+const int iStringEnd          = 66;
+
+/////////////////////////////////////////////////////////////////////////////
+// CViewerDlg dialog
+
+
+CViewerDlg::CViewerDlg(CWnd* pParent /*=NULL*/) :
+CDialog(CViewerDlg::IDD, pParent),
+m_hFile(INVALID_HANDLE_VALUE),
+m_dwClusterSize(0)
+{
+	//{{AFX_DATA_INIT(CViewerDlg)
+	m_dwCurrentCluster = 0;
+	//}}AFX_DATA_INIT
+}
+
+
+void CViewerDlg::DoDataExchange(CDataExchange* pDX)
+{
+	CDialog::DoDataExchange(pDX);
+	//{{AFX_DATA_MAP(CViewerDlg)
+	DDX_Control(pDX, IDC_RICHEDIT_VIEW, m_recView);
+	DDX_Text(pDX, IDC_EDIT_CLUSTER, m_dwCurrentCluster);
+	//}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(CViewerDlg, CDialog)
+	//{{AFX_MSG_MAP(CViewerDlg)
+	ON_BN_CLICKED(IDC_BUTTON_FIRST, OnButtonFirst)
+	ON_BN_CLICKED(IDC_BUTTON_GO, OnButtonGo)
+	ON_BN_CLICKED(IDC_BUTTON_LAST, OnButtonLast)
+	ON_BN_CLICKED(IDC_BUTTON_NEXT, OnButtonNext)
+	ON_BN_CLICKED(IDC_BUTTON_PREVIOUS, OnButtonPrevious)
+	ON_WM_DESTROY()
+	//}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CViewerDlg message handlers
+
+void CViewerDlg::OnButtonFirst() 
+{
+    m_dwCurrentCluster = 0;
+    DisplayCluster(0);
+    UpdateData(FALSE);
+}
+
+void CViewerDlg::OnButtonGo() 
+{
+	UpdateData();
+    DisplayCluster(m_dwCurrentCluster);
+    UpdateData(FALSE);
+}
+
+void CViewerDlg::OnButtonLast() 
+{
+	DisplayCluster(0, DISPLAY_LAST);
+    UpdateData(FALSE);
+}
+
+void CViewerDlg::OnButtonNext() 
+{
+    DisplayCluster(++m_dwCurrentCluster);
+    UpdateData(FALSE);	
+}
+
+void CViewerDlg::OnButtonPrevious() 
+{
+    if (m_dwCurrentCluster > 0) {
+        DisplayCluster(--m_dwCurrentCluster);
+    } else {
+        DisplayCluster(0, DISPLAY_LAST);
+    }
+    UpdateData(FALSE);
+}
+
+BOOL CViewerDlg::OnInitDialog() 
+{
+    if (!m_strMessage.IsEmpty()) {
+        CString strTemp;
+        strTemp.Format(szWindowTitle, (LPCTSTR)m_strMessage);
+        SetWindowText((LPCTSTR)strTemp);
+    }
+	CDialog::OnInitDialog();
+	
+    // set default font
+  	CHARFORMAT cf;
+
+	cf.cbSize = sizeof (CHARFORMAT);  
+	cf.dwMask = CFM_FACE; 
+	lstrcpyn(cf.szFaceName, "Courier New", LF_FACESIZE); 
+ 
+    m_recView.SetDefaultCharFormat(cf); 
+
+    // open file
+    if (m_strFileName.GetLength() <= _MAX_DRIVE) {
+        m_recView.SetWindowText("No file selected.");
+    } else {
+        // get cluster size
+        TCHAR szDrive[] = " :\\";
+        szDrive[0] = m_strFileName[0];
+
+        if (eraserError(eraserGetClusterSize((E_IN LPVOID)szDrive, 3,
+                &m_dwClusterSize))) {
+            m_dwClusterSize = 2048;
+        }
+
+        m_hFile = CreateFile((LPCTSTR)m_strFileName,
+                             GENERIC_READ | GENERIC_WRITE,
+                             FILE_SHARE_READ | FILE_SHARE_WRITE,
+                             NULL,
+                             OPEN_EXISTING,
+                             0,
+                             NULL);
+
+        if (m_hFile == INVALID_HANDLE_VALUE) {
+            m_recView.SetWindowText("Failed to open file.");
+        } else {
+            DisplayCluster(0);
+        }
+    }
+	
+	return TRUE;  // return TRUE unless you set the focus to a control
+	              // EXCEPTION: OCX Property Pages should return FALSE
+}
+
+void CViewerDlg::OnDestroy() 
+{
+	CDialog::OnDestroy();
+	
+	CloseHandle(m_hFile);
+    m_hFile = INVALID_HANDLE_VALUE;
+}
+
+BOOL CViewerDlg::DisplayCluster(DWORD dwCluster, DWORD dwSpecial)
+{
+    // get file size
+    ULARGE_INTEGER uiFileSize;
+    uiFileSize.LowPart = GetFileSize(m_hFile, &uiFileSize.HighPart);
+
+    if (uiFileSize.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR) {
+        m_recView.SetWindowText("Failed to get file size.");
+        return FALSE;
+    } else {
+        CString strText;
+        ULARGE_INTEGER uiStart;
+        BYTE szString[16 + 1];
+        DWORD dwData[4];
+        LPBYTE pbData = (LPBYTE)dwData;
+        DWORD dwRead = 0;
+    
+        szString[16] = 0;
+        uiStart.QuadPart = UInt32x32To64(dwCluster, m_dwClusterSize);
+
+        if (dwSpecial == DISPLAY_LAST) {
+            dwCluster = (DWORD)(uiFileSize.QuadPart / m_dwClusterSize);
+            uiStart.QuadPart = UInt32x32To64(dwCluster, m_dwClusterSize);
+            if (uiStart.QuadPart == uiFileSize.QuadPart) {
+                dwCluster--;
+                uiStart.QuadPart -= m_dwClusterSize;
+            }
+            m_dwCurrentCluster = dwCluster;
+        } else if (uiStart.QuadPart >= uiFileSize.QuadPart) {
+            dwCluster = 0;
+            m_dwCurrentCluster = 0;
+            uiStart.QuadPart = 0;
+        }
+
+        // don't draw to window until everything is formatted properly
+        m_recView.SetRedraw(FALSE);
+
+        // print headers
+        strText.Format(szHeader, (LPCTSTR)m_strFileName, uiFileSize.QuadPart,
+            dwCluster, m_dwClusterSize, uiStart.QuadPart);
+        m_recView.SetWindowText((LPCTSTR)strText);
+
+        // read the given cluster
+        SetFilePointer(m_hFile, uiStart.LowPart, (LPLONG)&uiStart.HighPart, FILE_BEGIN);
+
+        for (DWORD i = 0; i < m_dwClusterSize; i += 16) {
+            memset(dwData, 0, 16);
+            ReadFile(m_hFile, (LPVOID)dwData, 16, &dwRead, NULL);
+
+            for (DWORD j = 0; j < 16; j++) {
+                szString[j] = (TCHAR) ((isgraph((int)pbData[j])) ? pbData[j] : '.');
+            }
+
+            AddDataLine(i, dwData, (LPCTSTR)szString);
+
+            if ((uiStart.QuadPart + i + 16) >= uiFileSize.QuadPart) {
+                strText.Format(szEndOfFile, i + dwRead);
+                AppendText((LPCTSTR)strText);
+                break;
+            }
+        }
+
+        // and draw to window
+        m_recView.SetRedraw(TRUE);
+        m_recView.Invalidate();
+
+        return TRUE;
+    }
+}
+
+void CViewerDlg::AddDataLine(DWORD dwOffset, DWORD *pdwData, LPCTSTR szString)
+{
+    CString strFormat;
+    CHARFORMAT cf;
+
+    // bold font
+	cf.cbSize = sizeof(CHARFORMAT);
+	cf.dwMask = CFM_BOLD;
+	cf.dwEffects = CFE_BOLD;
+
+    strFormat.Format(szLineFormat, dwOffset, pdwData[0], pdwData[1],
+        pdwData[2], pdwData[3], szString);
+
+    // this is faster than calling AppendFormattedText
+    int iTextStart = m_recView.GetWindowTextLength();
+    m_recView.SetSel(iTextStart, -1);
+	m_recView.ReplaceSel(strFormat);
+
+    // set bold text for offset
+    m_recView.SetSel(iTextStart, iTextStart + iOffsetLength);
+	m_recView.SetSelectionCharFormat(cf);
+
+    // set bold text for the string
+    m_recView.SetSel(iTextStart + iStringStart, iTextStart + iStringEnd);
+	m_recView.SetSelectionCharFormat(cf);
+}
+
+int CViewerDlg::AppendText(LPCTSTR szString)
+{
+   	int iTextStart = m_recView.GetWindowTextLength();
+
+    m_recView.SetSel(iTextStart, -1);
+	m_recView.ReplaceSel(szString);
+    
+    return iTextStart;
+}
+
+void CViewerDlg::AppendFormattedText(LPCTSTR szString, CHARFORMAT& cf)
+{
+    m_recView.SetSel(AppendText(szString), -1);
+	m_recView.SetSelectionCharFormat(cf);
+}
