Changeset 37
- Timestamp:
- 10/11/2007 2:05:16 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
Eraser.vcproj (modified) (4 diffs)
-
KeyComboDlg.cpp (modified) (2 diffs)
-
Launcher/Launcher.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Eraser.vcproj
r24 r37 54 54 Optimization="0" 55 55 AdditionalIncludeDirectories="./" 56 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE "56 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WIN32_IE=0x600;_WIN32_WINNT=0x600" 57 57 MinimalRebuild="true" 58 58 ExceptionHandling="2" … … 148 148 Optimization="0" 149 149 AdditionalIncludeDirectories="./" 150 PreprocessorDefinitions="_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE "150 PreprocessorDefinitions="_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WIN32_IE=0x600;_WIN32_WINNT=0x600" 151 151 MinimalRebuild="true" 152 152 ExceptionHandling="2" … … 243 243 Optimization="2" 244 244 AdditionalIncludeDirectories="./" 245 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE "245 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WIN32_IE=0x600;_WIN32_WINNT=0x600" 246 246 StringPooling="true" 247 247 ExceptionHandling="2" … … 340 340 Optimization="2" 341 341 AdditionalIncludeDirectories="./" 342 PreprocessorDefinitions="NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE "342 PreprocessorDefinitions="NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WIN32_IE=0x600;_WIN32_WINNT=0x600" 343 343 StringPooling="true" 344 344 ExceptionHandling="2" -
trunk/KeyComboDlg.cpp
r29 r37 26 26 #include "KeyComboDlg.h" 27 27 #include <shared/key.h> 28 28 #include <commctrl.h> 29 29 30 30 const LPCTSTR szAccelerKey = "Acceler"; … … 92 92 // function and call CRichEditCtrl().SetEventMask() 93 93 // with the ENM_CHANGE flag ORed into the mask. 94 95 // TODO: Add your control notification handler code here96 //char cLine[10];97 94 char ch[10]; 98 95 m_eKey.GetLine(0,ch,1); 99 96 CString strLine(ch); 100 if (!strLine.IsEmpty()) 97 static bool busy = false; 98 if (busy) 99 return; 100 busy = true; 101 102 if (!strLine.Trim().IsEmpty()) 101 103 { 102 104 CString strTmp(m_strRegKey.MakeUpper()); 103 105 strLine.MakeUpper(); 104 if (strTmp.Find(strLine[0]) ==-1 ) { 105 m_eKey.Undo(); 106 m_eKey.SetWindowText(""); 106 if (strTmp.Find(strLine[0]) == -1) { 107 //Invalid selection, clear the entry 108 m_eKey.SetWindowText("m"); 109 110 //TODO: This works only with XP/Vista. What about others? 111 EDITBALLOONTIP ebtt; 112 ZeroMemory(&ebtt, sizeof(ebtt)); 113 ebtt.cbStruct = sizeof(ebtt); 114 ebtt.pszTitle = L"Invalid shortcut"; 115 ebtt.ttiIcon = TTI_ERROR; 116 117 strTmp = "The shortcut value must be one of the characters " + strTmp; 118 ebtt.pszText = new wchar_t[strTmp.GetLength() + 1]; 119 mbstowcs((wchar_t*)ebtt.pszText, strTmp.GetBuffer(), strTmp.GetLength() + 1); 120 121 m_eKey.SendMessage(EM_SHOWBALLOONTIP, 0, (LPARAM)&ebtt); 122 delete[] ebtt.pszText; 107 123 } 108 124 } 109 125 busy = false; 110 126 } -
trunk/Launcher/Launcher.cpp
r34 r37 1 //2 // -disk k:\ -method random 1 -results3 //4 1 // Launcher.cpp 2 // $Id$ 5 3 // 6 4 // Eraser. Secure data removal. For Windows. 7 5 // Copyright © 1997-2001 Sami Tolvanen (sami@tolvanen.com). 6 // Copyright © 2001-2006 Garrett Trant (support@heidi.ie). 7 // Copyright © 2007 The Eraser Project. 8 8 // 9 9 // This program is free software; you can redistribute it and/or … … 466 466 } 467 467 468 // is the user naive enough to select the first/last 2KB pass with free space? 469 if (emMethod == ERASER_METHOD_FIRST_LAST_2KB && bDrive) 470 { 471 AfxMessageBox("The first/last 2KB erase cannot be used with Free Space erases.", MB_ICONERROR); 472 return FALSE; 473 } 474 468 475 //Now that the command line has been passed, check if we should display the 469 476 //results dialog (because it may not be overridde by the user) 470 477 CKey kReg; 471 kReg.Open(HKEY_CURRENT_USER, ERASER_REGISTRY_BASE); 472 if (bResults == -1) 473 kReg.GetValue(bResults, ERASER_REGISTRY_RESULTS_FILES, TRUE); 474 if (bResultsOnError == -1) 475 kReg.GetValue(bResultsOnError, ERASER_REGISTRY_RESULTS_WHENFAILED, FALSE); 478 if (kReg.Open(HKEY_CURRENT_USER, ERASER_REGISTRY_BASE)) 479 { 480 if (bResults == -1) 481 kReg.GetValue(bResults, ERASER_REGISTRY_RESULTS_FILES, TRUE); 482 if (bResultsOnError == -1) 483 kReg.GetValue(bResultsOnError, ERASER_REGISTRY_RESULTS_WHENFAILED, FALSE); 484 kReg.Close(); 485 } 476 486 477 487 try
Note: See TracChangeset
for help on using the changeset viewer.
