source: trunk/Erasext/Erasext.cpp @ 5

Revision 5, 2.9 KB checked in by lowjoel, 7 years ago (diff)

Added the source files from Erasext (SVN migration commit 3)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1// Erasext.cpp
2//
3// Eraser. Secure data removal. For Windows.
4// Copyright © 1997-2001  Sami Tolvanen (sami@tolvanen.com).
5// Copyright © 2001-2006  Garrett Trant (support@heidi.ie).
6//
7// This program is free software; you can redistribute it and/or
8// modify it under the terms of the GNU General Public License
9// as published by the Free Software Foundation; either version 2
10// of the License, or (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program; if not, write to the Free Software
19// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20// 02111-1307, USA.
21
22#include "stdafx.h"
23#include "Erasext.h"
24
25#include "..\EraserDll\eraserdll.h"
26#include "ConfirmDialog.h"
27#include "WipeProgDlg.h"
28
29#ifdef _DEBUG
30#define new DEBUG_NEW
31#undef THIS_FILE
32static char THIS_FILE[] = __FILE__;
33#endif
34
35/////////////////////////////////////////////////////////////////////////////
36// CErasextApp
37
38BEGIN_MESSAGE_MAP(CErasextApp, CWinApp)
39    //{{AFX_MSG_MAP(CErasextApp)
40        // NOTE - the ClassWizard will add and remove mapping macros here.
41        //    DO NOT EDIT what you see in these blocks of generated code!
42    //}}AFX_MSG_MAP
43END_MESSAGE_MAP()
44
45/////////////////////////////////////////////////////////////////////////////
46// CErasextApp construction
47
48CErasextApp::CErasextApp()
49{
50    _set_se_translator(SeTranslator);
51}
52
53/////////////////////////////////////////////////////////////////////////////
54// The one and only CErasextApp object
55
56CErasextApp theApp;
57
58/////////////////////////////////////////////////////////////////////////////
59// Special entry points required for inproc servers
60
61STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
62{
63    AFX_MANAGE_STATE(AfxGetStaticModuleState());
64    TRACE("DllGetClassObject\n");
65    return AfxDllGetClassObject(rclsid, riid, ppv);
66}
67
68STDAPI DllCanUnloadNow(void)
69{
70    AFX_MANAGE_STATE(AfxGetStaticModuleState());
71    TRACE("DllCanUnloadNow\n");
72    return S_FALSE; //AfxDllCanUnloadNow();
73}
74
75// by exporting DllRegisterServer, you can use regsvr.exe
76STDAPI DllRegisterServer(void)
77{
78    AFX_MANAGE_STATE(AfxGetStaticModuleState());
79    TRACE("DllRegisterServer\n");
80    COleObjectFactory::UpdateRegistryAll();
81    return S_OK;
82}
83
84BOOL CErasextApp::InitInstance()
85{
86    TRACE("CErasextApp::InitInstance\n");
87    // Register all OLE server (factories) as running.  This enables the
88    // OLE libraries to create objects from other applications.
89    COleObjectFactory::RegisterAll();
90
91    eraserInit();
92    return CWinApp::InitInstance();
93}
94
95int CErasextApp::ExitInstance()
96{
97    eraserEnd();
98    return CWinApp::ExitInstance();
99}
Note: See TracBrowser for help on using the repository browser.