From 3f95d417d9e623ac0c74df8ef11d7a01846392dd Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 17 Sep 2003 19:07:23 +0000 Subject: Initial Import --- .cvsignore | 4 + Checklist/95check.bmp | Bin 0 -> 338 bytes Checklist/AdvancedOptions.bmp | Bin 0 -> 3270 bytes Checklist/AdvancedPage.cpp | 317 ++ Checklist/AdvancedPage.h | 116 + Checklist/Checklist.cpp | 121 + Checklist/Checklist.dep | 190 + Checklist/Checklist.dsp | 474 +++ Checklist/Checklist.h | 57 + Checklist/Checklist.idl | 20 + Checklist/Checklist.mk | 934 +++++ Checklist/Checklist.rc | 306 ++ Checklist/Checklist.rgs | 11 + Checklist/ChecklistApp.cpp | 83 + Checklist/ChecklistApp.h | 24 + Checklist/Checklistps.def | 11 + Checklist/Checklistps.mk | 16 + Checklist/DonePage.cpp | 87 + Checklist/DonePage.h | 55 + Checklist/ExtraPage.cpp | 70 + Checklist/ExtraPage.h | 63 + Checklist/FirstPage.cpp | 76 + Checklist/FirstPage.h | 60 + Checklist/NightSecWizard.cpp | 291 ++ Checklist/NightSecWizard.h | 151 + Checklist/NormalPage.cpp | 189 + Checklist/NormalPage.h | 78 + Checklist/StdAfx.cpp | 12 + Checklist/StdAfx.h | 44 + Checklist/dlldata.c | 38 + Checklist/res/Night Security Setup.ico | Bin 0 -> 766 bytes Checklist/res/Night Security Stub.ico | Bin 0 -> 1078 bytes Checklist/res/bitmap2.bmp | Bin 0 -> 11560 bytes Checklist/res/ico00002.ico | Bin 0 -> 766 bytes Checklist/res/ico00003.ico | Bin 0 -> 766 bytes Checklist/res/menu.bmp | Bin 0 -> 21852 bytes Checklist/res/nightsec.bmp | Bin 0 -> 9164 bytes Checklist/res/shutdown.ico | Bin 0 -> 766 bytes Checklist/resource.h | 43 + CmdLine/CmdLine.cpp | 115 + CmdLine/CmdLine.dsp | 361 ++ CmdLine/CmdLine.h | 57 + CmdLine/CmdLine.idl | 20 + CmdLine/CmdLine.rc | 170 + CmdLine/CmdLine.rgs | 11 + CmdLine/CmdLineApp.cpp | 104 + CmdLine/CmdLineApp.h | 26 + CmdLine/CmdLineDlg.cpp | 58 + CmdLine/CmdLineDlg.h | 39 + CmdLine/CmdLineps.def | 11 + CmdLine/CmdLineps.mk | 16 + CmdLine/StdAfx.cpp | 12 + CmdLine/StdAfx.h | 41 + CmdLine/res/Night Security Stub.ico | Bin 0 -> 1078 bytes CmdLine/resource.h | 20 + Common/CmptData.cpp | 200 + Common/CmptData.h | 49 + Common/ComponentArray.cpp | 281 ++ Common/ComponentArray.h | 80 + Common/ComponentData.cpp | 407 ++ Common/ComponentData.h | 111 + Common/ComponentHolder.cpp | 386 ++ Common/ComponentHolder.h | 104 + Common/Defines.h | 32 + Common/NightSec.h | 591 +++ Common/NightSecApp.cpp | 138 + Common/NightSecApp.h | 41 + Common/OneInstance.h | 63 + Common/PropPageHolder.cpp | 317 ++ Common/PropPageHolder.h | 89 + Common/events.h | 6 + Common/interfaces.cpp | 4 + Common/interfaces.h | 14 + Common/types.h | 10 + Graphics/Animations/ENC.MOV | Bin 0 -> 46042 bytes Graphics/Animations/FILECOMP.avi | Bin 0 -> 11748 bytes Graphics/Animations/FILECOPY.avi | Bin 0 -> 7974 bytes Graphics/Animations/Final/Enc.ppj | 4201 ++++++++++++++++++++ Graphics/Animations/Final/open.psd | Bin 0 -> 15793 bytes Graphics/Animations/Final2/01.bmp | Bin 0 -> 6680 bytes Graphics/Animations/Final2/02.bmp | Bin 0 -> 6680 bytes Graphics/Animations/Final2/03.bmp | Bin 0 -> 6680 bytes Graphics/Animations/Final2/04.bmp | Bin 0 -> 6680 bytes Graphics/Animations/Final2/05.bmp | Bin 0 -> 6680 bytes Graphics/Animations/Final2/06.bmp | Bin 0 -> 6680 bytes Graphics/Animations/Final2/07.bmp | Bin 0 -> 6680 bytes Graphics/Animations/Final2/closed.psd | Bin 0 -> 16009 bytes Graphics/Animations/Final2/output.avi | Bin 0 -> 62976 bytes Graphics/Animations/Final3/enc01.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc02.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc03.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc04.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc05.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc06.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc07.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc08.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc09.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc10.bmp | Bin 0 -> 2888 bytes Graphics/Animations/Final3/enc11.bmp | Bin 0 -> 2888 bytes Graphics/Animations/Final3/enc12.bmp | Bin 0 -> 2888 bytes Graphics/Animations/Final3/enc13.bmp | Bin 0 -> 2884 bytes Graphics/Animations/Final3/enc14.bmp | Bin 0 -> 2888 bytes Graphics/Animations/Final3/enc15.bmp | Bin 0 -> 2900 bytes Graphics/Animations/Final3/enc16.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc17.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc18.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc19.bmp | Bin 0 -> 2892 bytes Graphics/Animations/Final3/enc20.bmp | Bin 0 -> 2892 bytes Graphics/Animations/TAGSELEC.avi | Bin 0 -> 16986 bytes Graphics/Animations/blk.bmp | Bin 0 -> 16856 bytes Graphics/Animations/edit_enc.avi | Bin 0 -> 45468 bytes Graphics/Animations/enc.avi | Bin 0 -> 50176 bytes Graphics/Animations/enc.bmp | Bin 0 -> 16856 bytes Graphics/Animations/enc01.bmp | Bin 0 -> 16856 bytes Graphics/Animations/enc02.bmp | Bin 0 -> 16856 bytes Graphics/Animations/enc03.bmp | Bin 0 -> 16856 bytes Graphics/Animations/enc04.bmp | Bin 0 -> 16856 bytes Graphics/Animations/enc05.bmp | Bin 0 -> 16856 bytes Graphics/Animations/enc06.bmp | Bin 0 -> 16856 bytes Graphics/Animations/enc07.bmp | Bin 0 -> 16856 bytes Graphics/Animations/enc08.bmp | Bin 0 -> 16856 bytes Graphics/Animations/enc09.bmp | Bin 0 -> 16856 bytes Graphics/Animations/enc10.bmp | Bin 0 -> 16856 bytes Graphics/Animations/enc11.bmp | Bin 0 -> 16856 bytes Graphics/Animations/enc_org.avi | Bin 0 -> 116736 bytes Graphics/Animations/open.bmp | Bin 0 -> 16856 bytes Graphics/nightsec_logo.tif | Bin 0 -> 5600 bytes Graphics/setup.bmp | Bin 0 -> 22920 bytes Graphics/setup.psd | Bin 0 -> 116669 bytes Graphics/setup24.bmp | Bin 0 -> 135256 bytes Help/Heading.bmp | Bin 0 -> 2412 bytes Help/Help Matic/NIGHT SECURITY.HLP | Bin 0 -> 28039 bytes Help/Help Matic/Night Security.cnt | 20 + Help/Help Matic/Night Security.hmp | Bin 0 -> 33122 bytes Help/Help Matic/Night Security.hpj | 36 + Help/Help Matic/Night Security.log | 15 + Help/Help Matic/Night Security.rtf | 381 ++ Help/Help Matic/night security.GID | Bin 0 -> 10836 bytes Help/NIGHTSEC.GID | Bin 0 -> 10839 bytes Help/NIGHTSEC.HLP | Bin 0 -> 33740 bytes Help/NightSec.FTS | Bin 0 -> 39936 bytes Help/NightSec.cnt | 23 + Help/NightSec.hmp | Bin 0 -> 57331 bytes Help/NightSec.hpj | 74 + Help/NightSec.log | 15 + Help/NightSec.rtf | 624 +++ Help/NightSec.rtf.XRP | 624 +++ Help/crack.rpl | Bin 0 -> 394 bytes Help/crack.xpl | Bin 0 -> 463 bytes Help/del.bmp | Bin 0 -> 372 bytes Help/inetfiles.bmp | Bin 0 -> 612 bytes Help/ins.bmp | Bin 0 -> 372 bytes Help/nightsec.bmp | Bin 0 -> 840 bytes Help/nightsectrans.bmp | Bin 0 -> 840 bytes Help/note.bmp | Bin 0 -> 768 bytes Help/recycle.bmp | Bin 0 -> 1172 bytes Help/scandisk.bmp | Bin 0 -> 604 bytes Help/swapfile.bmp | Bin 0 -> 564 bytes Installshield/Component Definitions/Default.cdf | 238 ++ Installshield/Component Definitions/Default.fgl | 48 + Installshield/Copy of Night Security.ipr | 47 + Installshield/Description.txt | 0 Installshield/File Groups/Default.fdf | 151 + Installshield/File Groups/Help Files.fgl | 9 + Installshield/File Groups/Network Components.fgl | 7 + Installshield/File Groups/Program DLLs.fgl | 7 + .../File Groups/Program Executable Files.fgl | 9 + Installshield/File Groups/Shared DLLs NoReg.fgl | 7 + Installshield/File Groups/Shared DLLs Reg.fgl | 7 + Installshield/File Groups/Support Files.fgl | 8 + Installshield/File Groups/Windows Folder.fgl | 7 + Installshield/File Groups/XPY DLL.fgl | 7 + Installshield/Media/Default/default.mda | 42 + Installshield/Media/Disk/default.mda | 61 + Installshield/Night Security.ipr | 58 + Installshield/Notes.txt | 0 Installshield/Registry Entries/Default.rge | 4 + Installshield/Script Files/SETUP.dbg | Bin 0 -> 28652 bytes Installshield/Script Files/SETUP.ino | Bin 0 -> 62667 bytes Installshield/Script Files/SETUP.ins | Bin 0 -> 61044 bytes Installshield/Script Files/Setup.obs | Bin 0 -> 69932 bytes Installshield/Script Files/setup.rul | 798 ++++ .../Language Independent/OS Independent/setup.bmp | Bin 0 -> 22920 bytes Installshield/Shell Objects/Default.shl | 12 + Installshield/String Tables/0009-English/value.shl | 21 + Installshield/String Tables/Default.shl | 66 + Installshield/Text Substitutions/Build.tsb | 60 + Installshield/Text Substitutions/Setup.tsb | 86 + Interfaces/CmptIfaces.h | 780 ++++ Interfaces/CmptIfaces.idl | 107 + Interfaces/Interfaces.dsp | 73 + Interfaces/Interfaces.dsw | 29 + Interfaces/SiteIfaces.h | 332 ++ Interfaces/SiteIfaces.idl | 44 + Interfaces/dlldata.c | 40 + NSCmpts/ActionEngine.cpp | 276 ++ NSCmpts/ActionEngine.h | 157 + NSCmpts/Backup.cpp | 177 + NSCmpts/Backup.h | 64 + NSCmpts/Backup.rgs | 42 + NSCmpts/BackupActions.cpp | 293 ++ NSCmpts/BackupActions.h | 113 + NSCmpts/BackupAdvancedProp.cpp | 56 + NSCmpts/BackupAdvancedProp.h | 100 + NSCmpts/BackupAdvancedProp.rgs | 13 + NSCmpts/BackupData.cpp | 105 + NSCmpts/BackupData.h | 47 + NSCmpts/BackupDestProp.cpp | 67 + NSCmpts/BackupDestProp.h | 89 + NSCmpts/BackupDestProp.rgs | 13 + NSCmpts/BackupProgress.cpp | 20 + NSCmpts/BackupSourceProp.cpp | 27 + NSCmpts/BackupSourceProp.h | 91 + NSCmpts/BackupSourceProp.rgs | 13 + NSCmpts/CmptIfaces.h | 780 ++++ NSCmpts/DeleteSwapFile.cpp | 95 + NSCmpts/DeleteSwapFile.h | 71 + NSCmpts/EmptyRecycleBin.cpp | 315 ++ NSCmpts/EmptyRecycleBin.h | 110 + NSCmpts/EmptyRecycleBin.rgs | 42 + NSCmpts/EmptyTempFolder.cpp | 197 + NSCmpts/EmptyTempFolder.h | 59 + NSCmpts/Encrypt.cpp | 144 + NSCmpts/Encrypt.h | 103 + NSCmpts/Encrypt.rgs | 43 + NSCmpts/EncryptActions.cpp | 235 ++ NSCmpts/EncryptActions.h | 93 + NSCmpts/EncryptAdvancedProp.cpp | 51 + NSCmpts/EncryptAdvancedProp.h | 104 + NSCmpts/EncryptAdvancedProp.rgs | 14 + NSCmpts/EncryptData.cpp | 105 + NSCmpts/EncryptData.h | 47 + NSCmpts/EncryptSourceProp.cpp | 28 + NSCmpts/EncryptSourceProp.h | 87 + NSCmpts/EncryptSourceProp.rgs | 23 + NSCmpts/IDropTargetImpl.cpp | 20 + NSCmpts/IDropTargetImpl.h | 20 + NSCmpts/IgnoreProp.cpp | 179 + NSCmpts/IgnoreProp.h | 51 + NSCmpts/NSCmpts.aps | Bin 0 -> 126400 bytes NSCmpts/NSCmpts.cpp | 130 + NSCmpts/NSCmpts.def | 9 + NSCmpts/NSCmpts.dsp | 695 ++++ NSCmpts/NSCmpts.h | 298 ++ NSCmpts/NSCmpts.idl | 123 + NSCmpts/NSCmpts.plg | 16 + NSCmpts/NSCmpts.rc | 516 +++ NSCmpts/NSCmptsps.def | 11 + NSCmpts/NSCmptsps.mk | 16 + NSCmpts/NSMessages.h | 35 + NSCmpts/NSSettings.h | 32 + NSCmpts/NightSecError.cpp | 176 + NSCmpts/NightSecError.h | 134 + NSCmpts/ProgressDlg.cpp | 151 + NSCmpts/ProgressDlg.h | 73 + NSCmpts/PromptClose.cpp | 11 + NSCmpts/PromptClose.h | 51 + NSCmpts/RunScanDisk.cpp | 140 + NSCmpts/RunScanDisk.h | 107 + NSCmpts/SourceProp.cpp | 306 ++ NSCmpts/SourceProp.h | 80 + NSCmpts/StdAfx.cpp | 12 + NSCmpts/StdAfx.h | 48 + NSCmpts/TempActions.cpp | 153 + NSCmpts/TempActions.h | 79 + NSCmpts/TempWarnDlg.cpp | 44 + NSCmpts/TempWarnDlg.h | 35 + NSCmpts/WipefreeSpace.cpp | 217 + NSCmpts/WipefreeSpace.h | 102 + NSCmpts/dlldata.c | 40 + NSCmpts/res/161.avi | Bin 0 -> 14336 bytes NSCmpts/res/DeleteSwapFile.rgs | 42 + NSCmpts/res/EmptyTempFolder.rgs | 42 + NSCmpts/res/Night Security Worker.ico | Bin 0 -> 1078 bytes NSCmpts/res/RunScanDisk.rgs | 42 + NSCmpts/res/WipefreeSpace.rgs | 42 + NSCmpts/res/advanced.ico | Bin 0 -> 766 bytes NSCmpts/res/backup1.ico | Bin 0 -> 766 bytes NSCmpts/res/backupad.bin | 13 + NSCmpts/res/backupde.bin | 13 + NSCmpts/res/copyfile.ico | Bin 0 -> 766 bytes NSCmpts/res/cursor1.cur | Bin 0 -> 326 bytes NSCmpts/res/enc.avi | Bin 0 -> 45468 bytes NSCmpts/res/ico00001.ico | Bin 0 -> 2998 bytes NSCmpts/res/ico00002.ico | Bin 0 -> 766 bytes NSCmpts/res/ico00003.ico | Bin 0 -> 766 bytes NSCmpts/res/ico00004.ico | Bin 0 -> 766 bytes NSCmpts/res/ico00005.ico | Bin 0 -> 766 bytes NSCmpts/res/ico00006.ico | Bin 0 -> 766 bytes NSCmpts/res/ico00007.ico | Bin 0 -> 766 bytes NSCmpts/res/ico00008.ico | Bin 0 -> 766 bytes NSCmpts/res/icon1.ico | Bin 0 -> 766 bytes NSCmpts/res/icon2.ico | Bin 0 -> 766 bytes NSCmpts/res/idr_.bin | 23 + NSCmpts/res/items.ico | Bin 0 -> 766 bytes NSCmpts/res/n_161.avi | Bin 0 -> 10144 bytes NSCmpts/res/n_temp.avi | Bin 0 -> 11000 bytes NSCmpts/res/new1.ico | Bin 0 -> 766 bytes NSCmpts/res/recycle.ico | Bin 0 -> 2998 bytes NSCmpts/res/temp.avi | Bin 0 -> 12722 bytes NSCmpts/res/wxpy.ico | Bin 0 -> 766 bytes NSCmpts/resource.h | 168 + NetCmpts/ClearInetCache.cpp | 579 +++ NetCmpts/ClearInetCache.h | 165 + NetCmpts/ClearInetCache.rgs | 42 + NetCmpts/CmptIfaces.h | 780 ++++ NetCmpts/NetCmpts.cpp | 100 + NetCmpts/NetCmpts.def | 9 + NetCmpts/NetCmpts.dsp | 417 ++ NetCmpts/NetCmpts.h | 78 + NetCmpts/NetCmpts.idl | 30 + NetCmpts/NetCmpts.plg | 16 + NetCmpts/NetCmpts.rc | 223 ++ NetCmpts/NetCmptsps.def | 11 + NetCmpts/NetCmptsps.mk | 16 + NetCmpts/ProgressDlg.cpp | 45 + NetCmpts/ProgressDlg.h | 70 + NetCmpts/StdAfx.cpp | 12 + NetCmpts/StdAfx.h | 38 + NetCmpts/dlldata.c | 40 + NetCmpts/parseurl.cpp | 128 + NetCmpts/parseurl.h | 17 + NetCmpts/res/Night Security Worker.ico | Bin 0 -> 1078 bytes NetCmpts/res/ico00003.ico | Bin 0 -> 766 bytes NetCmpts/res/ico00005.ico | Bin 0 -> 766 bytes NetCmpts/res/icon1.ico | Bin 0 -> 1078 bytes NetCmpts/res/inetshor.ico | Bin 0 -> 766 bytes NetCmpts/res/new1.ico | Bin 0 -> 766 bytes NetCmpts/resource.h | 41 + Night Security.dsw | 89 + Shutdown/BatchFileCmpt.cpp | 251 ++ Shutdown/BatchFileCmpt.h | 58 + Shutdown/ItemDlg.cpp | 195 + Shutdown/ItemDlg.h | 81 + Shutdown/LogDlg.cpp | 502 +++ Shutdown/LogDlg.h | 102 + Shutdown/LogDlg.rgs | 21 + Shutdown/PersistPosWindow.cpp | 11 + Shutdown/PersistPosWindow.h | 112 + Shutdown/Shutdown.cpp | 118 + Shutdown/Shutdown.dsp | 455 +++ Shutdown/Shutdown.h | 57 + Shutdown/Shutdown.idl | 38 + Shutdown/Shutdown.rc | 236 ++ Shutdown/Shutdown.rgs | 11 + Shutdown/ShutdownApp.cpp | 128 + Shutdown/ShutdownApp.h | 25 + Shutdown/ShutdownCP.h | 36 + Shutdown/ShutdownSite.cpp | 78 + Shutdown/ShutdownSite.h | 64 + Shutdown/Shutdownps.def | 11 + Shutdown/Shutdownps.mk | 16 + Shutdown/SizingDialog.cpp | 20 + Shutdown/SizingDialog.h | 171 + Shutdown/StdAfx.cpp | 12 + Shutdown/StdAfx.h | 48 + Shutdown/res/LogDlg.rgs | 21 + Shutdown/res/Night Security Shutdown.ico | Bin 0 -> 1078 bytes Shutdown/res/Night Security Stub.ico | Bin 0 -> 1078 bytes Shutdown/res/bitmap1.bmp | Bin 0 -> 758 bytes Shutdown/res/checks1.bmp | Bin 0 -> 374 bytes Shutdown/res/icon1.ico | Bin 0 -> 1078 bytes Shutdown/resource.h | 42 + 363 files changed, 31973 insertions(+) create mode 100644 .cvsignore create mode 100644 Checklist/95check.bmp create mode 100644 Checklist/AdvancedOptions.bmp create mode 100644 Checklist/AdvancedPage.cpp create mode 100644 Checklist/AdvancedPage.h create mode 100644 Checklist/Checklist.cpp create mode 100644 Checklist/Checklist.dep create mode 100644 Checklist/Checklist.dsp create mode 100644 Checklist/Checklist.h create mode 100644 Checklist/Checklist.idl create mode 100644 Checklist/Checklist.mk create mode 100644 Checklist/Checklist.rc create mode 100644 Checklist/Checklist.rgs create mode 100644 Checklist/ChecklistApp.cpp create mode 100644 Checklist/ChecklistApp.h create mode 100644 Checklist/Checklistps.def create mode 100644 Checklist/Checklistps.mk create mode 100644 Checklist/DonePage.cpp create mode 100644 Checklist/DonePage.h create mode 100644 Checklist/ExtraPage.cpp create mode 100644 Checklist/ExtraPage.h create mode 100644 Checklist/FirstPage.cpp create mode 100644 Checklist/FirstPage.h create mode 100644 Checklist/NightSecWizard.cpp create mode 100644 Checklist/NightSecWizard.h create mode 100644 Checklist/NormalPage.cpp create mode 100644 Checklist/NormalPage.h create mode 100644 Checklist/StdAfx.cpp create mode 100644 Checklist/StdAfx.h create mode 100644 Checklist/dlldata.c create mode 100644 Checklist/res/Night Security Setup.ico create mode 100644 Checklist/res/Night Security Stub.ico create mode 100644 Checklist/res/bitmap2.bmp create mode 100644 Checklist/res/ico00002.ico create mode 100644 Checklist/res/ico00003.ico create mode 100644 Checklist/res/menu.bmp create mode 100644 Checklist/res/nightsec.bmp create mode 100644 Checklist/res/shutdown.ico create mode 100644 Checklist/resource.h create mode 100644 CmdLine/CmdLine.cpp create mode 100644 CmdLine/CmdLine.dsp create mode 100644 CmdLine/CmdLine.h create mode 100644 CmdLine/CmdLine.idl create mode 100644 CmdLine/CmdLine.rc create mode 100644 CmdLine/CmdLine.rgs create mode 100644 CmdLine/CmdLineApp.cpp create mode 100644 CmdLine/CmdLineApp.h create mode 100644 CmdLine/CmdLineDlg.cpp create mode 100644 CmdLine/CmdLineDlg.h create mode 100644 CmdLine/CmdLineps.def create mode 100644 CmdLine/CmdLineps.mk create mode 100644 CmdLine/StdAfx.cpp create mode 100644 CmdLine/StdAfx.h create mode 100644 CmdLine/res/Night Security Stub.ico create mode 100644 CmdLine/resource.h create mode 100644 Common/CmptData.cpp create mode 100644 Common/CmptData.h create mode 100644 Common/ComponentArray.cpp create mode 100644 Common/ComponentArray.h create mode 100644 Common/ComponentData.cpp create mode 100644 Common/ComponentData.h create mode 100644 Common/ComponentHolder.cpp create mode 100644 Common/ComponentHolder.h create mode 100644 Common/Defines.h create mode 100644 Common/NightSec.h create mode 100644 Common/NightSecApp.cpp create mode 100644 Common/NightSecApp.h create mode 100644 Common/OneInstance.h create mode 100644 Common/PropPageHolder.cpp create mode 100644 Common/PropPageHolder.h create mode 100644 Common/events.h create mode 100644 Common/interfaces.cpp create mode 100644 Common/interfaces.h create mode 100644 Common/types.h create mode 100644 Graphics/Animations/ENC.MOV create mode 100644 Graphics/Animations/FILECOMP.avi create mode 100644 Graphics/Animations/FILECOPY.avi create mode 100644 Graphics/Animations/Final/Enc.ppj create mode 100644 Graphics/Animations/Final/open.psd create mode 100644 Graphics/Animations/Final2/01.bmp create mode 100644 Graphics/Animations/Final2/02.bmp create mode 100644 Graphics/Animations/Final2/03.bmp create mode 100644 Graphics/Animations/Final2/04.bmp create mode 100644 Graphics/Animations/Final2/05.bmp create mode 100644 Graphics/Animations/Final2/06.bmp create mode 100644 Graphics/Animations/Final2/07.bmp create mode 100644 Graphics/Animations/Final2/closed.psd create mode 100644 Graphics/Animations/Final2/output.avi create mode 100644 Graphics/Animations/Final3/enc01.bmp create mode 100644 Graphics/Animations/Final3/enc02.bmp create mode 100644 Graphics/Animations/Final3/enc03.bmp create mode 100644 Graphics/Animations/Final3/enc04.bmp create mode 100644 Graphics/Animations/Final3/enc05.bmp create mode 100644 Graphics/Animations/Final3/enc06.bmp create mode 100644 Graphics/Animations/Final3/enc07.bmp create mode 100644 Graphics/Animations/Final3/enc08.bmp create mode 100644 Graphics/Animations/Final3/enc09.bmp create mode 100644 Graphics/Animations/Final3/enc10.bmp create mode 100644 Graphics/Animations/Final3/enc11.bmp create mode 100644 Graphics/Animations/Final3/enc12.bmp create mode 100644 Graphics/Animations/Final3/enc13.bmp create mode 100644 Graphics/Animations/Final3/enc14.bmp create mode 100644 Graphics/Animations/Final3/enc15.bmp create mode 100644 Graphics/Animations/Final3/enc16.bmp create mode 100644 Graphics/Animations/Final3/enc17.bmp create mode 100644 Graphics/Animations/Final3/enc18.bmp create mode 100644 Graphics/Animations/Final3/enc19.bmp create mode 100644 Graphics/Animations/Final3/enc20.bmp create mode 100644 Graphics/Animations/TAGSELEC.avi create mode 100644 Graphics/Animations/blk.bmp create mode 100644 Graphics/Animations/edit_enc.avi create mode 100644 Graphics/Animations/enc.avi create mode 100644 Graphics/Animations/enc.bmp create mode 100644 Graphics/Animations/enc01.bmp create mode 100644 Graphics/Animations/enc02.bmp create mode 100644 Graphics/Animations/enc03.bmp create mode 100644 Graphics/Animations/enc04.bmp create mode 100644 Graphics/Animations/enc05.bmp create mode 100644 Graphics/Animations/enc06.bmp create mode 100644 Graphics/Animations/enc07.bmp create mode 100644 Graphics/Animations/enc08.bmp create mode 100644 Graphics/Animations/enc09.bmp create mode 100644 Graphics/Animations/enc10.bmp create mode 100644 Graphics/Animations/enc11.bmp create mode 100644 Graphics/Animations/enc_org.avi create mode 100644 Graphics/Animations/open.bmp create mode 100644 Graphics/nightsec_logo.tif create mode 100644 Graphics/setup.bmp create mode 100644 Graphics/setup.psd create mode 100644 Graphics/setup24.bmp create mode 100644 Help/Heading.bmp create mode 100644 Help/Help Matic/NIGHT SECURITY.HLP create mode 100644 Help/Help Matic/Night Security.cnt create mode 100644 Help/Help Matic/Night Security.hmp create mode 100644 Help/Help Matic/Night Security.hpj create mode 100644 Help/Help Matic/Night Security.log create mode 100644 Help/Help Matic/Night Security.rtf create mode 100644 Help/Help Matic/night security.GID create mode 100644 Help/NIGHTSEC.GID create mode 100644 Help/NIGHTSEC.HLP create mode 100644 Help/NightSec.FTS create mode 100644 Help/NightSec.cnt create mode 100644 Help/NightSec.hmp create mode 100644 Help/NightSec.hpj create mode 100644 Help/NightSec.log create mode 100644 Help/NightSec.rtf create mode 100644 Help/NightSec.rtf.XRP create mode 100644 Help/crack.rpl create mode 100644 Help/crack.xpl create mode 100644 Help/del.bmp create mode 100644 Help/inetfiles.bmp create mode 100644 Help/ins.bmp create mode 100644 Help/nightsec.bmp create mode 100644 Help/nightsectrans.bmp create mode 100644 Help/note.bmp create mode 100644 Help/recycle.bmp create mode 100644 Help/scandisk.bmp create mode 100644 Help/swapfile.bmp create mode 100644 Installshield/Component Definitions/Default.cdf create mode 100644 Installshield/Component Definitions/Default.fgl create mode 100644 Installshield/Copy of Night Security.ipr create mode 100644 Installshield/Description.txt create mode 100644 Installshield/File Groups/Default.fdf create mode 100644 Installshield/File Groups/Help Files.fgl create mode 100644 Installshield/File Groups/Network Components.fgl create mode 100644 Installshield/File Groups/Program DLLs.fgl create mode 100644 Installshield/File Groups/Program Executable Files.fgl create mode 100644 Installshield/File Groups/Shared DLLs NoReg.fgl create mode 100644 Installshield/File Groups/Shared DLLs Reg.fgl create mode 100644 Installshield/File Groups/Support Files.fgl create mode 100644 Installshield/File Groups/Windows Folder.fgl create mode 100644 Installshield/File Groups/XPY DLL.fgl create mode 100644 Installshield/Media/Default/default.mda create mode 100644 Installshield/Media/Disk/default.mda create mode 100644 Installshield/Night Security.ipr create mode 100644 Installshield/Notes.txt create mode 100644 Installshield/Registry Entries/Default.rge create mode 100644 Installshield/Script Files/SETUP.dbg create mode 100644 Installshield/Script Files/SETUP.ino create mode 100644 Installshield/Script Files/SETUP.ins create mode 100644 Installshield/Script Files/Setup.obs create mode 100644 Installshield/Script Files/setup.rul create mode 100644 Installshield/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp create mode 100644 Installshield/Shell Objects/Default.shl create mode 100644 Installshield/String Tables/0009-English/value.shl create mode 100644 Installshield/String Tables/Default.shl create mode 100644 Installshield/Text Substitutions/Build.tsb create mode 100644 Installshield/Text Substitutions/Setup.tsb create mode 100644 Interfaces/CmptIfaces.h create mode 100644 Interfaces/CmptIfaces.idl create mode 100644 Interfaces/Interfaces.dsp create mode 100644 Interfaces/Interfaces.dsw create mode 100644 Interfaces/SiteIfaces.h create mode 100644 Interfaces/SiteIfaces.idl create mode 100644 Interfaces/dlldata.c create mode 100644 NSCmpts/ActionEngine.cpp create mode 100644 NSCmpts/ActionEngine.h create mode 100644 NSCmpts/Backup.cpp create mode 100644 NSCmpts/Backup.h create mode 100644 NSCmpts/Backup.rgs create mode 100644 NSCmpts/BackupActions.cpp create mode 100644 NSCmpts/BackupActions.h create mode 100644 NSCmpts/BackupAdvancedProp.cpp create mode 100644 NSCmpts/BackupAdvancedProp.h create mode 100644 NSCmpts/BackupAdvancedProp.rgs create mode 100644 NSCmpts/BackupData.cpp create mode 100644 NSCmpts/BackupData.h create mode 100644 NSCmpts/BackupDestProp.cpp create mode 100644 NSCmpts/BackupDestProp.h create mode 100644 NSCmpts/BackupDestProp.rgs create mode 100644 NSCmpts/BackupProgress.cpp create mode 100644 NSCmpts/BackupSourceProp.cpp create mode 100644 NSCmpts/BackupSourceProp.h create mode 100644 NSCmpts/BackupSourceProp.rgs create mode 100644 NSCmpts/CmptIfaces.h create mode 100644 NSCmpts/DeleteSwapFile.cpp create mode 100644 NSCmpts/DeleteSwapFile.h create mode 100644 NSCmpts/EmptyRecycleBin.cpp create mode 100644 NSCmpts/EmptyRecycleBin.h create mode 100644 NSCmpts/EmptyRecycleBin.rgs create mode 100644 NSCmpts/EmptyTempFolder.cpp create mode 100644 NSCmpts/EmptyTempFolder.h create mode 100644 NSCmpts/Encrypt.cpp create mode 100644 NSCmpts/Encrypt.h create mode 100644 NSCmpts/Encrypt.rgs create mode 100644 NSCmpts/EncryptActions.cpp create mode 100644 NSCmpts/EncryptActions.h create mode 100644 NSCmpts/EncryptAdvancedProp.cpp create mode 100644 NSCmpts/EncryptAdvancedProp.h create mode 100644 NSCmpts/EncryptAdvancedProp.rgs create mode 100644 NSCmpts/EncryptData.cpp create mode 100644 NSCmpts/EncryptData.h create mode 100644 NSCmpts/EncryptSourceProp.cpp create mode 100644 NSCmpts/EncryptSourceProp.h create mode 100644 NSCmpts/EncryptSourceProp.rgs create mode 100644 NSCmpts/IDropTargetImpl.cpp create mode 100644 NSCmpts/IDropTargetImpl.h create mode 100644 NSCmpts/IgnoreProp.cpp create mode 100644 NSCmpts/IgnoreProp.h create mode 100644 NSCmpts/NSCmpts.aps create mode 100644 NSCmpts/NSCmpts.cpp create mode 100644 NSCmpts/NSCmpts.def create mode 100644 NSCmpts/NSCmpts.dsp create mode 100644 NSCmpts/NSCmpts.h create mode 100644 NSCmpts/NSCmpts.idl create mode 100644 NSCmpts/NSCmpts.plg create mode 100644 NSCmpts/NSCmpts.rc create mode 100644 NSCmpts/NSCmptsps.def create mode 100644 NSCmpts/NSCmptsps.mk create mode 100644 NSCmpts/NSMessages.h create mode 100644 NSCmpts/NSSettings.h create mode 100644 NSCmpts/NightSecError.cpp create mode 100644 NSCmpts/NightSecError.h create mode 100644 NSCmpts/ProgressDlg.cpp create mode 100644 NSCmpts/ProgressDlg.h create mode 100644 NSCmpts/PromptClose.cpp create mode 100644 NSCmpts/PromptClose.h create mode 100644 NSCmpts/RunScanDisk.cpp create mode 100644 NSCmpts/RunScanDisk.h create mode 100644 NSCmpts/SourceProp.cpp create mode 100644 NSCmpts/SourceProp.h create mode 100644 NSCmpts/StdAfx.cpp create mode 100644 NSCmpts/StdAfx.h create mode 100644 NSCmpts/TempActions.cpp create mode 100644 NSCmpts/TempActions.h create mode 100644 NSCmpts/TempWarnDlg.cpp create mode 100644 NSCmpts/TempWarnDlg.h create mode 100644 NSCmpts/WipefreeSpace.cpp create mode 100644 NSCmpts/WipefreeSpace.h create mode 100644 NSCmpts/dlldata.c create mode 100644 NSCmpts/res/161.avi create mode 100644 NSCmpts/res/DeleteSwapFile.rgs create mode 100644 NSCmpts/res/EmptyTempFolder.rgs create mode 100644 NSCmpts/res/Night Security Worker.ico create mode 100644 NSCmpts/res/RunScanDisk.rgs create mode 100644 NSCmpts/res/WipefreeSpace.rgs create mode 100644 NSCmpts/res/advanced.ico create mode 100644 NSCmpts/res/backup1.ico create mode 100644 NSCmpts/res/backupad.bin create mode 100644 NSCmpts/res/backupde.bin create mode 100644 NSCmpts/res/copyfile.ico create mode 100644 NSCmpts/res/cursor1.cur create mode 100644 NSCmpts/res/enc.avi create mode 100644 NSCmpts/res/ico00001.ico create mode 100644 NSCmpts/res/ico00002.ico create mode 100644 NSCmpts/res/ico00003.ico create mode 100644 NSCmpts/res/ico00004.ico create mode 100644 NSCmpts/res/ico00005.ico create mode 100644 NSCmpts/res/ico00006.ico create mode 100644 NSCmpts/res/ico00007.ico create mode 100644 NSCmpts/res/ico00008.ico create mode 100644 NSCmpts/res/icon1.ico create mode 100644 NSCmpts/res/icon2.ico create mode 100644 NSCmpts/res/idr_.bin create mode 100644 NSCmpts/res/items.ico create mode 100644 NSCmpts/res/n_161.avi create mode 100644 NSCmpts/res/n_temp.avi create mode 100644 NSCmpts/res/new1.ico create mode 100644 NSCmpts/res/recycle.ico create mode 100644 NSCmpts/res/temp.avi create mode 100644 NSCmpts/res/wxpy.ico create mode 100644 NSCmpts/resource.h create mode 100644 NetCmpts/ClearInetCache.cpp create mode 100644 NetCmpts/ClearInetCache.h create mode 100644 NetCmpts/ClearInetCache.rgs create mode 100644 NetCmpts/CmptIfaces.h create mode 100644 NetCmpts/NetCmpts.cpp create mode 100644 NetCmpts/NetCmpts.def create mode 100644 NetCmpts/NetCmpts.dsp create mode 100644 NetCmpts/NetCmpts.h create mode 100644 NetCmpts/NetCmpts.idl create mode 100644 NetCmpts/NetCmpts.plg create mode 100644 NetCmpts/NetCmpts.rc create mode 100644 NetCmpts/NetCmptsps.def create mode 100644 NetCmpts/NetCmptsps.mk create mode 100644 NetCmpts/ProgressDlg.cpp create mode 100644 NetCmpts/ProgressDlg.h create mode 100644 NetCmpts/StdAfx.cpp create mode 100644 NetCmpts/StdAfx.h create mode 100644 NetCmpts/dlldata.c create mode 100644 NetCmpts/parseurl.cpp create mode 100644 NetCmpts/parseurl.h create mode 100644 NetCmpts/res/Night Security Worker.ico create mode 100644 NetCmpts/res/ico00003.ico create mode 100644 NetCmpts/res/ico00005.ico create mode 100644 NetCmpts/res/icon1.ico create mode 100644 NetCmpts/res/inetshor.ico create mode 100644 NetCmpts/res/new1.ico create mode 100644 NetCmpts/resource.h create mode 100644 Night Security.dsw create mode 100644 Shutdown/BatchFileCmpt.cpp create mode 100644 Shutdown/BatchFileCmpt.h create mode 100644 Shutdown/ItemDlg.cpp create mode 100644 Shutdown/ItemDlg.h create mode 100644 Shutdown/LogDlg.cpp create mode 100644 Shutdown/LogDlg.h create mode 100644 Shutdown/LogDlg.rgs create mode 100644 Shutdown/PersistPosWindow.cpp create mode 100644 Shutdown/PersistPosWindow.h create mode 100644 Shutdown/Shutdown.cpp create mode 100644 Shutdown/Shutdown.dsp create mode 100644 Shutdown/Shutdown.h create mode 100644 Shutdown/Shutdown.idl create mode 100644 Shutdown/Shutdown.rc create mode 100644 Shutdown/Shutdown.rgs create mode 100644 Shutdown/ShutdownApp.cpp create mode 100644 Shutdown/ShutdownApp.h create mode 100644 Shutdown/ShutdownCP.h create mode 100644 Shutdown/ShutdownSite.cpp create mode 100644 Shutdown/ShutdownSite.h create mode 100644 Shutdown/Shutdownps.def create mode 100644 Shutdown/Shutdownps.mk create mode 100644 Shutdown/SizingDialog.cpp create mode 100644 Shutdown/SizingDialog.h create mode 100644 Shutdown/StdAfx.cpp create mode 100644 Shutdown/StdAfx.h create mode 100644 Shutdown/res/LogDlg.rgs create mode 100644 Shutdown/res/Night Security Shutdown.ico create mode 100644 Shutdown/res/Night Security Stub.ico create mode 100644 Shutdown/res/bitmap1.bmp create mode 100644 Shutdown/res/checks1.bmp create mode 100644 Shutdown/res/icon1.ico create mode 100644 Shutdown/resource.h diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..59e300e --- /dev/null +++ b/.cvsignore @@ -0,0 +1,4 @@ +Night?Security.ncb +Night?Security.opt +Debug +Release \ No newline at end of file diff --git a/Checklist/95check.bmp b/Checklist/95check.bmp new file mode 100644 index 0000000..3fe90db Binary files /dev/null and b/Checklist/95check.bmp differ diff --git a/Checklist/AdvancedOptions.bmp b/Checklist/AdvancedOptions.bmp new file mode 100644 index 0000000..aeb7411 Binary files /dev/null and b/Checklist/AdvancedOptions.bmp differ diff --git a/Checklist/AdvancedPage.cpp b/Checklist/AdvancedPage.cpp new file mode 100644 index 0000000..edef443 --- /dev/null +++ b/Checklist/AdvancedPage.cpp @@ -0,0 +1,317 @@ +// AdvancedPage.cpp : implementation file +// + +#include "stdafx.h" +#include "AdvancedPage.h" + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedPage property page + +CAdvancedPage::CAdvancedPage(CNightSecWizard* pParent, UINT nType, UINT nIDD, UINT nPos /*= WIZPAGE_MIDDLE*/) + : CPropertyPage(nIDD), + + // Set const variables + m_nType(nType), // Either COMPONENT_WIN or COMPONENT_DOS + + m_nPos(nPos) // Position in the Wizard (WIZPAGE_FIRST, WIZPAGE_MIDDLE + // or WIZPAGE_LAST) + +{ + m_pCurPropPage = NULL; // NULL means no Proppage shown + m_pCurComponent = NULL; + + ASSERT(pParent != NULL); // Have to have a valid parent + m_pParentSheet = pParent; // or we can't survive + +} + +CAdvancedPage::~CAdvancedPage() +{ + m_pParentSheet = NULL; + m_pCurPropPage = NULL; + m_pCurComponent = NULL; +} + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedPage message handlers + +////////////////////////////////////////////////////////////////// +// List box selection has changed + +LRESULT CAdvancedPage::OnComponentsSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + // Make sure we have a matching PropPage up + SetCurrentComponent(); + + return 1; +} + +LRESULT CAdvancedPage::OnPageSelChange(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + // Make sure we have a matching PropPage up + SetCurrentPage(); + + return 1; +} + +////////////////////////////////////////////////////////////////// +// InitDialog + +LRESULT CAdvancedPage::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + m_ctlDrag.SubclassWindow(GetDlgItem(IDC_COMPONENTS)); + m_ctlCheck.SubclassWindow(GetDlgItem(IDC_COMPONENTS)); +// m_ctlCheck = GetDlgItem(IDC_COMPONENTS); + + m_ctlTabs = GetDlgItem(IDC_PAGETABS); + + int nIndex = 0; + + // Loop through and Add Components to Box + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + // Make sure it's our internal type (set from constructor) + if(g_aComponents[nCnt]->GetType() == m_nType) + { + // Add the Title + nIndex = m_ctlCheck.AddString(g_aComponents[nCnt]->GetName()); + + // Save a Pointer to the component in the Listbox Data + m_ctlCheck.SetItemDataPtr(nIndex, (void*)g_aComponents[nCnt]); + + + // Check if Enabled + m_ctlCheck.SetCheck(nIndex, g_aComponents[nCnt]->IsEnabled()); + + } + + } + + + // Set the Proppage Rectangle to the Place Holder + ::GetWindowRect(GetDlgItem(IDC_PROPHOLDER), &m_rcPropPage); + ScreenToClient(&m_rcPropPage); + +// m_ctlTabs.Set + + + // Remove Place Holder Control + ::DestroyWindow(GetDlgItem(IDC_PROPHOLDER)); + + + // Select first item and display prop page + m_ctlCheck.SetCurSel(0); + SetCurrentComponent(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +////////////////////////////////////////////////////////////////// +// When the Finish Button on Wizard is pressed + +LRESULT CAdvancedPage::OnWizFinish(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + // If we have a PropPage then Save it + if(m_pCurPropPage != NULL) + m_pCurPropPage->Apply(); + + // Save Pos and Enabled Status + SaveChanges(); + + return 0; +} + +////////////////////////////////////////////////////////////////// +// Basically saves Position of component and Enabled Status + +HRESULT CAdvancedPage::SaveChanges() +{ + HRESULT hrRet = S_OK; + CComponentHolder* pComponent; + + // Loop though and save Pos and Enabled Status + for(int nCnt = 0; nCnt < m_ctlCheck.GetCount(); nCnt++) + { + // Get the Pointer from Listbox Data + pComponent = (CComponentHolder*)m_ctlCheck.GetItemDataPtr(nCnt); + + if(pComponent) + { + // Save to Component Data + pComponent->Enable(m_ctlCheck.GetCheck(nCnt) ? true : false); + pComponent->SetPos((nCnt * 2) + m_nType - 1); // Need special calculations because we have a number of type sharing same position list + } + else + // Bummed out and don't know why + hrRet = E_UNEXPECTED; + } + + return hrRet; +} + +////////////////////////////////////////////////////////////////// +// Make sure our buttons are properly enabled based on our +// position (passed in constructor) + +LRESULT CAdvancedPage::OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + DWORD dwButtons; + + // Depening on our Position in the Wizard + // Set the Buttons at the bottom on and off + + switch(m_nPos) + { + case WIZPAGE_FIRST: + dwButtons = PSWIZB_NEXT; + break; + case WIZPAGE_LAST: + dwButtons = PSWIZB_BACK | PSWIZB_FINISH; + break; + default: + dwButtons = PSWIZB_BACK | PSWIZB_NEXT; + break; + } + + m_pParentSheet->SetWizardButtons(dwButtons); + + return 0; +} + +////////////////////////////////////////////////////////////////// +// Have to save our changes when focus changes cause +// OnWizardFinish doesn't get called for each sheet + +LRESULT CAdvancedPage::OnWizBack(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + // If we have a PropPage then Save it + if(m_pCurPropPage != NULL) + m_pCurPropPage->Apply(); + + SaveChanges(); + + return 0; +} + +////////////////////////////////////////////////////////////////// +// Have to save our changes when focus changes cause +// OnWizardFinish doesn't get called for each sheet + +LRESULT CAdvancedPage::OnWizNext(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + // If we have a PropPage then Save it + if(m_pCurPropPage != NULL) + m_pCurPropPage->Apply(); + + SaveChanges(); + + return 0; +} + +LRESULT CAdvancedPage::OnHelp(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + WinHelp(NS_HELP_FILE, HELP_FINDER, 0); + return 1; +} + +////////////////////////////////////////////////////////////////// +// Shows the appropriate Property sheet for the current component +// in List box + +void CAdvancedPage::SetCurrentComponent() +{ + // Get the selection + int nCurSel = m_ctlCheck.GetCurSel(); + + if(nCurSel == LB_ERR) + return; + + // Get current selection + CComponentHolder* pComponent = (CComponentHolder*)m_ctlCheck.GetItemDataPtr(nCurSel); + + // Only change if a different component + if(pComponent == NULL || pComponent == m_pCurComponent) + return; + + m_ctlTabs.DeleteAllItems(); + + PropertyPageMap::iterator iterPages = m_pParentSheet->m_mapPages.lower_bound(pComponent); + PropertyPageMap::iterator endPages = m_pParentSheet->m_mapPages.upper_bound(pComponent); + for( ; iterPages != endPages && iterPages != m_pParentSheet->m_mapPages.end(); iterPages++) + { + string sTitle = iterPages->second->GetTitle(); + TCITEM tci; + tci.mask = TCIF_TEXT | TCIF_PARAM; + tci.pszText = sTitle.get_buffer(); + tci.iImage = -1; + tci.lParam = (LPARAM)iterPages->second; + + m_ctlTabs.InsertItem(m_ctlTabs.GetItemCount(), &tci); + } + + m_pCurComponent = pComponent; + SetCurrentPage(); +} + + +void CAdvancedPage::SetCurrentPage() +{ + // Get the selection + int nCurSel = m_ctlTabs.GetCurSel(); + + CPropPageHolder* pPropPage = NULL; + + if(nCurSel != -1) + { + + // Get current selection + TCITEM tci; + memset(&tci, 0, sizeof(TCITEM)); + tci.mask = TCIF_PARAM; + + m_ctlTabs.GetItem(nCurSel, &tci); + + pPropPage = (CPropPageHolder*)tci.lParam; + ASSERT(pPropPage); + } + + // Only change if a different component + if(pPropPage != NULL && pPropPage != m_pCurPropPage) + { + // If it's already created then just show it + if(pPropPage->IsActivated()) + { + pPropPage->Show(SW_SHOW); + } + // Otherwise Create + else + { + pPropPage->Create(m_hWnd, m_rcPropPage, true); + pPropPage->Show(SW_SHOW); + } + + } + + // Now Hide Old One (Hide after show to avoid flicker) + if(m_pCurPropPage != NULL && m_pCurPropPage != pPropPage) + { + m_pCurPropPage->Show(SW_HIDE); + + // Save Changes before going out + m_pCurPropPage->Apply(); + + } + + // Current Selection Update + m_pCurPropPage = pPropPage; +} + +LRESULT CAdvancedPage::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // If we have a PropPage then Destroy it + if(m_pCurPropPage != NULL) + m_pCurPropPage->Destroy(); + + return 0; +} diff --git a/Checklist/AdvancedPage.h b/Checklist/AdvancedPage.h new file mode 100644 index 0000000..08531ca --- /dev/null +++ b/Checklist/AdvancedPage.h @@ -0,0 +1,116 @@ +////////////////////////////////////////////////////////////////// +// +// AdvancedPage.h : header file +// +// Holds one Page for the Advanced Wizard +// +// Uses the Type, IDD, and Position passed to constructor +// to behave correctly in Wizard +// +////////////////////////////////////////////////////////////////// + + +#if !defined(AFX_AdvancedPage_H__F447FE42_1843_11D2_B2D4_0020182B97FC__INCLUDED_) +#define AFX_AdvancedPage_H__F447FE42_1843_11D2_B2D4_0020182B97FC__INCLUDED_ + + + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "NightSecWizard.h" +#include "resource.h" +#include "ContextHelp.h" +#include +#include +#include + +///////////////////////////////////////////////////////////////////////////// +// CAdvancedPage dialog + +class CAdvancedPage + : public CPropertyPage, + public CContextHelp +{ + +// Construction +public: + CAdvancedPage(CNightSecWizard* pParent, UINT nType, UINT nIDD, UINT nPos = WIZPAGE_MIDDLE); + ~CAdvancedPage(); + + // Puts a Components PropPage on display + void SetCurrentComponent(); + void SetCurrentPage(); + + CDragListBoxEx m_ctlDrag; + CCheckListBox m_ctlCheck; +// CListBox m_ctlCheck; + CTabCtrl m_ctlTabs; + +BEGIN_MSG_MAP(CAdvancedPage) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + NOTIFY_CODE_HANDLER(PSN_SETACTIVE, OnSetActive) + NOTIFY_CODE_HANDLER(PSN_WIZFINISH, OnWizFinish) + NOTIFY_CODE_HANDLER(PSN_WIZBACK, OnWizBack) + NOTIFY_CODE_HANDLER(PSN_WIZNEXT, OnWizNext) + NOTIFY_CODE_HANDLER(PSN_HELP, OnHelp) + COMMAND_HANDLER(IDC_COMPONENTS, LBN_SELCHANGE, OnComponentsSelChange) + NOTIFY_HANDLER(IDC_PAGETABS, TCN_SELCHANGE, OnPageSelChange) + REFLECT_NOTIFICATIONS() + REFLECT_DRAGLIST() + CHAIN_MSG_MAP(CContextHelp) +END_MSG_MAP() + +BEGIN_HELP_MAP("nightsec.hlp") + HELP_ID(IDC_COMPONENTS, 3502) +END_HELP_MAP + +// Messages +public: + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnComponentsSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnPageSelChange(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnWizFinish(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnWizBack(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnWizNext(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnHelp(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + +// Implementation +protected: + + //////////////////////////////////////////////////// + // Pointer to Wizard Parent + // Needed for Setting Back and Next Buttons + CNightSecWizard* m_pParentSheet; + + // Position in the Wizard (WIZPAGE_FIRST, WIZPAGE_MIDDLE + // or WIZPAGE_LAST) + const UINT m_nPos; + + // Either COMPONENT_WIN or COMPONENT_DOS + const UINT m_nType; + + + ////////////////////////////////////////////////////// + // Component Property Pages + // Pointer to Current Property Page (or NULL if none) + CPropPageHolder* m_pCurPropPage; + + // Current Index of Property Page + CComponentHolder* m_pCurComponent; + + // Rectangle for Property Page + RECT m_rcPropPage; + + + // Saves Each Components Position and Enabled Status + HRESULT SaveChanges(); + +}; + + +#endif // !defined(AFX_AdvancedPage_H__F447FE42_1843_11D2_B2D4_0020182B97FC__INCLUDED_) diff --git a/Checklist/Checklist.cpp b/Checklist/Checklist.cpp new file mode 100644 index 0000000..c824e68 --- /dev/null +++ b/Checklist/Checklist.cpp @@ -0,0 +1,121 @@ +// Checklist.cpp : Implementation of WinMain + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f Checklistps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include +#include "Checklist.h" + +#include "Checklist_i.c" +#include "../common/Interfaces.cpp" + +/*#include +#include +#include */ + +CChecklistApp _Module; + +/* +BEGIN_OBJECT_MAP(ObjectMap) +END_OBJECT_MAP() +*/ + +// const DWORD dwPause = 1000; // time to wait for threads to finish up + +LPCTSTR FindOneOf(LPCTSTR p1, LPCTSTR p2) +{ + while (p1 != NULL && *p1 != NULL) + { + LPCTSTR p = p2; + while (p != NULL && *p != NULL) + { + if (*p1 == *p) + return CharNext(p1); + p = CharNext(p); + } + p1 = CharNext(p1); + } + return NULL; +} + +///////////////////////////////////////////////////////////////////////////// +// +extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, + HINSTANCE /*hPrevInstance*/, LPTSTR lpCmdLine, int /*nShowCmd*/) +{ + lpCmdLine = GetCommandLine(); //this line necessary for _ATL_MIN_CRT + +#if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED) + HRESULT hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED); +#else + HRESULT hRes = CoInitialize(NULL); +#endif + + _ASSERTE(SUCCEEDED(hRes)); + _Module.Init(NULL/*ObjectMap*/, hInstance, &LIBID_CHECKLISTLib); +// _Module.dwThreadID = GetCurrentThreadId(); + TCHAR szTokens[] = _T("-/"); + + int nRet = 0; + BOOL bRun = TRUE; + LPCTSTR lpszToken = FindOneOf(lpCmdLine, szTokens); + while (lpszToken != NULL) + { + if (lstrcmpi(lpszToken, _T("UnregServer"))==0) + { +// _Module.UpdateRegistryFromResource(IDR_Checklist, FALSE); +// nRet = _Module.UnregisterServer(TRUE); + bRun = FALSE; + break; + } + if (lstrcmpi(lpszToken, _T("RegServer"))==0) + { + _Module.RegisterDlls(); + +// _Module.UpdateRegistryFromResource(IDR_Checklist, TRUE); +// nRet = _Module.RegisterServer(TRUE); + bRun = FALSE; + break; + } + lpszToken = FindOneOf(lpszToken, szTokens); + } + + if (bRun) + { +// _Module.StartMonitor(); +#if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED) +// hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, +// REGCLS_MULTIPLEUSE | REGCLS_SUSPENDED); + _ASSERTE(SUCCEEDED(hRes)); +// hRes = CoResumeClassObjects(); +#else +// hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, +// REGCLS_MULTIPLEUSE); +#endif +// _ASSERTE(SUCCEEDED(hRes)); + + if(_Module.InitInstance()) + { + + MSG msg; + while (GetMessage(&msg, 0, 0, 0)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + +// _Module.RevokeClassObjects(); +// Sleep(dwPause); //wait for any threads to finish + } + + _Module.ExitInstance(); + } + + _Module.Term(); + CoUninitialize(); + return nRet; +} diff --git a/Checklist/Checklist.dep b/Checklist/Checklist.dep new file mode 100644 index 0000000..59b758f --- /dev/null +++ b/Checklist/Checklist.dep @@ -0,0 +1,190 @@ +# Microsoft Developer Studio Generated Dependency File, included by Checklist.mak + +.\AdvancedPage.cpp : \ + "..\..\include\atlctrls.h"\ + "..\..\include\atllstbx.h"\ + "..\..\include\atlprsht.h"\ + "..\..\include\atlwinhk.h"\ + "..\..\include\contexthelp.h"\ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + "..\Common\PropPageHolder.h"\ + ".\AdvancedPage.h"\ + ".\checklist.h"\ + ".\ExtraPage.h"\ + ".\NightSecWizard.h"\ + + +..\..\Include\src\appmisc.cpp : \ + "..\..\Include\appmisc.h"\ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + + +.\Checklist.cpp : \ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.cpp"\ + "..\common\interfaces.h"\ + "..\interfaces\cmptifaces_i.c"\ + "..\interfaces\siteifaces_i.c"\ + ".\checklist.h"\ + ".\checklist_i.c"\ + + +.\Checklist.rc : \ + ".\95check.bmp"\ + ".\res\bitmap2.bmp"\ + ".\res\ico00002.ico"\ + ".\res\ico00003.ico"\ + ".\res\menu.bmp"\ + ".\res\Night Security Stub.ico"\ + ".\res\nightsec.bmp"\ + ".\res\shutdown.ico"\ + + +.\ChecklistApp.cpp : \ + "..\..\include\atlctrls.h"\ + "..\..\include\atllstbx.h"\ + "..\..\include\atlprsht.h"\ + "..\..\include\atlwinhk.h"\ + "..\..\include\contexthelp.h"\ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + "..\Common\PropPageHolder.h"\ + ".\AdvancedPage.h"\ + ".\checklist.h"\ + ".\DonePage.h"\ + ".\ExtraPage.h"\ + ".\FirstPage.h"\ + ".\NightSecWizard.h"\ + ".\NormalPage.h"\ + + +..\Common\ComponentArray.cpp : \ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + + +..\Common\ComponentData.cpp : \ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + + +..\Common\ComponentHolder.cpp : \ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + + +.\DonePage.cpp : \ + "..\..\Include\appmisc.h"\ + "..\..\include\atlctrls.h"\ + "..\..\include\atlprsht.h"\ + "..\..\include\atlwinhk.h"\ + "..\..\include\contexthelp.h"\ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + ".\DonePage.h"\ + + +.\ExtraPage.cpp : \ + "..\..\include\atlprsht.h"\ + "..\..\include\atlwinhk.h"\ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + "..\Common\PropPageHolder.h"\ + ".\ExtraPage.h"\ + + +.\FirstPage.cpp : \ + "..\..\include\atlprsht.h"\ + "..\..\include\atlwinhk.h"\ + "..\..\include\contexthelp.h"\ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + ".\FirstPage.h"\ + + +..\Common\NightSecApp.cpp : \ + "..\..\Include\appmisc.h"\ + "..\..\include\debug.h"\ + "..\..\Include\path.h"\ + "..\..\include\regsvr.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + + +.\NightSecWizard.cpp : \ + "..\..\include\atlprsht.h"\ + "..\..\include\atlwinhk.h"\ + "..\..\include\contexthelp.h"\ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + "..\Common\PropPageHolder.h"\ + ".\checklist.h"\ + ".\ExtraPage.h"\ + ".\NightSecWizard.h"\ + + +.\NormalPage.cpp : \ + "..\..\include\atlctrls.h"\ + "..\..\include\atllstbx.h"\ + "..\..\include\atlprsht.h"\ + "..\..\include\atlwinhk.h"\ + "..\..\include\contexthelp.h"\ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + "..\Common\PropPageHolder.h"\ + ".\ExtraPage.h"\ + ".\NormalPage.h"\ + + +..\..\Include\src\path.cpp : \ + "..\..\include\debug.h"\ + "..\..\Include\path.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + + +..\Common\PropPageHolder.cpp : \ + "..\..\include\debug.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + "..\Common\PropPageHolder.h"\ + + +..\..\Include\src\RegSvr.cpp : \ + "..\..\include\debug.h"\ + "..\..\include\regsvr.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + + +.\StdAfx.cpp : \ + "..\..\include\debug.h"\ + "..\..\include\mystring.h"\ + "..\..\include\regsettings.h"\ + "..\Common\ComponentArray.h"\ + "..\Common\ComponentData.h"\ + "..\Common\ComponentHolder.h"\ + "..\common\defines.h"\ + "..\common\interfaces.h"\ + "..\Common\NightSecApp.h"\ + "..\Common\OneInstance.h"\ + "..\interfaces\cmptifaces.h"\ + "..\interfaces\siteifaces.h"\ + ".\ChecklistApp.h"\ + ".\StdAfx.h"\ + "d:\devstudio\vc98\include\basetsd.h"\ + diff --git a/Checklist/Checklist.dsp b/Checklist/Checklist.dsp new file mode 100644 index 0000000..794027f --- /dev/null +++ b/Checklist/Checklist.dsp @@ -0,0 +1,474 @@ +# Microsoft Developer Studio Project File - Name="Checklist" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Checklist - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Checklist.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Checklist.mak" CFG="Checklist - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Checklist - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Checklist - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE "Checklist - Win32 Release MinSize" (based on "Win32 (x86) Application") +!MESSAGE "Checklist - Win32 Release MinDependency" (based on "Win32 (x86) Application") +!MESSAGE "Checklist - Win32 Unicode Release MinSize" (based on "Win32 (x86) Application") +!MESSAGE "Checklist - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Checklist - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../Debug/Checklist.exe" /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\Debug +TargetPath=\Projects\NightSec\Debug\Checklist.exe +InputPath=\Projects\NightSec\Debug\Checklist.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + +# End Custom Build + +!ELSEIF "$(CFG)" == "Checklist - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"../Debug/Checklist.exe" /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\DebugU +TargetPath=\Projects\NightSec\Debug\Checklist.exe +InputPath=\Projects\NightSec\Debug\Checklist.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + goto end + :NOTNT + echo Warning : Cannot register Unicode EXE on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "Checklist - Win32 Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinSize" +# PROP BASE Intermediate_Dir "ReleaseMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinSize" +# PROP Intermediate_Dir "ReleaseMinSize" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /GX /O1 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_DLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /machine:I386 /out:"../Release/Checklist.exe" /OPT:NOWIN98 +# SUBTRACT LINK32 /pdb:none +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinSize +TargetPath=\Projects\NightSec\Release\Checklist.exe +InputPath=\Projects\NightSec\Release\Checklist.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + +# End Custom Build + +!ELSEIF "$(CFG)" == "Checklist - Win32 Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinDependency" +# PROP BASE Intermediate_Dir "ReleaseMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinDependency" +# PROP Intermediate_Dir "ReleaseMinDependency" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_STATIC_REGISTRY" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /machine:I386 /out:"..\Release\Checklist.exe" +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinDependency +TargetPath=\Projects\NightSec\Release\Checklist.exe +InputPath=\Projects\NightSec\Release\Checklist.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + +# End Custom Build + +!ELSEIF "$(CFG)" == "Checklist - Win32 Unicode Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinSize" +# PROP BASE Intermediate_Dir "ReleaseUMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinSize" +# PROP Intermediate_Dir "ReleaseUMinSize" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"../Release/Checklist.exe" +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinSize +TargetPath=\Projects\NightSec\Release\Checklist.exe +InputPath=\Projects\NightSec\Release\Checklist.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + goto end + :NOTNT + echo Warning : Cannot register Unicode EXE on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "Checklist - Win32 Unicode Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinDependency" +# PROP BASE Intermediate_Dir "ReleaseUMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinDependency" +# PROP Intermediate_Dir "ReleaseUMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\Checklist.exe +InputPath=.\ReleaseUMinDependency\Checklist.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + goto end + :NOTNT + echo Warning : Cannot register Unicode EXE on Windows 95 + :end + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "Checklist - Win32 Debug" +# Name "Checklist - Win32 Unicode Debug" +# Name "Checklist - Win32 Release MinSize" +# Name "Checklist - Win32 Release MinDependency" +# Name "Checklist - Win32 Unicode Release MinSize" +# Name "Checklist - Win32 Unicode Release MinDependency" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\AdvancedPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\Include\src\appmisc.cpp +# End Source File +# Begin Source File + +SOURCE=.\Checklist.cpp +# End Source File +# Begin Source File + +SOURCE=.\Checklist.rc +# End Source File +# Begin Source File + +SOURCE=.\ChecklistApp.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\ComponentArray.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\ComponentData.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\ComponentHolder.cpp +# End Source File +# Begin Source File + +SOURCE=.\DonePage.cpp +# End Source File +# Begin Source File + +SOURCE=.\ExtraPage.cpp +# End Source File +# Begin Source File + +SOURCE=.\FirstPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\NightSecApp.cpp +# End Source File +# Begin Source File + +SOURCE=.\NightSecWizard.cpp +# End Source File +# Begin Source File + +SOURCE=.\NormalPage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\Include\src\path.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\PropPageHolder.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\Include\src\RegSvr.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\AdvancedPage.h +# End Source File +# Begin Source File + +SOURCE=..\..\Include\atlchkbx.h +# End Source File +# Begin Source File + +SOURCE=.\ChecklistApp.h +# End Source File +# Begin Source File + +SOURCE=..\Common\ComponentArray.h +# End Source File +# Begin Source File + +SOURCE=..\Common\ComponentData.h +# End Source File +# Begin Source File + +SOURCE=..\Common\ComponentHolder.h +# End Source File +# Begin Source File + +SOURCE=.\DonePage.h +# End Source File +# Begin Source File + +SOURCE=.\ExtraPage.h +# End Source File +# Begin Source File + +SOURCE=.\FirstPage.h +# End Source File +# Begin Source File + +SOURCE=..\Common\NightSecApp.h +# End Source File +# Begin Source File + +SOURCE=.\NightSecWizard.h +# End Source File +# Begin Source File + +SOURCE=.\NormalPage.h +# End Source File +# Begin Source File + +SOURCE=..\Common\OneInstance.h +# End Source File +# Begin Source File + +SOURCE=..\Common\PropPageHolder.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=..\Common\types.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\95check.bmp +# End Source File +# Begin Source File + +SOURCE=.\AdvancedOptions.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\bitmap2.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\ico00002.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ico00003.ico +# End Source File +# Begin Source File + +SOURCE=.\res\menu.bmp +# End Source File +# Begin Source File + +SOURCE=".\res\Night Security Setup.ico" +# End Source File +# Begin Source File + +SOURCE=".\res\Night Security Stub.ico" +# End Source File +# Begin Source File + +SOURCE=.\res\nightsec.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\shutdown.ico +# End Source File +# End Group +# End Target +# End Project diff --git a/Checklist/Checklist.h b/Checklist/Checklist.h new file mode 100644 index 0000000..8624898 --- /dev/null +++ b/Checklist/Checklist.h @@ -0,0 +1,57 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Sun Nov 07 00:33:41 1999 + */ +/* Compiler settings for E:\Projects\NightSec\Checklist\Checklist.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __Checklist_h__ +#define __Checklist_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + + +#ifndef __CHECKLISTLib_LIBRARY_DEFINED__ +#define __CHECKLISTLib_LIBRARY_DEFINED__ + +/* library CHECKLISTLib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_CHECKLISTLib; +#endif /* __CHECKLISTLib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Checklist/Checklist.idl b/Checklist/Checklist.idl new file mode 100644 index 0000000..e3cbf46 --- /dev/null +++ b/Checklist/Checklist.idl @@ -0,0 +1,20 @@ +// Checklist.idl : IDL source for Checklist.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (Checklist.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + +[ + uuid(409C4B02-9310-11d3-BFC1-0020182B97FC), + version(1.0), + helpstring("Checklist 1.0 Type Library") +] +library CHECKLISTLib +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + +}; diff --git a/Checklist/Checklist.mk b/Checklist/Checklist.mk new file mode 100644 index 0000000..4e3a8f4 --- /dev/null +++ b/Checklist/Checklist.mk @@ -0,0 +1,934 @@ +# Microsoft Developer Studio Generated NMAKE File, Based on Checklist.dsp +!IF "$(CFG)" == "" +CFG=Checklist - Win32 Debug +!MESSAGE No configuration specified. Defaulting to Checklist - Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "Checklist - Win32 Debug" && "$(CFG)" != "Checklist - Win32 Unicode Debug" && "$(CFG)" != "Checklist - Win32 Release MinSize" && "$(CFG)" != "Checklist - Win32 Release MinDependency" && "$(CFG)" != "Checklist - Win32 Unicode Release MinSize" && "$(CFG)" != "Checklist - Win32 Unicode Release MinDependency" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Checklist.mak" CFG="Checklist - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Checklist - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Checklist - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE "Checklist - Win32 Release MinSize" (based on "Win32 (x86) Application") +!MESSAGE "Checklist - Win32 Release MinDependency" (based on "Win32 (x86) Application") +!MESSAGE "Checklist - Win32 Unicode Release MinSize" (based on "Win32 (x86) Application") +!MESSAGE "Checklist - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Application") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "Checklist - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug + +ALL : "..\Debug\Checklist.exe" ".\Debug\regsvr32.trg" + + +CLEAN : + -@erase "$(INTDIR)\AdvancedPage.obj" + -@erase "$(INTDIR)\appmisc.obj" + -@erase "$(INTDIR)\Checklist.obj" + -@erase "$(INTDIR)\Checklist.pch" + -@erase "$(INTDIR)\Checklist.res" + -@erase "$(INTDIR)\ChecklistApp.obj" + -@erase "$(INTDIR)\ComponentArray.obj" + -@erase "$(INTDIR)\ComponentData.obj" + -@erase "$(INTDIR)\ComponentHolder.obj" + -@erase "$(INTDIR)\DonePage.obj" + -@erase "$(INTDIR)\ExtraPage.obj" + -@erase "$(INTDIR)\FirstPage.obj" + -@erase "$(INTDIR)\NightSecApp.obj" + -@erase "$(INTDIR)\NightSecWizard.obj" + -@erase "$(INTDIR)\NormalPage.obj" + -@erase "$(INTDIR)\path.obj" + -@erase "$(INTDIR)\PropPageHolder.obj" + -@erase "$(INTDIR)\RegSvr.obj" + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\vc60.idb" + -@erase "$(INTDIR)\vc60.pdb" + -@erase "$(OUTDIR)\Checklist.pdb" + -@erase "..\Debug\Checklist.exe" + -@erase "..\Debug\Checklist.ilk" + -@erase ".\Debug\regsvr32.trg" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\Checklist.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +MTL=midl.exe +MTL_PROJ= +RSC=rc.exe +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\Checklist.res" /d "_DEBUG" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\Checklist.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\Checklist.pdb" /debug /machine:I386 /out:"../Debug/Checklist.exe" /pdbtype:sept +LINK32_OBJS= \ + "$(INTDIR)\AdvancedPage.obj" \ + "$(INTDIR)\appmisc.obj" \ + "$(INTDIR)\Checklist.obj" \ + "$(INTDIR)\ChecklistApp.obj" \ + "$(INTDIR)\ComponentArray.obj" \ + "$(INTDIR)\ComponentData.obj" \ + "$(INTDIR)\ComponentHolder.obj" \ + "$(INTDIR)\DonePage.obj" \ + "$(INTDIR)\ExtraPage.obj" \ + "$(INTDIR)\FirstPage.obj" \ + "$(INTDIR)\NightSecApp.obj" \ + "$(INTDIR)\NightSecWizard.obj" \ + "$(INTDIR)\NormalPage.obj" \ + "$(INTDIR)\path.obj" \ + "$(INTDIR)\PropPageHolder.obj" \ + "$(INTDIR)\RegSvr.obj" \ + "$(INTDIR)\StdAfx.obj" \ + "$(INTDIR)\Checklist.res" + +"..\Debug\Checklist.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +OutDir=.\Debug +TargetPath=\Projects\NightSec\Debug\Checklist.exe +InputPath=\Projects\NightSec\Debug\Checklist.exe +SOURCE="$(InputPath)" + +"$(OUTDIR)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < "$(OutDir)\regsvr32.trg" + echo Server registration done! +<< + + +!ELSEIF "$(CFG)" == "Checklist - Win32 Unicode Debug" + +OUTDIR=.\DebugU +INTDIR=.\DebugU + +ALL : "..\Debug\Checklist.exe" ".\DebugU\regsvr32.trg" + + +CLEAN : + -@erase "$(INTDIR)\AdvancedPage.obj" + -@erase "$(INTDIR)\appmisc.obj" + -@erase "$(INTDIR)\Checklist.obj" + -@erase "$(INTDIR)\Checklist.pch" + -@erase "$(INTDIR)\Checklist.res" + -@erase "$(INTDIR)\ChecklistApp.obj" + -@erase "$(INTDIR)\ComponentArray.obj" + -@erase "$(INTDIR)\ComponentData.obj" + -@erase "$(INTDIR)\ComponentHolder.obj" + -@erase "$(INTDIR)\DonePage.obj" + -@erase "$(INTDIR)\ExtraPage.obj" + -@erase "$(INTDIR)\FirstPage.obj" + -@erase "$(INTDIR)\NightSecApp.obj" + -@erase "$(INTDIR)\NightSecWizard.obj" + -@erase "$(INTDIR)\NormalPage.obj" + -@erase "$(INTDIR)\path.obj" + -@erase "$(INTDIR)\PropPageHolder.obj" + -@erase "$(INTDIR)\RegSvr.obj" + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\vc60.idb" + -@erase "$(INTDIR)\vc60.pdb" + -@erase "$(OUTDIR)\Checklist.pdb" + -@erase "..\Debug\Checklist.exe" + -@erase "..\Debug\Checklist.ilk" + -@erase ".\DebugU\regsvr32.trg" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MLd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Fp"$(INTDIR)\Checklist.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +MTL=midl.exe +MTL_PROJ= +RSC=rc.exe +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\Checklist.res" /d "_DEBUG" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\Checklist.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\Checklist.pdb" /debug /machine:I386 /out:"../Debug/Checklist.exe" /pdbtype:sept +LINK32_OBJS= \ + "$(INTDIR)\AdvancedPage.obj" \ + "$(INTDIR)\appmisc.obj" \ + "$(INTDIR)\Checklist.obj" \ + "$(INTDIR)\ChecklistApp.obj" \ + "$(INTDIR)\ComponentArray.obj" \ + "$(INTDIR)\ComponentData.obj" \ + "$(INTDIR)\ComponentHolder.obj" \ + "$(INTDIR)\DonePage.obj" \ + "$(INTDIR)\ExtraPage.obj" \ + "$(INTDIR)\FirstPage.obj" \ + "$(INTDIR)\NightSecApp.obj" \ + "$(INTDIR)\NightSecWizard.obj" \ + "$(INTDIR)\NormalPage.obj" \ + "$(INTDIR)\path.obj" \ + "$(INTDIR)\PropPageHolder.obj" \ + "$(INTDIR)\RegSvr.obj" \ + "$(INTDIR)\StdAfx.obj" \ + "$(INTDIR)\Checklist.res" + +"..\Debug\Checklist.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +OutDir=.\DebugU +TargetPath=\Projects\NightSec\Debug\Checklist.exe +InputPath=\Projects\NightSec\Debug\Checklist.exe +SOURCE="$(InputPath)" + +"$(OUTDIR)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < "$(OutDir)\regsvr32.trg" + echo Server registration done! + goto end + :NOTNT + echo Warning : Cannot register Unicode EXE on Windows 95 + :end +<< + + +!ELSEIF "$(CFG)" == "Checklist - Win32 Release MinSize" + +OUTDIR=.\ReleaseMinSize +INTDIR=.\ReleaseMinSize + +ALL : "..\Release\Checklist.exe" ".\ReleaseMinSize\regsvr32.trg" + + +CLEAN : + -@erase "$(INTDIR)\AdvancedPage.obj" + -@erase "$(INTDIR)\appmisc.obj" + -@erase "$(INTDIR)\Checklist.obj" + -@erase "$(INTDIR)\Checklist.pch" + -@erase "$(INTDIR)\Checklist.res" + -@erase "$(INTDIR)\ChecklistApp.obj" + -@erase "$(INTDIR)\ComponentArray.obj" + -@erase "$(INTDIR)\ComponentData.obj" + -@erase "$(INTDIR)\ComponentHolder.obj" + -@erase "$(INTDIR)\DonePage.obj" + -@erase "$(INTDIR)\ExtraPage.obj" + -@erase "$(INTDIR)\FirstPage.obj" + -@erase "$(INTDIR)\NightSecApp.obj" + -@erase "$(INTDIR)\NightSecWizard.obj" + -@erase "$(INTDIR)\NormalPage.obj" + -@erase "$(INTDIR)\path.obj" + -@erase "$(INTDIR)\PropPageHolder.obj" + -@erase "$(INTDIR)\RegSvr.obj" + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\vc60.idb" + -@erase "..\Release\Checklist.exe" + -@erase ".\ReleaseMinSize\regsvr32.trg" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /ML /W3 /GX /O1 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_DLL" /Fp"$(INTDIR)\Checklist.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +MTL=midl.exe +MTL_PROJ= +RSC=rc.exe +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\Checklist.res" /d "NDEBUG" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\Checklist.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\Checklist.pdb" /machine:I386 /out:"../Release/Checklist.exe" /OPT:NOWIN98 +LINK32_OBJS= \ + "$(INTDIR)\AdvancedPage.obj" \ + "$(INTDIR)\appmisc.obj" \ + "$(INTDIR)\Checklist.obj" \ + "$(INTDIR)\ChecklistApp.obj" \ + "$(INTDIR)\ComponentArray.obj" \ + "$(INTDIR)\ComponentData.obj" \ + "$(INTDIR)\ComponentHolder.obj" \ + "$(INTDIR)\DonePage.obj" \ + "$(INTDIR)\ExtraPage.obj" \ + "$(INTDIR)\FirstPage.obj" \ + "$(INTDIR)\NightSecApp.obj" \ + "$(INTDIR)\NightSecWizard.obj" \ + "$(INTDIR)\NormalPage.obj" \ + "$(INTDIR)\path.obj" \ + "$(INTDIR)\PropPageHolder.obj" \ + "$(INTDIR)\RegSvr.obj" \ + "$(INTDIR)\StdAfx.obj" \ + "$(INTDIR)\Checklist.res" + +"..\Release\Checklist.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +OutDir=.\ReleaseMinSize +TargetPath=\Projects\NightSec\Release\Checklist.exe +InputPath=\Projects\NightSec\Release\Checklist.exe +SOURCE="$(InputPath)" + +"$(OUTDIR)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < "$(OutDir)\regsvr32.trg" + echo Server registration done! +<< + + +!ELSEIF "$(CFG)" == "Checklist - Win32 Release MinDependency" + +OUTDIR=.\ReleaseMinDependency +INTDIR=.\ReleaseMinDependency + +ALL : "..\Release\Checklist.exe" ".\ReleaseMinDependency\regsvr32.trg" + + +CLEAN : + -@erase "$(INTDIR)\AdvancedPage.obj" + -@erase "$(INTDIR)\appmisc.obj" + -@erase "$(INTDIR)\Checklist.obj" + -@erase "$(INTDIR)\Checklist.pch" + -@erase "$(INTDIR)\Checklist.res" + -@erase "$(INTDIR)\ChecklistApp.obj" + -@erase "$(INTDIR)\ComponentArray.obj" + -@erase "$(INTDIR)\ComponentData.obj" + -@erase "$(INTDIR)\ComponentHolder.obj" + -@erase "$(INTDIR)\DonePage.obj" + -@erase "$(INTDIR)\ExtraPage.obj" + -@erase "$(INTDIR)\FirstPage.obj" + -@erase "$(INTDIR)\NightSecApp.obj" + -@erase "$(INTDIR)\NightSecWizard.obj" + -@erase "$(INTDIR)\NormalPage.obj" + -@erase "$(INTDIR)\path.obj" + -@erase "$(INTDIR)\PropPageHolder.obj" + -@erase "$(INTDIR)\RegSvr.obj" + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\vc60.idb" + -@erase "..\Release\Checklist.exe" + -@erase ".\ReleaseMinDependency\regsvr32.trg" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /ML /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_STATIC_REGISTRY" /Fp"$(INTDIR)\Checklist.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +MTL=midl.exe +MTL_PROJ= +RSC=rc.exe +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\Checklist.res" /d "NDEBUG" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\Checklist.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\Checklist.pdb" /machine:I386 /out:"..\Release\Checklist.exe" +LINK32_OBJS= \ + "$(INTDIR)\AdvancedPage.obj" \ + "$(INTDIR)\appmisc.obj" \ + "$(INTDIR)\Checklist.obj" \ + "$(INTDIR)\ChecklistApp.obj" \ + "$(INTDIR)\ComponentArray.obj" \ + "$(INTDIR)\ComponentData.obj" \ + "$(INTDIR)\ComponentHolder.obj" \ + "$(INTDIR)\DonePage.obj" \ + "$(INTDIR)\ExtraPage.obj" \ + "$(INTDIR)\FirstPage.obj" \ + "$(INTDIR)\NightSecApp.obj" \ + "$(INTDIR)\NightSecWizard.obj" \ + "$(INTDIR)\NormalPage.obj" \ + "$(INTDIR)\path.obj" \ + "$(INTDIR)\PropPageHolder.obj" \ + "$(INTDIR)\RegSvr.obj" \ + "$(INTDIR)\StdAfx.obj" \ + "$(INTDIR)\Checklist.res" + +"..\Release\Checklist.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +OutDir=.\ReleaseMinDependency +TargetPath=\Projects\NightSec\Release\Checklist.exe +InputPath=\Projects\NightSec\Release\Checklist.exe +SOURCE="$(InputPath)" + +"$(OUTDIR)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < "$(OutDir)\regsvr32.trg" + echo Server registration done! +<< + + +!ELSEIF "$(CFG)" == "Checklist - Win32 Unicode Release MinSize" + +OUTDIR=.\ReleaseUMinSize +INTDIR=.\ReleaseUMinSize + +ALL : "..\Release\Checklist.exe" ".\ReleaseUMinSize\regsvr32.trg" + + +CLEAN : + -@erase "$(INTDIR)\AdvancedPage.obj" + -@erase "$(INTDIR)\appmisc.obj" + -@erase "$(INTDIR)\Checklist.obj" + -@erase "$(INTDIR)\Checklist.pch" + -@erase "$(INTDIR)\Checklist.res" + -@erase "$(INTDIR)\ChecklistApp.obj" + -@erase "$(INTDIR)\ComponentArray.obj" + -@erase "$(INTDIR)\ComponentData.obj" + -@erase "$(INTDIR)\ComponentHolder.obj" + -@erase "$(INTDIR)\DonePage.obj" + -@erase "$(INTDIR)\ExtraPage.obj" + -@erase "$(INTDIR)\FirstPage.obj" + -@erase "$(INTDIR)\NightSecApp.obj" + -@erase "$(INTDIR)\NightSecWizard.obj" + -@erase "$(INTDIR)\NormalPage.obj" + -@erase "$(INTDIR)\path.obj" + -@erase "$(INTDIR)\PropPageHolder.obj" + -@erase "$(INTDIR)\RegSvr.obj" + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\vc60.idb" + -@erase "..\Release\Checklist.exe" + -@erase ".\ReleaseUMinSize\regsvr32.trg" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /ML /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Fp"$(INTDIR)\Checklist.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +MTL=midl.exe +MTL_PROJ= +RSC=rc.exe +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\Checklist.res" /d "NDEBUG" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\Checklist.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\Checklist.pdb" /machine:I386 /out:"../Release/Checklist.exe" +LINK32_OBJS= \ + "$(INTDIR)\AdvancedPage.obj" \ + "$(INTDIR)\appmisc.obj" \ + "$(INTDIR)\Checklist.obj" \ + "$(INTDIR)\ChecklistApp.obj" \ + "$(INTDIR)\ComponentArray.obj" \ + "$(INTDIR)\ComponentData.obj" \ + "$(INTDIR)\ComponentHolder.obj" \ + "$(INTDIR)\DonePage.obj" \ + "$(INTDIR)\ExtraPage.obj" \ + "$(INTDIR)\FirstPage.obj" \ + "$(INTDIR)\NightSecApp.obj" \ + "$(INTDIR)\NightSecWizard.obj" \ + "$(INTDIR)\NormalPage.obj" \ + "$(INTDIR)\path.obj" \ + "$(INTDIR)\PropPageHolder.obj" \ + "$(INTDIR)\RegSvr.obj" \ + "$(INTDIR)\StdAfx.obj" \ + "$(INTDIR)\Checklist.res" + +"..\Release\Checklist.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +OutDir=.\ReleaseUMinSize +TargetPath=\Projects\NightSec\Release\Checklist.exe +InputPath=\Projects\NightSec\Release\Checklist.exe +SOURCE="$(InputPath)" + +"$(OUTDIR)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < "$(OutDir)\regsvr32.trg" + echo Server registration done! + goto end + :NOTNT + echo Warning : Cannot register Unicode EXE on Windows 95 + :end +<< + + +!ELSEIF "$(CFG)" == "Checklist - Win32 Unicode Release MinDependency" + +OUTDIR=.\ReleaseUMinDependency +INTDIR=.\ReleaseUMinDependency +# Begin Custom Macros +OutDir=.\ReleaseUMinDependency +# End Custom Macros + +ALL : "$(OUTDIR)\Checklist.exe" ".\ReleaseUMinDependency\regsvr32.trg" + + +CLEAN : + -@erase "$(INTDIR)\AdvancedPage.obj" + -@erase "$(INTDIR)\appmisc.obj" + -@erase "$(INTDIR)\Checklist.obj" + -@erase "$(INTDIR)\Checklist.pch" + -@erase "$(INTDIR)\Checklist.res" + -@erase "$(INTDIR)\ChecklistApp.obj" + -@erase "$(INTDIR)\ComponentArray.obj" + -@erase "$(INTDIR)\ComponentData.obj" + -@erase "$(INTDIR)\ComponentHolder.obj" + -@erase "$(INTDIR)\DonePage.obj" + -@erase "$(INTDIR)\ExtraPage.obj" + -@erase "$(INTDIR)\FirstPage.obj" + -@erase "$(INTDIR)\NightSecApp.obj" + -@erase "$(INTDIR)\NightSecWizard.obj" + -@erase "$(INTDIR)\NormalPage.obj" + -@erase "$(INTDIR)\path.obj" + -@erase "$(INTDIR)\PropPageHolder.obj" + -@erase "$(INTDIR)\RegSvr.obj" + -@erase "$(INTDIR)\StdAfx.obj" + -@erase "$(INTDIR)\vc60.idb" + -@erase "$(OUTDIR)\Checklist.exe" + -@erase ".\ReleaseUMinDependency\regsvr32.trg" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /ML /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Fp"$(INTDIR)\Checklist.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +MTL=midl.exe +MTL_PROJ= +RSC=rc.exe +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\Checklist.res" /d "NDEBUG" +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\Checklist.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\Checklist.pdb" /machine:I386 /out:"$(OUTDIR)\Checklist.exe" +LINK32_OBJS= \ + "$(INTDIR)\AdvancedPage.obj" \ + "$(INTDIR)\appmisc.obj" \ + "$(INTDIR)\Checklist.obj" \ + "$(INTDIR)\ChecklistApp.obj" \ + "$(INTDIR)\ComponentArray.obj" \ + "$(INTDIR)\ComponentData.obj" \ + "$(INTDIR)\ComponentHolder.obj" \ + "$(INTDIR)\DonePage.obj" \ + "$(INTDIR)\ExtraPage.obj" \ + "$(INTDIR)\FirstPage.obj" \ + "$(INTDIR)\NightSecApp.obj" \ + "$(INTDIR)\NightSecWizard.obj" \ + "$(INTDIR)\NormalPage.obj" \ + "$(INTDIR)\path.obj" \ + "$(INTDIR)\PropPageHolder.obj" \ + "$(INTDIR)\RegSvr.obj" \ + "$(INTDIR)\StdAfx.obj" \ + "$(INTDIR)\Checklist.res" + +"$(OUTDIR)\Checklist.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\Checklist.exe +InputPath=.\ReleaseUMinDependency\Checklist.exe +SOURCE="$(InputPath)" + +"$(OUTDIR)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + < "$(OutDir)\regsvr32.trg" + echo Server registration done! + goto end + :NOTNT + echo Warning : Cannot register Unicode EXE on Windows 95 + :end +<< + + +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("Checklist.dep") +!INCLUDE "Checklist.dep" +!ELSE +!MESSAGE Warning: cannot find "Checklist.dep" +!ENDIF +!ENDIF + + +!IF "$(CFG)" == "Checklist - Win32 Debug" || "$(CFG)" == "Checklist - Win32 Unicode Debug" || "$(CFG)" == "Checklist - Win32 Release MinSize" || "$(CFG)" == "Checklist - Win32 Release MinDependency" || "$(CFG)" == "Checklist - Win32 Unicode Release MinSize" || "$(CFG)" == "Checklist - Win32 Unicode Release MinDependency" +SOURCE=.\AdvancedPage.cpp + +"$(INTDIR)\AdvancedPage.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + + +SOURCE=..\..\Include\src\appmisc.cpp + +"$(INTDIR)\appmisc.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\Checklist.cpp + +"$(INTDIR)\Checklist.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + + +SOURCE=.\Checklist.rc + +"$(INTDIR)\Checklist.res" : $(SOURCE) "$(INTDIR)" + $(RSC) $(RSC_PROJ) $(SOURCE) + + +SOURCE=.\ChecklistApp.cpp + +"$(INTDIR)\ChecklistApp.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + + +SOURCE=..\Common\ComponentArray.cpp + +"$(INTDIR)\ComponentArray.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=..\Common\ComponentData.cpp + +"$(INTDIR)\ComponentData.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=..\Common\ComponentHolder.cpp + +"$(INTDIR)\ComponentHolder.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\DonePage.cpp + +"$(INTDIR)\DonePage.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + + +SOURCE=.\ExtraPage.cpp + +"$(INTDIR)\ExtraPage.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + + +SOURCE=.\FirstPage.cpp + +"$(INTDIR)\FirstPage.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + + +SOURCE=..\Common\NightSecApp.cpp + +"$(INTDIR)\NightSecApp.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\NightSecWizard.cpp + +"$(INTDIR)\NightSecWizard.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + + +SOURCE=.\NormalPage.cpp + +"$(INTDIR)\NormalPage.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + + +SOURCE=..\..\Include\src\path.cpp + +"$(INTDIR)\path.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=..\Common\PropPageHolder.cpp + +"$(INTDIR)\PropPageHolder.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=..\..\Include\src\RegSvr.cpp + +"$(INTDIR)\RegSvr.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\Checklist.pch" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +SOURCE=.\StdAfx.cpp + +!IF "$(CFG)" == "Checklist - Win32 Debug" + +CPP_SWITCHES=/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\Checklist.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c + +"$(INTDIR)\StdAfx.obj" "$(INTDIR)\Checklist.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + + +!ELSEIF "$(CFG)" == "Checklist - Win32 Unicode Debug" + +CPP_SWITCHES=/nologo /MLd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Fp"$(INTDIR)\Checklist.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c + +"$(INTDIR)\StdAfx.obj" "$(INTDIR)\Checklist.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + + +!ELSEIF "$(CFG)" == "Checklist - Win32 Release MinSize" + +CPP_SWITCHES=/nologo /ML /W3 /GX /O1 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_DLL" /Fp"$(INTDIR)\Checklist.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c + +"$(INTDIR)\StdAfx.obj" "$(INTDIR)\Checklist.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + + +!ELSEIF "$(CFG)" == "Checklist - Win32 Release MinDependency" + +CPP_SWITCHES=/nologo /ML /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_STATIC_REGISTRY" /Fp"$(INTDIR)\Checklist.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c + +"$(INTDIR)\StdAfx.obj" "$(INTDIR)\Checklist.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + + +!ELSEIF "$(CFG)" == "Checklist - Win32 Unicode Release MinSize" + +CPP_SWITCHES=/nologo /ML /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Fp"$(INTDIR)\Checklist.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c + +"$(INTDIR)\StdAfx.obj" "$(INTDIR)\Checklist.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + + +!ELSEIF "$(CFG)" == "Checklist - Win32 Unicode Release MinDependency" + +CPP_SWITCHES=/nologo /ML /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Fp"$(INTDIR)\Checklist.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c + +"$(INTDIR)\StdAfx.obj" "$(INTDIR)\Checklist.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + + +!ENDIF + + +!ENDIF + diff --git a/Checklist/Checklist.rc b/Checklist/Checklist.rc new file mode 100644 index 0000000..926ae7c --- /dev/null +++ b/Checklist/Checklist.rc @@ -0,0 +1,306 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.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 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 2,5,0,1 + PRODUCTVERSION 2,5,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Part of the Night Security Program\0" + VALUE "CompanyName", "The Family (Thailand)\0" + VALUE "FileDescription", "Night Security (Checklist Module)\0" + VALUE "FileVersion", "2, 5, 0, 1\0" + VALUE "InternalName", "Checklist\0" + VALUE "LegalCopyright", "Copyright (C) 1998 - 1999, The Family (Thailand)\0" + VALUE "LegalTrademarks", "\0" + VALUE "OLESelfRegister", "\0" + VALUE "OriginalFilename", "secsetup.exe\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "Night Security 2.5\0" + VALUE "ProductVersion", "2, 5, 0, 1\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_WIZEXTRA DIALOG DISCARDABLE 0, 0, 283, 137 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Night Security Checklist" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL 132,IDC_STATIC,"Static",SS_BITMAP | SS_SUNKEN,0,0,68,137 + LTEXT "The item '%s' needs more information:",IDC_HEADERTEXT, + 75,1,208,10 + CONTROL "",IDC_PROPHOLDER,"Static",SS_BLACKFRAME | NOT + WS_VISIBLE,79,18,200,115 + LTEXT "",IDC_STATIC,75,15,207,121,SS_SUNKEN | NOT WS_GROUP +END + +IDD_ADVWIZWIN DIALOG DISCARDABLE 0, 0, 267, 199 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Night Security Checklist" +FONT 8, "MS Sans Serif" +BEGIN + LISTBOX IDC_COMPONENTS,45,22,222,48,LBS_OWNERDRAWFIXED | + LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | + WS_TABSTOP + CONTROL 207,ID_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0,0,33, + 198 + LTEXT "The following items run in your Secure Shutdown before exiting Windows. Drag an item to change the order.", + ID_STATIC,45,0,219,18 + CONTROL "Tab",IDC_PAGETABS,"SysTabControl32",TCS_VERTICAL | + WS_TABSTOP,44,77,223,122 + CTEXT "(No advanced properties for this component)",ID_STATIC, + 74,131,171,11 + CONTROL "",IDC_PROPHOLDER,"Static",SS_BLACKFRAME | NOT + WS_VISIBLE,63,80,200,115 +END + +IDD_FIRSTPAGE DIALOG DISCARDABLE 0, 0, 283, 137 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Night Security Checklist" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL 132,IDC_STATIC,"Static",SS_BITMAP | SS_REALSIZEIMAGE | + SS_SUNKEN,0,0,68,137 + PUSHBUTTON "&Advanced...",IDC_ADVANCED,224,87,56,15 + LTEXT "Welcome to Night Security. The easy way to keep your computer secure.", + IDC_STATIC,74,0,206,18 + LTEXT "Just click the 'Next' button below and check off the different items you want to put on your 'security checklist.'", + IDC_STATIC,98,31,182,17 + LTEXT "In order to use the shutdown (ie: do security) select the 'Secure Shutdown' command on your Start menu.", + IDC_STATIC,99,118,181,19 + ICON IDI_SHUTDOWN,IDC_STATIC,74,116,20,20 + ICON IDI_ITEMS,IDC_STATIC,72,31,20,20 + LTEXT "If you like to play with settings just click the 'Advanced' button below and tweak to your heart's content.", + IDC_STATIC,98,67,182,17 +END + +IDD_LASTPAGE DIALOG DISCARDABLE 0, 0, 283, 137 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Night Security Checklist" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL 132,IDC_STATIC,"Static",SS_BITMAP | SS_REALSIZEIMAGE | + SS_SUNKEN,0,0,68,137 + LTEXT "Night Security is ready for you to use. ",IDC_STATIC,76, + 0,198,10 + CONTROL 146,IDC_STATIC,"Static",SS_BITMAP,165,34,114,152 + PUSHBUTTON "Secure Shutdown",IDC_SHUTDOWN,77,85,35,28,BS_ICON | + BS_FLAT + LTEXT "Click here to start your Secure Shutdown:",IDC_STATIC, + 76,119,78,16 + LTEXT "In order to 'do' Night Security on your computer click 'Secure Shutdown' on your Start menu.", + IDC_STATIC,76,12,197,18 +END + +IDD_WIZ DIALOG DISCARDABLE 0, 0, 283, 137 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Night Security Checklist" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Check the items you'd like to run in your Secure Shutdown.", + IDC_STATIC,75,1,199,10 + CONTROL 132,IDC_STATIC,"Static",SS_BITMAP | SS_REALSIZEIMAGE | + SS_SUNKEN,0,0,68,137 + LISTBOX IDC_COMPONENTS,75,15,204,76,LBS_OWNERDRAWFIXED | + LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | + WS_TABSTOP + ICON IDI_NOTE,IDC_STATIC,75,104,20,20 + LTEXT "Static",IDC_TIPS,102,104,177,33 + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ | SS_SUNKEN,75,96, + 204,1 +END + +IDD_ADVWIZDOS DIALOG DISCARDABLE 0, 0, 267, 199 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Night Security Checklist" +FONT 8, "MS Sans Serif" +BEGIN + LISTBOX IDC_COMPONENTS,45,22,222,48,LBS_OWNERDRAWFIXED | + LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | + WS_TABSTOP + CONTROL 207,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,0,0, + 33,198 + CONTROL "Tab",IDC_PAGETABS,"SysTabControl32",TCS_VERTICAL,44,77, + 223,122 + CTEXT "(No advanced properties for this component)",IDC_STATIC, + 74,131,171,11 + CONTROL "",IDC_PROPHOLDER,"Static",SS_BLACKFRAME | NOT + WS_VISIBLE,63,80,200,115 + LTEXT "The following items run in MS-DOS Mode section of your Secure Shutdown after exiting Windows. Drag an item to change the order.", + IDC_STATIC,45,0,215,18 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_WIZEXTRA, DIALOG + BEGIN + VERTGUIDE, 68 + VERTGUIDE, 75 + VERTGUIDE, 79 + VERTGUIDE, 277 + HORZGUIDE, 18 + HORZGUIDE, 21 + END + + IDD_ADVWIZWIN, DIALOG + BEGIN + RIGHTMARGIN, 264 + END + + IDD_FIRSTPAGE, DIALOG + BEGIN + LEFTMARGIN, 7 + VERTGUIDE, 231 + TOPMARGIN, 7 + BOTTOMMARGIN, 130 + END + + IDD_LASTPAGE, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 273 + TOPMARGIN, 7 + END + + IDD_WIZ, DIALOG + BEGIN + VERTGUIDE, 68 + VERTGUIDE, 75 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_ADVANCED BITMAP DISCARDABLE "res\\nightsec.bmp" +IDB_MENU BITMAP DISCARDABLE "res\\menu.bmp" +IDB_NORMAL BITMAP DISCARDABLE "res\\bitmap2.bmp" +IDB_CHECKLISTBOX BITMAP DISCARDABLE "95check.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "res\\Night Security Stub.ico" +IDI_ITEMS ICON DISCARDABLE "res\\ico00002.ico" +IDI_NOTE ICON DISCARDABLE "res\\ico00003.ico" +IDI_SHUTDOWN ICON DISCARDABLE "res\\shutdown.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "Checklist" + IDP_REGISTER_FAILED "Night Security was unable to register the %s component.\n\n%s\nIf Night Security doesn't seem to be working properly please reinstall." +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Checklist/Checklist.rgs b/Checklist/Checklist.rgs new file mode 100644 index 0000000..7b79792 --- /dev/null +++ b/Checklist/Checklist.rgs @@ -0,0 +1,11 @@ +HKCR +{ + NoRemove AppID + { + {19178A36-7FDB-11D3-BF9E-0020182B97FC} = s 'Checklist' + 'Checklist.EXE' + { + val AppID = s {19178A36-7FDB-11D3-BF9E-0020182B97FC} + } + } +} diff --git a/Checklist/ChecklistApp.cpp b/Checklist/ChecklistApp.cpp new file mode 100644 index 0000000..503dfce --- /dev/null +++ b/Checklist/ChecklistApp.cpp @@ -0,0 +1,83 @@ +// ChecklistApp.cpp: implementation of the CChecklistApp class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "ChecklistApp.h" +#include "NightSecWizard.h" + +#include "FirstPage.h" +#include "NormalPage.h" +#include "DonePage.h" +#include "AdvancedPage.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CChecklistApp::CChecklistApp() + : CNightSecApp(_T("Night Security Checklist"), _T("NightSecurity.SecSetup.{2ED9B361-F6EF-11d2-A5A1-0020182B97FC}")) +{ } + +CChecklistApp::~CChecklistApp() +{ } + +bool CChecklistApp::InitInstance() +{ + if(!CNightSecApp::InitInstance()) + return false; + + // If more than one instance bail out early + if(m_oneInstance.IsAlreadyLoaded()) + { + m_oneInstance.FindAndActivate(_T("#32770"), _T("Night Security Checklist")); + return false; + } + + // Create the Normal Wizard + CNormalWizard wizNormal; + + // Add Normal Wizard Pages + CFirstPage page1(&wizNormal, WIZPAGE_FIRST); + CNormalPage page2(&wizNormal, WIZPAGE_MIDDLE); + CDonePage page3(&wizNormal, WIZPAGE_LAST); + + wizNormal.AddPage(&page1); + wizNormal.AddPage(&page2); + wizNormal.AddExtraPages(); + wizNormal.AddPage(&page3); + + // And Show it + int nRet = wizNormal.DoModal(); + + // If Advanced Button was pressed + if(nRet == IDC_ADVANCED) + { + + // Create the Advanced Wizard + CAdvancedWizard wizAdvanced; + + // Add advanced Wizard Pages + CAdvancedPage pageAdv1(&wizAdvanced, COMPONENT_WIN, IDD_ADVWIZWIN, WIZPAGE_FIRST); + CAdvancedPage pageAdv2(&wizAdvanced, COMPONENT_DOS, IDD_ADVWIZDOS, WIZPAGE_LAST); + + wizAdvanced.AddPage(&pageAdv1); + wizAdvanced.AddPage(&pageAdv2); + + // And Show it + nRet = wizAdvanced.DoModal(); + + } + + if(nRet == ID_WIZFINISH) + { + // Set flag so Secure Shutdown Program doesn't prompt + m_settings.WriteInt("Is Setup", 1); + // If Finish Button was pressed then save data + g_aComponents.SaveComponentData(); + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return false; +} diff --git a/Checklist/ChecklistApp.h b/Checklist/ChecklistApp.h new file mode 100644 index 0000000..ec384bf --- /dev/null +++ b/Checklist/ChecklistApp.h @@ -0,0 +1,24 @@ +// ChecklistApp.h: interface for the CChecklistApp class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CHECKLISTAPP_H__19178A46_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_) +#define AFX_CHECKLISTAPP_H__19178A46_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "..\common\NightSecApp.h" + +class CChecklistApp : public CNightSecApp +{ +public: + CChecklistApp(); + virtual ~CChecklistApp(); + + virtual bool InitInstance(); + +}; + +#endif // !defined(AFX_CHECKLISTAPP_H__19178A46_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_) diff --git a/Checklist/Checklistps.def b/Checklist/Checklistps.def new file mode 100644 index 0000000..36f7aa8 --- /dev/null +++ b/Checklist/Checklistps.def @@ -0,0 +1,11 @@ + +LIBRARY "ChecklistPS" + +DESCRIPTION 'Proxy/Stub DLL' + +EXPORTS + DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + GetProxyDllInfo @3 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE diff --git a/Checklist/Checklistps.mk b/Checklist/Checklistps.mk new file mode 100644 index 0000000..81501ba --- /dev/null +++ b/Checklist/Checklistps.mk @@ -0,0 +1,16 @@ + +Checklistps.dll: dlldata.obj Checklist_p.obj Checklist_i.obj + link /dll /out:Checklistps.dll /def:Checklistps.def /entry:DllMain dlldata.obj Checklist_p.obj Checklist_i.obj \ + kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \ + +.c.obj: + cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \ + $< + +clean: + @del Checklistps.dll + @del Checklistps.lib + @del Checklistps.exp + @del dlldata.obj + @del Checklist_p.obj + @del Checklist_i.obj diff --git a/Checklist/DonePage.cpp b/Checklist/DonePage.cpp new file mode 100644 index 0000000..76b4eb4 --- /dev/null +++ b/Checklist/DonePage.cpp @@ -0,0 +1,87 @@ +// DonePage.cpp : implementation file +// + +#include "stdafx.h" +#include "DonePage.h" +#include +#include + +///////////////////////////////////////////////////////////////////////////// +// CDonePage property page + +CDonePage::CDonePage(CPropertySheet* pParent, UINT nPos /*= WIZPAGE_MIDDLE*/) + : CPropertyPage(CDonePage::IDD), + + m_nPos(nPos) // Position in the Wizard (WIZPAGE_FIRST, WIZPAGE_MIDDLE + // or WIZPAGE_LAST) +{ + ASSERT(pParent); // Have to have a valid parent + m_pParentSheet = pParent; // or we can't survive + SetHelp(true); +} + +CDonePage::~CDonePage() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// CDonePage message handlers + +LRESULT CDonePage::OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + DWORD dwButtons; + + // Depening on our Position in the Wizard + // Set the Buttons at the bottom on and off + + switch(m_nPos){ + case WIZPAGE_FIRST: + dwButtons = PSWIZB_NEXT; + break; + case WIZPAGE_LAST: + dwButtons = PSWIZB_BACK | PSWIZB_FINISH; + break; + default: + dwButtons = PSWIZB_BACK | PSWIZB_NEXT; + break; + } + + m_pParentSheet->SetWizardButtons(dwButtons); + + return 0; +} + +LRESULT CDonePage::OnHelp(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + WinHelp(NS_HELP_FILE, HELP_FINDER, 0); + return 1; +} + +LRESULT CDonePage::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Set the Help ID for our Help File +// m_nIDHelp = 300; + + HICON hIconNightSec = ::LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_SHUTDOWN)); + + CButton btnNew = GetDlgItem(IDC_SHUTDOWN); + btnNew.SetIcon(hIconNightSec); + btnNew.Detach(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +LRESULT CDonePage::OnShutdown(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + m_pParentSheet->PressButton(PSBTN_FINISH); + + string sShutdownCmd = GetProgramFolder(_Module.m_hInst); + sShutdownCmd += _T("Shutdown.exe"); + + // Start the Shutdown Program + if(ShellExecute(NULL, _T("open"), sShutdownCmd, NULL, NULL, SW_SHOWNORMAL) <= (HINSTANCE)32) + ::MessageBox(NULL, _T("Couldn't start Secure Shutdown. Make sure it's installed properly."), _T("Secure Shutdown"), MB_ICONSTOP); + + return 1; +} diff --git a/Checklist/DonePage.h b/Checklist/DonePage.h new file mode 100644 index 0000000..caf1492 --- /dev/null +++ b/Checklist/DonePage.h @@ -0,0 +1,55 @@ +#if !defined(AFX_DONEPAGE_H__266E17F7_F416_11D2_A599_0020182B97FC__INCLUDED_) +#define AFX_DONEPAGE_H__266E17F7_F416_11D2_A599_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// DonePage.h : header file +// + +#include "resource.h" +#include +#include + +///////////////////////////////////////////////////////////////////////////// +// CDonePage dialog + +class CDonePage + : public CPropertyPage, + public CContextHelp +{ + + // Construction +public: + CDonePage(CPropertySheet* pParent, UINT nPos = WIZPAGE_MIDDLE); + ~CDonePage(); + +// Dialog Data + enum { IDD = IDD_LASTPAGE }; + +BEGIN_MSG_MAP(CDonePage) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + NOTIFY_CODE_HANDLER(PSN_SETACTIVE, OnSetActive) + COMMAND_HANDLER(IDC_SHUTDOWN, BN_CLICKED, OnShutdown) + CHAIN_MSG_MAP(CContextHelp) + NOTIFY_CODE_HANDLER(PSN_HELP, OnHelp) +END_MSG_MAP() + +BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(IDC_SHUTDOWN, 3003) +END_HELP_MAP + +// Messages +public: + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnShutdown(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnHelp(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + +// Implementation +protected: + CPropertySheet* m_pParentSheet; + const UINT m_nPos; +}; + +#endif // !defined(AFX_DONEPAGE_H__266E17F7_F416_11D2_A599_0020182B97FC__INCLUDED_) diff --git a/Checklist/ExtraPage.cpp b/Checklist/ExtraPage.cpp new file mode 100644 index 0000000..dccc325 --- /dev/null +++ b/Checklist/ExtraPage.cpp @@ -0,0 +1,70 @@ +// ExtraPage.cpp : implementation file +// + +#include "stdafx.h" +#include "ExtraPage.h" + +#include + +///////////////////////////////////////////////////////////////////////////// +// CExtraPage property page + + +///////////////////////////////////////////////////////////////////////////// +// CExtraPage message handlers + +LRESULT CExtraPage::OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + ASSERT(m_pComponent != NULL); + m_pParentSheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT); + return m_pComponent->IsEnabled() ? 0 : -1; +} + +LRESULT CExtraPage::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Set the Proppage Rectangle to the Place Holder + ::GetWindowRect(GetDlgItem(IDC_PROPHOLDER), &m_rcPropPage); + ScreenToClient(&m_rcPropPage); + + // Remove Place Holder Control + ::DestroyWindow(GetDlgItem(IDC_PROPHOLDER)); + + string sFormat; + GetDlgItemText(IDC_HEADERTEXT, sFormat.get_buffer(512), 512); + sFormat.release_buffer(); + + string sText; + sText.format(sFormat, (LPCTSTR)m_pComponent->GetName()); + + SetDlgItemText(IDC_HEADERTEXT, sText); + + m_pPropPage->Create(*this, m_rcPropPage, true); + SetWindowLong(GWL_EXSTYLE, GetWindowLong(GWL_EXSTYLE) & WS_EX_CONTROLPARENT); + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +LRESULT CExtraPage::OnKillActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + // If we have a PropPage then Save it + if(m_pPropPage != NULL) + m_pPropPage->Apply(); + + return FALSE; +} + +LRESULT CExtraPage::OnHelp(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + WinHelp(NS_HELP_FILE, HELP_FINDER, 0); + return 1; +} + + +LRESULT CExtraPage::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // If we have a PropPage then Close it + if(m_pPropPage != NULL) + m_pPropPage->Destroy(); + + return 0; +} diff --git a/Checklist/ExtraPage.h b/Checklist/ExtraPage.h new file mode 100644 index 0000000..a1eb8c4 --- /dev/null +++ b/Checklist/ExtraPage.h @@ -0,0 +1,63 @@ +#if !defined(AFX_EXTRAPAGE_H__16823CC6_F3FB_11D2_A599_0020182B97FC__INCLUDED_) +#define AFX_EXTRAPAGE_H__16823CC6_F3FB_11D2_A599_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +// ExtraPage.h : header file +// +#include "resource.h" + +#include + +#include "../Common/PropPageHolder.h" + +#include +using std::list; + +///////////////////////////////////////////////////////////////////////////// +// CExtraPage dialog + +class CExtraPage : public CPropertyPage +{ + +// Construction +public: + CExtraPage(CPropertySheet* pSheet, CComponentHolder* pComponent, + CPropPageHolder* pPropPage) + : CPropertyPage(IDD_WIZEXTRA), m_pComponent(pComponent), + m_pPropPage(pPropPage), m_pParentSheet(pSheet) + { + SetHelp(true); + }; + + ~CExtraPage() {}; + +BEGIN_MSG_MAP(CExtraPage) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + NOTIFY_CODE_HANDLER(PSN_SETACTIVE , OnSetActive) + NOTIFY_CODE_HANDLER(PSN_KILLACTIVE , OnKillActive) + NOTIFY_CODE_HANDLER(PSN_HELP, OnHelp) +END_MSG_MAP() + + +// Messages +public: + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnKillActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnHelp(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + + +// Implementation +protected: + RECT m_rcPropPage; + CPropPageHolder* m_pPropPage; + CComponentHolder* m_pComponent; + CPropertySheet* m_pParentSheet; +}; + +#endif // !defined(AFX_EXTRAPAGE_H__16823CC6_F3FB_11D2_A599_0020182B97FC__INCLUDED_) diff --git a/Checklist/FirstPage.cpp b/Checklist/FirstPage.cpp new file mode 100644 index 0000000..3bdba17 --- /dev/null +++ b/Checklist/FirstPage.cpp @@ -0,0 +1,76 @@ +// FirstPage.cpp : implementation file +// + +#include "stdafx.h" +#include "FirstPage.h" + + +///////////////////////////////////////////////////////////////////////////// +// CFirstPage property page + +CFirstPage::CFirstPage(CPropertySheet* pParent, UINT nPos /*= WIZPAGE_MIDDLE*/) + : CPropertyPage(CFirstPage::IDD), + + m_nPos(nPos) // Position in the Wizard (WIZPAGE_FIRST, WIZPAGE_MIDDLE + // or WIZPAGE_LAST) + +{ + ASSERT(pParent); // Have to have a valid parent + m_pParentSheet = pParent; // or we can't survive + SetHelp(true); +} + +CFirstPage::~CFirstPage() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// CFirstPage message handlers + +LRESULT CFirstPage::OnAdvanced(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + // Pass IDC_ADVANCED advanced to caller + // as a signal to start advanced wizard + m_pParentSheet->EndDialog(IDC_ADVANCED); + + return 1; +} + +LRESULT CFirstPage::OnHelp(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + WinHelp(NS_HELP_FILE, HELP_FINDER, 0); + return 1; +} + +LRESULT CFirstPage::OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + DWORD dwButtons; + + // Depening on our Position in the Wizard + // Set the Buttons at the bottom on and off + + switch(m_nPos){ + case WIZPAGE_FIRST: + dwButtons = PSWIZB_NEXT; + break; + case WIZPAGE_LAST: + dwButtons = PSWIZB_BACK | PSWIZB_FINISH; + break; + default: + dwButtons = PSWIZB_BACK | PSWIZB_NEXT; + break; + } + + m_pParentSheet->SetWizardButtons(dwButtons); + + return 0; +} + +LRESULT CFirstPage::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Set the Help ID for our Help File +// m_nIDHelp = 200; + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} diff --git a/Checklist/FirstPage.h b/Checklist/FirstPage.h new file mode 100644 index 0000000..8511e25 --- /dev/null +++ b/Checklist/FirstPage.h @@ -0,0 +1,60 @@ +////////////////////////////////////////////////////////////////// +// +// FirstPage.h : header file +// +// First 'welcome' page of wizard. Not much in here +// +////////////////////////////////////////////////////////////////// + +#if !defined(AFX_FIRSTPAGE_H__77AE1844_1B1F_11D2_B2D4_0020182B97FC__INCLUDED_) +#define AFX_FIRSTPAGE_H__77AE1844_1B1F_11D2_B2D4_0020182B97FC__INCLUDED_ + +#include "resource.h" +#include +#include + +///////////////////////////////////////////////////////////////////////////// +// CFirstPage dialog + +class CFirstPage + : public CPropertyPage, + public CContextHelp +{ + +// Construction +public: + CFirstPage(CPropertySheet* pParent, UINT nPos = WIZPAGE_MIDDLE); + ~CFirstPage(); + +// Dialog Data + enum { IDD = IDD_FIRSTPAGE }; + +BEGIN_MSG_MAP(CFirstPage) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + NOTIFY_CODE_HANDLER(PSN_SETACTIVE, OnSetActive) + NOTIFY_CODE_HANDLER(PSN_HELP, OnHelp) + COMMAND_HANDLER(IDC_ADVANCED, BN_CLICKED, OnAdvanced) + CHAIN_MSG_MAP(CContextHelp) +END_MSG_MAP() + +BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(IDC_ADVANCED, 3001) +END_HELP_MAP + +// Messages +public: + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnAdvanced(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnHelp(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + +// Implementation +protected: + CPropertySheet* m_pParentSheet; + const UINT m_nPos; +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_FIRSTPAGE_H__77AE1844_1B1F_11D2_B2D4_0020182B97FC__INCLUDED_) diff --git a/Checklist/NightSecWizard.cpp b/Checklist/NightSecWizard.cpp new file mode 100644 index 0000000..d394d07 --- /dev/null +++ b/Checklist/NightSecWizard.cpp @@ -0,0 +1,291 @@ +// NightSecWizard.cpp: implementation of the CNightSecWizard class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "NightSecWizard.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CNightSecWizard::~CNightSecWizard() +{ + PropertyPageMap::iterator iter = m_mapPages.begin(); + + for( ; iter != m_mapPages.end(); iter++) + delete iter->second; + + m_mapPages.clear(); +}; + +HRESULT CNightSecWizard::LoadPropertyPages(CComponentHolder* pComponent) +{ + IUnknown* pUnk = pComponent->GetUnknown(); + + IUnknown* apUnks[2]; + apUnks[0] = pUnk; + apUnks[1] = pComponent->GetData()->GetUnknown(); + + // Don't use smart pointer here because we'll probably + // copy this to our map + IPropertyPage* pPage; + HRESULT hr = pUnk->QueryInterface(IID_IPropertyPage, (void**)&pPage); + + // Found a single property page + if(SUCCEEDED(hr)) + { + // Add to map and return + hr = pPage->SetObjects(countof(apUnks), apUnks); + + if(SUCCEEDED(hr)) + { + CPropPageHolder* pPropPage = new CComObjectMember; + hr = pPropPage->Initialize(pPage, GetUnknown()); + + if(SUCCEEDED(hr)) + m_mapPages.insert(make_pair(pComponent, pPropPage)); + else + delete pPropPage; + } + + pPage->Release(); + return hr; + } + + // Look for multiple property pages + ISpecifyPropertyPagesPtr pPages = pUnk; + + if(pPages) + { + CAUUID cauuid; + memset(&cauuid, 0, sizeof(CAUUID)); + + hr = pPages->GetPages(&cauuid); + + if(FAILED(hr)) + return hr; + + HRESULT hRet = S_FALSE; + + for(int nCnt = 0; nCnt < cauuid.cElems; nCnt++) + { + IPropertyPagePtr pPage; + hr = pPage.CreateInstance(cauuid.pElems[nCnt], NULL); + + if(FAILED(hr)) + continue; + + hr = pPage->SetObjects(countof(apUnks), apUnks); + + if(SUCCEEDED(hr)) + { + CPropPageHolder* pPropPage = new CComObjectMember; + hr = pPropPage->Initialize(pPage, GetUnknown()); + + if(SUCCEEDED(hr)) + { + m_mapPages.insert(make_pair(pComponent, pPropPage)); + hRet = S_OK; + } + } + + } + + CoTaskMemFree(cauuid.pElems); + + return hRet; + } + + return S_FALSE; +} + +IUnknown* CNightSecWizard::GetIUnknown(bool bAddRef /*= false*/) +{ + // If asked not to increment then Release + if(bAddRef) + this->AddRef(); + + return GetUnknown(); +} + +void CNightSecWizard::SetSite(IUnknown* pSite /*= NULL*/) +{ + if(!pSite) + pSite = GetUnknown(); + + IUnknown* pUnk = NULL; + IObjectWithSitePtr pWithSite; + + // Cycle through components and set Site Pointer + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + if(pUnk = g_aComponents[nCnt]->GetUnknown()) + { + pWithSite = pUnk; + + if(pWithSite != NULL) + pWithSite->SetSite(pSite); + + pUnk->Release(); + } + } +} + +void CNightSecWizard::ClearSite() +{ + IUnknown* pUnk = NULL; + IObjectWithSitePtr pWithSite; + + // Cycle through Components and Clear Site Pointer + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + if(pUnk = g_aComponents[nCnt]->GetUnknown()) + { + pWithSite = pUnk; + + if(pWithSite != NULL) + pWithSite->SetSite(NULL); + + pUnk->Release(); + } + } +} + +LRESULT CNightSecWizard::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Make sure that that CPropertySheet::OnInitDialog gets called + bHandled = FALSE; + + ModifyStyle(0, WS_SYSMENU); + ModifyStyleEx(0, WS_EX_APPWINDOW | WS_EX_CONTEXTHELP); + SetWindowText(_T("Night Security Checklist")); + + + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////// +// CAdvancedWizard + +LRESULT CAdvancedWizardT::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Make sure that that CPropertySheet::OnInitDialog gets called + bHandled = FALSE; + + SetSite(); + + // Cycle through components and... + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + // And Load Property Pages for that Component + LoadPropertyPages(g_aComponents[nCnt]); + } + + return 0; +} + +LRESULT CAdvancedWizardT::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + ClearSite(); + + // And Destroy all Property Pages + PropertyPageMap::iterator iter = m_mapPages.begin(); + for( ; iter != m_mapPages.end(); iter++) + iter->second->Destroy(); + + return 0; +} + +STDMETHODIMP CAdvancedWizardT::get_Info(/*[in]*/ NightSecSiteInfo nsItem, /*[out, retval]*/ VARIANT* pvVal) +{ + ::VariantClear(pvVal); + + // CComBSTR bsRetVal; + switch(nsItem) + { + case nsAdvanced: + pvVal->vt = VT_BOOL; + pvVal->bVal = TRUE; + return S_OK; + } + + return S_FALSE; +} + + +//////////////////////////////////////////////////////////////////////////////// +// CNormalWizard + +CNormalWizardT::~CNormalWizardT() +{ + ExtraPageArray::iterator iter = m_aPages.begin(); + for( ; iter != m_aPages.end(); iter++) + delete *iter; + + m_aPages.clear(); +} + +STDMETHODIMP CNormalWizardT::get_Info(/*[in]*/ NightSecSiteInfo nsItem, /*[out, retval]*/ VARIANT* pvVal) +{ + ::VariantClear(pvVal); + + // CComBSTR bsRetVal; + switch(nsItem) + { + case nsAdvanced: + pvVal->vt = VT_BOOL; + pvVal->bVal = FALSE; + return S_OK; + } + + return S_FALSE; +} + +LRESULT CNormalWizardT::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Make sure that that CPropertySheet::OnInitDialog gets called + bHandled = FALSE; + + if(!m_bSiteSet) + { + SetSite(); + m_bSiteSet = true; + } + + return 0; +}; + +LRESULT CNormalWizardT::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + ClearSite(); + + PropertyPageMap::iterator iter = m_mapPages.begin(); + for( ; iter != m_mapPages.end(); iter++) + iter->second->Destroy(); + + return 0; +}; + +void CNormalWizardT::AddExtraPages() +{ + if(!m_bSiteSet) + { + SetSite(); + m_bSiteSet = true; + } + + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + if(g_aComponents[nCnt]->GetInfoInt(nsForceShow, 0)) + LoadPropertyPages(g_aComponents[nCnt]); + } + + PropertyPageMap::iterator iter = m_mapPages.begin(); + for( ; iter != m_mapPages.end(); iter++) + { + CExtraPage* pPage = new CExtraPage(this, iter->first, iter->second); + AddPage(pPage); + m_aPages.insert(m_aPages.end(), pPage); + } +} diff --git a/Checklist/NightSecWizard.h b/Checklist/NightSecWizard.h new file mode 100644 index 0000000..3f2d1f0 --- /dev/null +++ b/Checklist/NightSecWizard.h @@ -0,0 +1,151 @@ +// NightSecWizard.h: interface for the CNightSecWizard class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_NIGHTSECWIZARD_H__E7FC7C13_8F86_11D3_BFBC_0020182B97FC__INCLUDED_) +#define AFX_NIGHTSECWIZARD_H__E7FC7C13_8F86_11D3_BFBC_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "Checklist.h" +#include "../common/Interfaces.h" +#include "../common/proppageholder.h" + +#include "contexthelp.h" + +#define countof(a) (sizeof(a) / sizeof(a[0])) + +#include +using std::multimap; +typedef multimap < CComponentHolder*, CPropPageHolder* > PropertyPageMap; + +#include + +class ATL_NO_VTABLE CNightSecWizard : + public CComObjectRootEx, + public IDispatchImpl, + public CPropertySheet, + public CContextHelp +{ + +// Construction +public: + CNightSecWizard() + : CPropertySheet(_T("Night Security Checklist"), NULL, 0) + { + SetWizardMode(); + SetHelp(true); + } + + virtual ~CNightSecWizard(); + +// For Base Classes +protected: + HRESULT LoadPropertyPages(CComponentHolder* pComponent); + IUnknown* GetIUnknown(bool bAddRef = false); + void SetSite(IUnknown* pSite = NULL); + void ClearSite(); + +// COM Interface support +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CNightSecWizard) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(INightSecSiteInfo) +END_COM_MAP() + +BEGIN_MSG_MAP(CNightSecWizard) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + CHAIN_MSG_MAP(CContextHelp) + CHAIN_MSG_MAP(CPropertySheet) +END_MSG_MAP() + +BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(ID_WIZBACK, 502) + HELP_ID(ID_WIZNEXT, 501) + HELP_ID(ID_WIZFINISH, 503) +END_HELP_MAP + + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + +// Data +public: + PropertyPageMap m_mapPages; +}; + + +class CAdvancedWizardT : public CNightSecWizard +{ +public: + CAdvancedWizardT() + { } + virtual ~CAdvancedWizardT() {} + +// Message Map +BEGIN_MSG_MAP(CAdvancedWizardT) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + CHAIN_MSG_MAP(CNightSecWizard) +END_MSG_MAP() + +// Message Handlers +protected: + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + +// INightSecSiteInfo +public: + STDMETHOD(get_Info)(/*[in]*/ NightSecSiteInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + +}; + +typedef CComObjectMember CAdvancedWizard; + + + +#include "ExtraPage.h" + +#include +using std::vector; +typedef vector ExtraPageArray; + + +class CNormalWizardT : public CNightSecWizard +{ +public: + CNormalWizardT() + { + m_bSiteSet = false; + } + virtual ~CNormalWizardT(); + +// Message Map +BEGIN_MSG_MAP(CNormalWizardT) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + CHAIN_MSG_MAP(CNightSecWizard) +END_MSG_MAP() + +// Message Handlers +protected: + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + +// Operations +public: + void AddExtraPages(); + +// INightSecSiteInfo +public: + STDMETHOD(get_Info)(/*[in]*/ NightSecSiteInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + +protected: + ExtraPageArray m_aPages; + bool m_bSiteSet; +}; + +typedef CComObjectMember CNormalWizard; + +#endif // !defined(AFX_NIGHTSECWIZARD_H__E7FC7C13_8F86_11D3_BFBC_0020182B97FC__INCLUDED_) diff --git a/Checklist/NormalPage.cpp b/Checklist/NormalPage.cpp new file mode 100644 index 0000000..de35ff2 --- /dev/null +++ b/Checklist/NormalPage.cpp @@ -0,0 +1,189 @@ +// NormalPage.cpp : implementation file +// + +#include "stdafx.h" +#include "NormalPage.h" +#include "ExtraPage.h" + +///////////////////////////////////////////////////////////////////////////// +// CNormalPage property page + + +CNormalPage::CNormalPage(CPropertySheet* pParent, UINT nPos) + : CPropertyPage(IDD), + m_nPos(nPos) +{ + ASSERT(pParent); // Have to have a valid parent + m_pParentSheet = pParent; // or we can't survive + SetHelp(true); +} + +CNormalPage::~CNormalPage() +{ + m_pParentSheet = NULL; +} + +///////////////////////////////////////////////////////////////////////////// +// CNormalPage message handlers + +LRESULT CNormalPage::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + m_ctlCheck.SubclassWindow(GetDlgItem(IDC_COMPONENTS)); + + int nIndex = 0; + + // Loop through and Add Components to Box + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + // Only show if enabled or Not a component that Hides in Normal Mode + if(!g_aComponents[nCnt]->GetInfoInt(nsHideNormal, FALSE) || g_aComponents[nCnt]->IsEnabled()) + { + // Add the Title + nIndex = m_ctlCheck.AddString(g_aComponents[nCnt]->GetName()); + + // Save a Pointer to the component in the Listbox Data + m_ctlCheck.SetItemDataPtr(nIndex, (void*)g_aComponents[nCnt]); + + // Check if Enabled + m_ctlCheck.SetCheck(nIndex, g_aComponents[nCnt]->IsEnabled()); + } + + } + + // Select first item and display help text + m_ctlCheck.SetCurSel(0); + SetTips(); + + // Set the Help ID for our Help File +// m_nIDHelp = 1; + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +////////////////////////////////////////////////////////////////// +// When the Finish Button on Wizard is pressed + +LRESULT CNormalPage::OnWizBack(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + // Save Pos and Enabled Status + SaveChanges(); + return 0; +} + +////////////////////////////////////////////////////////////////// +// Have to save our changes when focus changes cause +// OnWizardFinish doesn't get called for each sheet + +LRESULT CNormalPage::OnWizFinish(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + SaveChanges(); + return 0; +} + +////////////////////////////////////////////////////////////////// +// Have to save our changes when focus changes cause +// OnWizardFinish doesn't get called for each sheet + +LRESULT CNormalPage::OnWizNext(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + SaveChanges(); + return 0; +} + +LRESULT CNormalPage::OnHelp(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + WinHelp(NS_HELP_FILE, HELP_FINDER, 0); + return 1; +} + +////////////////////////////////////////////////////////////////// +// Make sure our buttons are properly enabled based on our +// position (passed in constructor) + +LRESULT CNormalPage::OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + DWORD dwButtons; + + // Depening on our Position in the Wizard + // Set the Buttons at the bottom on and off + + switch(m_nPos) + { + case WIZPAGE_FIRST: + dwButtons = PSWIZB_NEXT; + break; + case WIZPAGE_LAST: + dwButtons = PSWIZB_BACK | PSWIZB_FINISH; + break; + default: + dwButtons = PSWIZB_BACK | PSWIZB_NEXT; + break; + } + + m_pParentSheet->SetWizardButtons(dwButtons); + + return 0; +} + + +////////////////////////////////////////////////////////////////// +// Basically saves Position of component and Enabled Status + +HRESULT CNormalPage::SaveChanges() +{ + HRESULT hrRet = S_OK; + CComponentHolder* pComponent; + + // Loop though and save Pos and Enabled Status + for(int nCnt = 0; nCnt < m_ctlCheck.GetCount(); nCnt++) { + + // Get the Pointer from Listbox Data + pComponent = (CComponentHolder*)m_ctlCheck.GetItemDataPtr(nCnt); + + if(pComponent) + { + // Save to Component Data + pComponent->Enable(m_ctlCheck.GetCheck(nCnt) ? true : false); +// pComponent->SetPos((nCnt * 2) + m_nType - 1); // Need special calculations because we have a number of type sharing same position list + + } + else + + // Bummed out and don't know why + hrRet = E_UNEXPECTED; + + } + + return hrRet; + +} + +////////////////////////////////////////////////////////////////// +// Change Help text for each new component + +LRESULT CNormalPage::OnComponentsSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + SetTips(); + return 1; +} + +////////////////////////////////////////////////////////////////// +// Display Help Text + +void CNormalPage::SetTips() +{ + + // Get current selection + int nCurSel = m_ctlCheck.GetCurSel(); + + if(nCurSel == LB_ERR) + return; + + // Get current selection + CComponentHolder* pComponent = (CComponentHolder*)m_ctlCheck.GetItemDataPtr(nCurSel); + + if(pComponent) + SetDlgItemText(IDC_TIPS, pComponent->GetInfoStr(nsHelpText, _T("(No help available)"))); +} + diff --git a/Checklist/NormalPage.h b/Checklist/NormalPage.h new file mode 100644 index 0000000..bdcf41c --- /dev/null +++ b/Checklist/NormalPage.h @@ -0,0 +1,78 @@ +////////////////////////////////////////////////////////////////// +// +// NormalPage.h : header file +// +// Holds one Page for the Normal Wizard +// +// Uses the Type, IDD, and Position passed to constructor +// to behave correctly in Wizard +// +////////////////////////////////////////////////////////////////// + +#if !defined(AFX_NORMALPAGE_H__99170CE8_1A56_11D2_B2D4_0020182B97FC__INCLUDED_) +#define AFX_NORMALPAGE_H__99170CE8_1A56_11D2_B2D4_0020182B97FC__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "resource.h" +#include +#include +#include + +///////////////////////////////////////////////////////////////////////////// +// CNormalPage dialog + +class CNormalPage + : public CPropertyPage, + public CContextHelp +{ + +// Construction +public: + CNormalPage(CPropertySheet* pParent, UINT nPos = WIZPAGE_MIDDLE); + ~CNormalPage(); + + HRESULT SaveChanges(); + +// Dialog Data + enum { IDD = IDD_WIZ }; + CCheckListBox m_ctlCheck; + +BEGIN_MSG_MAP(CNormalPage) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + NOTIFY_CODE_HANDLER(PSN_SETACTIVE, OnSetActive) + NOTIFY_CODE_HANDLER(PSN_WIZFINISH, OnWizFinish) + NOTIFY_CODE_HANDLER(PSN_WIZBACK, OnWizBack) + NOTIFY_CODE_HANDLER(PSN_WIZNEXT, OnWizNext) + NOTIFY_CODE_HANDLER(PSN_HELP, OnHelp) + COMMAND_HANDLER(IDC_COMPONENTS, LBN_SELCHANGE, OnComponentsSelChange) + REFLECT_NOTIFICATIONS() + CHAIN_MSG_MAP(CContextHelp) +END_MSG_MAP() + +BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(IDC_COMPONENTS, 3002) +END_HELP_MAP + +// Messages +public: + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnComponentsSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnWizFinish(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnWizBack(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnWizNext(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnHelp(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + +// Implementation +protected: + // Set's the Help Text item + CPropertySheet* m_pParentSheet; + UINT m_nPos; + void SetTips(); + +}; + +#endif // !defined(AFX_NORMALPAGE_H__99170CE8_1A56_11D2_B2D4_0020182B97FC__INCLUDED_) diff --git a/Checklist/StdAfx.cpp b/Checklist/StdAfx.cpp new file mode 100644 index 0000000..a5eea17 --- /dev/null +++ b/Checklist/StdAfx.cpp @@ -0,0 +1,12 @@ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +#ifdef _ATL_STATIC_REGISTRY +#include +#include +#endif + +#include diff --git a/Checklist/StdAfx.h b/Checklist/StdAfx.h new file mode 100644 index 0000000..78beb2e --- /dev/null +++ b/Checklist/StdAfx.h @@ -0,0 +1,44 @@ +// 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__19178A38_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_) +#define AFX_STDAFX_H__19178A38_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define STRICT + +#define _ATL_APARTMENT_THREADED + +// Windows 95 Compatible +#undef WINVER +#define WINVER 0x0400 +#undef _WIN32_WINNT + +// Don't want our program dependant on some browser! +#undef _WIN32_IE +#define _WIN32_IE 0x0000 + +#include +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module + +#include "../common/types.h" +#include "checklistapp.h" + + +extern CChecklistApp _Module; +#include +#include + +#include "../common/componentarray.h" +extern CComponentArray g_aComponents; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__19178A38_7FDB_11D3_BF9E_0020182B97FC__INCLUDED) diff --git a/Checklist/dlldata.c b/Checklist/dlldata.c new file mode 100644 index 0000000..b323653 --- /dev/null +++ b/Checklist/dlldata.c @@ -0,0 +1,38 @@ +/********************************************************* + DllData file -- generated by MIDL compiler + + DO NOT ALTER THIS FILE + + This file is regenerated by MIDL on every IDL file compile. + + To completely reconstruct this file, delete it and rerun MIDL + on all the IDL files in this DLL, specifying this file for the + /dlldata command line option + +*********************************************************/ + +#define PROXY_DELEGATION + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_PROXY_FILE( Checklist ) + + +PROXYFILE_LIST_START +/* Start of list */ + REFERENCE_PROXY_FILE( Checklist ), +/* End of list */ +PROXYFILE_LIST_END + + +DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID ) + +#ifdef __cplusplus +} /*extern "C" */ +#endif + +/* end of generated dlldata file */ diff --git a/Checklist/res/Night Security Setup.ico b/Checklist/res/Night Security Setup.ico new file mode 100644 index 0000000..85cda5f Binary files /dev/null and b/Checklist/res/Night Security Setup.ico differ diff --git a/Checklist/res/Night Security Stub.ico b/Checklist/res/Night Security Stub.ico new file mode 100644 index 0000000..2b50f8a Binary files /dev/null and b/Checklist/res/Night Security Stub.ico differ diff --git a/Checklist/res/bitmap2.bmp b/Checklist/res/bitmap2.bmp new file mode 100644 index 0000000..8f39942 Binary files /dev/null and b/Checklist/res/bitmap2.bmp differ diff --git a/Checklist/res/ico00002.ico b/Checklist/res/ico00002.ico new file mode 100644 index 0000000..0faf9dc Binary files /dev/null and b/Checklist/res/ico00002.ico differ diff --git a/Checklist/res/ico00003.ico b/Checklist/res/ico00003.ico new file mode 100644 index 0000000..9e7944d Binary files /dev/null and b/Checklist/res/ico00003.ico differ diff --git a/Checklist/res/menu.bmp b/Checklist/res/menu.bmp new file mode 100644 index 0000000..1b53004 Binary files /dev/null and b/Checklist/res/menu.bmp differ diff --git a/Checklist/res/nightsec.bmp b/Checklist/res/nightsec.bmp new file mode 100644 index 0000000..43c8a08 Binary files /dev/null and b/Checklist/res/nightsec.bmp differ diff --git a/Checklist/res/shutdown.ico b/Checklist/res/shutdown.ico new file mode 100644 index 0000000..7c7a2d0 Binary files /dev/null and b/Checklist/res/shutdown.ico differ diff --git a/Checklist/resource.h b/Checklist/resource.h new file mode 100644 index 0000000..a1dab04 --- /dev/null +++ b/Checklist/resource.h @@ -0,0 +1,43 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Checklist.rc +// +#define IDS_PROJNAME 100 +#define IDR_Checklist 100 +#define IDP_REGISTER_FAILED 101 +#define IDR_MAINFRAME 128 +#define IDB_NORMAL 132 +#define IDI_SHUTDOWN 133 +#define IDI_NOTE 134 +#define IDI_ITEMS 135 +#define IDD_FIRSTPAGE 136 +#define IDD_WIZEXTRA 141 +#define IDD_WIZ 143 +#define IDD_LASTPAGE 145 +#define IDB_MENU 146 +#define IDB_ADVOPTIONS 148 +#define IDD_ADVWIZDOS 148 +#define IDD_ADVWIZWIN 149 +#define IDD_ADVWIZWIN1 150 +#define IDD_ADVWIZDOS1 151 +#define IDB_CHECKLISTBOX 201 +#define IDC_PAGETABS 202 +#define IDB_ADVANCED 207 +#define IDC_SHUTDOWN 1005 +#define IDC_COMPONENTS 1011 +#define IDC_ADVANCED 1015 +#define IDC_TIPS 1016 +#define IDC_HEADERTEXT 1018 +#define IDC_PROPHOLDER 1019 +#define ID_STATIC 65535 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 202 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 204 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/CmdLine/CmdLine.cpp b/CmdLine/CmdLine.cpp new file mode 100644 index 0000000..d23d34a --- /dev/null +++ b/CmdLine/CmdLine.cpp @@ -0,0 +1,115 @@ +// CmdLine.cpp : Implementation of WinMain + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f CmdLineps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include +#include "CmdLine.h" + +#include "CmdLine_i.c" +#include "../common/Interfaces.cpp" +//#include "../common/NightSec_i.c" + +CCmdLineApp _Module; + +/*BEGIN_OBJECT_MAP(ObjectMap) +END_OBJECT_MAP() +*/ +const DWORD dwPause = 1000; // time to wait for threads to finish up + +LPCTSTR FindOneOf(LPCTSTR p1, LPCTSTR p2) +{ + while (p1 != NULL && *p1 != NULL) + { + LPCTSTR p = p2; + while (p != NULL && *p != NULL) + { + if (*p1 == *p) + return CharNext(p1); + p = CharNext(p); + } + p1 = CharNext(p1); + } + return NULL; +} + +///////////////////////////////////////////////////////////////////////////// +// +extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, + HINSTANCE /*hPrevInstance*/, LPTSTR lpCmdLine, int /*nShowCmd*/) +{ + lpCmdLine = GetCommandLine(); //this line necessary for _ATL_MIN_CRT + +#if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED) + HRESULT hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED); +#else + HRESULT hRes = CoInitialize(NULL); +#endif + _ASSERTE(SUCCEEDED(hRes)); + _Module.Init(NULL/*ObjectMap*/, hInstance, &LIBID_CMDLINELib); +// _Module.dwThreadID = GetCurrentThreadId(); + TCHAR szTokens[] = _T("-/"); + + int nRet = 0; + BOOL bRun = TRUE; + LPCTSTR lpszToken = FindOneOf(lpCmdLine, szTokens); + while (lpszToken != NULL) + { + if (lstrcmpi(lpszToken, _T("UnregServer"))==0) + { +// _Module.UpdateRegistryFromResource(IDR_CmdLine, FALSE); +// nRet = _Module.UnregisterServer(TRUE); + bRun = FALSE; + break; + } + if (lstrcmpi(lpszToken, _T("RegServer"))==0) + { + _Module.RegisterDlls(); + +// _Module.UpdateRegistryFromResource(IDR_CmdLine, TRUE); +// nRet = _Module.RegisterServer(TRUE); + bRun = FALSE; + break; + } + lpszToken = FindOneOf(lpszToken, szTokens); + } + + if (bRun) + { +// _Module.StartMonitor(); +#if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED) +// hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, +// REGCLS_MULTIPLEUSE | REGCLS_SUSPENDED); +// _ASSERTE(SUCCEEDED(hRes)); +// hRes = CoResumeClassObjects(); +#else +// hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, +// REGCLS_MULTIPLEUSE); +#endif +// _ASSERTE(SUCCEEDED(hRes)); + + if(_Module.InitInstance()) + { + + MSG msg; + while (GetMessage(&msg, 0, 0, 0)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + +// _Module.RevokeClassObjects(); +// Sleep(dwPause); //wait for any threads to finish + } + + _Module.ExitInstance(); + } + + _Module.Term(); + CoUninitialize(); + return nRet; +} diff --git a/CmdLine/CmdLine.dsp b/CmdLine/CmdLine.dsp new file mode 100644 index 0000000..a1b2d21 --- /dev/null +++ b/CmdLine/CmdLine.dsp @@ -0,0 +1,361 @@ +# Microsoft Developer Studio Project File - Name="CmdLine" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=CmdLine - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "CmdLine.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "CmdLine.mak" CFG="CmdLine - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "CmdLine - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "CmdLine - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE "CmdLine - Win32 Release MinSize" (based on "Win32 (x86) Application") +!MESSAGE "CmdLine - Win32 Release MinDependency" (based on "Win32 (x86) Application") +!MESSAGE "CmdLine - Win32 Unicode Release MinSize" (based on "Win32 (x86) Application") +!MESSAGE "CmdLine - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "CmdLine - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../Debug/CmdLine.exe" /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\Debug +TargetPath=\Projects\NightSec\Debug\CmdLine.exe +InputPath=\Projects\NightSec\Debug\CmdLine.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + +# End Custom Build + +!ELSEIF "$(CFG)" == "CmdLine - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"../Debug/CmdLine.exe" /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\DebugU +TargetPath=\Projects\NightSec\Debug\CmdLine.exe +InputPath=\Projects\NightSec\Debug\CmdLine.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + goto end + :NOTNT + echo Warning : Cannot register Unicode EXE on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "CmdLine - Win32 Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinSize" +# PROP BASE Intermediate_Dir "ReleaseMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinSize" +# PROP Intermediate_Dir "ReleaseMinSize" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_DLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"../Release/CmdLine.exe" /OPT:NOWIN98 +# SUBTRACT LINK32 /pdb:none +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinSize +TargetPath=\Projects\NightSec\Release\CmdLine.exe +InputPath=\Projects\NightSec\Release\CmdLine.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + +# End Custom Build + +!ELSEIF "$(CFG)" == "CmdLine - Win32 Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinDependency" +# PROP BASE Intermediate_Dir "ReleaseMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinDependency" +# PROP Intermediate_Dir "ReleaseMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_STATIC_REGISTRY" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinDependency +TargetPath=.\ReleaseMinDependency\CmdLine.exe +InputPath=.\ReleaseMinDependency\CmdLine.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + +# End Custom Build + +!ELSEIF "$(CFG)" == "CmdLine - Win32 Unicode Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinSize" +# PROP BASE Intermediate_Dir "ReleaseUMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinSize" +# PROP Intermediate_Dir "ReleaseUMinSize" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"../Release/CmdLine.exe" +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinSize +TargetPath=\Projects\NightSec\Release\CmdLine.exe +InputPath=\Projects\NightSec\Release\CmdLine.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + goto end + :NOTNT + echo Warning : Cannot register Unicode EXE on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "CmdLine - Win32 Unicode Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinDependency" +# PROP BASE Intermediate_Dir "ReleaseUMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinDependency" +# PROP Intermediate_Dir "ReleaseUMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\CmdLine.exe +InputPath=.\ReleaseUMinDependency\CmdLine.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + goto end + :NOTNT + echo Warning : Cannot register Unicode EXE on Windows 95 + :end + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "CmdLine - Win32 Debug" +# Name "CmdLine - Win32 Unicode Debug" +# Name "CmdLine - Win32 Release MinSize" +# Name "CmdLine - Win32 Release MinDependency" +# Name "CmdLine - Win32 Unicode Release MinSize" +# Name "CmdLine - Win32 Unicode Release MinDependency" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\Include\src\appmisc.cpp +# End Source File +# Begin Source File + +SOURCE=.\CmdLine.cpp +# End Source File +# Begin Source File + +SOURCE=.\CmdLine.rc +# End Source File +# Begin Source File + +SOURCE=.\CmdLineApp.cpp +# End Source File +# Begin Source File + +SOURCE=.\CmdLineDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\ComponentArray.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\ComponentData.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\ComponentHolder.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\NightSecApp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\Include\src\path.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\Include\src\RegSvr.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\CmdLineApp.h +# End Source File +# Begin Source File + +SOURCE=.\CmdLineDlg.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=".\res\Night Security Stub.ico" +# End Source File +# End Group +# End Target +# End Project diff --git a/CmdLine/CmdLine.h b/CmdLine/CmdLine.h new file mode 100644 index 0000000..b8e5971 --- /dev/null +++ b/CmdLine/CmdLine.h @@ -0,0 +1,57 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Wed Nov 03 12:24:06 1999 + */ +/* Compiler settings for E:\Projects\NightSec\CmdLine\CmdLine.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __CmdLine_h__ +#define __CmdLine_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + + +#ifndef __CMDLINELib_LIBRARY_DEFINED__ +#define __CMDLINELib_LIBRARY_DEFINED__ + +/* library CMDLINELib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_CMDLINELib; +#endif /* __CMDLINELib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/CmdLine/CmdLine.idl b/CmdLine/CmdLine.idl new file mode 100644 index 0000000..3840ebf --- /dev/null +++ b/CmdLine/CmdLine.idl @@ -0,0 +1,20 @@ +// CmdLine.idl : IDL source for CmdLine.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (CmdLine.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + +[ + uuid(E9C249C6-9196-11D3-BFBF-0020182B97FC), + version(1.0), + helpstring("CmdLine 1.0 Type Library") +] +library CMDLINELib +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + +}; diff --git a/CmdLine/CmdLine.rc b/CmdLine/CmdLine.rc new file mode 100644 index 0000000..5a612a1 --- /dev/null +++ b/CmdLine/CmdLine.rc @@ -0,0 +1,170 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.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 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 2,5,0,1 + PRODUCTVERSION 2,5,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Part of the Night Security Program\0" + VALUE "CompanyName", "The Family (Thailand)\0" + VALUE "FileDescription", "Night Security (Command Line Module)\0" + VALUE "FileVersion", "2, 5, 0, 1\0" + VALUE "InternalName", "Night Security CmdLine\0" + VALUE "LegalCopyright", "Copyright (C) 1998 - 1999, The Family (Thailand)\0" + VALUE "LegalTrademarks", "\0" + VALUE "OLESelfRegister", "\0" + VALUE "OriginalFilename", "nightsec.exe\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "Night Security 2.1\0" + VALUE "ProductVersion", "2, 5, 0, 1\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "res\\Night Security Stub.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CMDLINE_DLG DIALOGEX 0, 0, 224, 135 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "Night Security Command Line" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Close",IDCANCEL,167,114,50,14 + ICON IDR_MAINFRAME,IDC_STATIC,8,3,20,20 + LTEXT "You can run Night Security with the following command line parameters. (eg: cmdline -r)", + IDC_STATIC,38,4,181,18 + LTEXT "",IDC_PARAMETERS,7,31,210,76 + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,27,210,1 + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,110,210,1 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_CMDLINE_DLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 217 + TOPMARGIN, 7 + BOTTOMMARGIN, 128 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "CmdLine" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/CmdLine/CmdLine.rgs b/CmdLine/CmdLine.rgs new file mode 100644 index 0000000..d30f527 --- /dev/null +++ b/CmdLine/CmdLine.rgs @@ -0,0 +1,11 @@ +HKCR +{ + NoRemove AppID + { + {E9C249C7-9196-11D3-BFBF-0020182B97FC} = s 'CmdLine' + 'CmdLine.EXE' + { + val AppID = s {E9C249C7-9196-11D3-BFBF-0020182B97FC} + } + } +} diff --git a/CmdLine/CmdLineApp.cpp b/CmdLine/CmdLineApp.cpp new file mode 100644 index 0000000..ff2b3ad --- /dev/null +++ b/CmdLine/CmdLineApp.cpp @@ -0,0 +1,104 @@ +// CmdLineApp.cpp: implementation of the CCmdLineApp class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "CmdLineApp.h" +#include "CmdLineDlg.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CCmdLineApp::CCmdLineApp() + : CNightSecApp(_T("Secure Shutdown")) +{ } + +CCmdLineApp::~CCmdLineApp() +{ } + +bool CCmdLineApp::InitInstance() +{ + if(!CNightSecApp::InitInstance()) + return false; + + // Get Parameters + bool bParams = false; + bool bShowHelp = true; + LPSTR szChar; + int nIndex = -1; + + // Loop through command line arguments + for (int i = 1; i < __argc; i++) + { + szChar = __targv[i]; + _tcslwr(szChar); + + // Check if it's a param + // Note we can use - as a param because we don't + // accept file names (otherwise - can be in file name) + if (szChar[0] == '/' || szChar[0] == '-') + { + // Accepts multiple arguments in one param + // eg: -rti + + // First skip over first token then go through + // other chars one by one + + for(szChar++; szChar[0] != '\0'; szChar++) + { + // Check if we have a match + if((nIndex = FindParam(szChar[0])) > -1) + { + + // If so then call it + g_aComponents[nIndex]->DoShutdown(NULL); + + // Set flag so we don't show dialog later on + bShowHelp = false; + + } + + } + } + + } + + // Return if no dialog + if(!bShowHelp) + return false; + + // Otherwise... + CCmdLineDlg dlg; + dlg.DoModal(); + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return false; +} + +////////////////////////////////////////////////////////////////// +// Checks Component Array for any components with Param passed + +UINT CCmdLineApp::FindParam(TCHAR chParam) +{ + string sTemp; + + // Loop through'm all + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + // Only Windows Components can be called from cmd line + if(g_aComponents[nCnt]->GetType() == COMPONENT_WIN) + { + // Check for match + sTemp = g_aComponents[nCnt]->GetInfoStr(nsCmdLine, _T("")); + sTemp.make_lower(); + + if(!sTemp.empty() && sTemp[0] == chParam) + return nCnt; + } + } + + return -1; + +} diff --git a/CmdLine/CmdLineApp.h b/CmdLine/CmdLineApp.h new file mode 100644 index 0000000..f0700d2 --- /dev/null +++ b/CmdLine/CmdLineApp.h @@ -0,0 +1,26 @@ +// CmdLineApp.h: interface for the CCmdLineApp class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_CmdLineApp_H__19178A46_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_) +#define AFX_CmdLineApp_H__19178A46_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "..\common\NightSecApp.h" + +class CCmdLineApp : public CNightSecApp +{ +public: + CCmdLineApp(); + virtual ~CCmdLineApp(); + + virtual bool InitInstance(); + +protected: + UINT FindParam(TCHAR chParam); +}; + +#endif // !defined(AFX_CmdLineApp_H__19178A46_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_) diff --git a/CmdLine/CmdLineDlg.cpp b/CmdLine/CmdLineDlg.cpp new file mode 100644 index 0000000..443d54b --- /dev/null +++ b/CmdLine/CmdLineDlg.cpp @@ -0,0 +1,58 @@ +// Night Security StubDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "CmdLineDlg.h" + +///////////////////////////////////////////////////////////////////////////// +// CCmdLineDlg dialog + +CCmdLineDlg::CCmdLineDlg() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// CCmdLineDlg message handlers + +LRESULT CCmdLineDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Need app pointer to access components + string sHelpText; + string sTemp; + + // Loop through'm + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + + // Is it a Windows Component? + if(g_aComponents[nCnt]->GetType() == COMPONENT_WIN) + { + + // Get CmdLine + sTemp = g_aComponents[nCnt]->GetInfoStr(nsCmdLine, _T("")); + + // If component returns null then can't be called from + // command line + if(!sTemp.empty()) + { + + // Now add it to the complete string + sHelpText += _T(" -") + sTemp + _T("\t"); + + // Add Component Name + sHelpText += g_aComponents[nCnt]->GetName() + _T("\r\n"); + + } + + } + + } + + // Put the text in Dialog + SetDlgItemText(IDC_PARAMETERS, sHelpText); + + bHandled = FALSE; // Let CSimpleDialog also have a shot + return TRUE; // return TRUE unless you set the focus to a control +} + + diff --git a/CmdLine/CmdLineDlg.h b/CmdLine/CmdLineDlg.h new file mode 100644 index 0000000..8a214f9 --- /dev/null +++ b/CmdLine/CmdLineDlg.h @@ -0,0 +1,39 @@ +// Night Security StubDlg.h : header file +// + +#if !defined(AFX_CmdLineDLG_H__ADB16FC8_1B31_11D2_B2D4_0020182B97FC__INCLUDED_) +#define AFX_CmdLineDLG_H__ADB16FC8_1B31_11D2_B2D4_0020182B97FC__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include +#include "resource.h" +typedef CSimpleDialog CmdLineDlg; + +///////////////////////////////////////////////////////////////////////////// +// CCmdLineDlg dialog + +class CCmdLineDlg + : public CmdLineDlg +{ +// Construction +public: + CCmdLineDlg(); // standard constructor + +// Dialog Data + +BEGIN_MSG_MAP(CNormalPage) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + CHAIN_MSG_MAP(CmdLineDlg) +END_MSG_MAP() + + // Generated message map functions + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CmdLineDLG_H__ADB16FC8_1B31_11D2_B2D4_0020182B97FC__INCLUDED_) diff --git a/CmdLine/CmdLineps.def b/CmdLine/CmdLineps.def new file mode 100644 index 0000000..43cf6f4 --- /dev/null +++ b/CmdLine/CmdLineps.def @@ -0,0 +1,11 @@ + +LIBRARY "CmdLinePS" + +DESCRIPTION 'Proxy/Stub DLL' + +EXPORTS + DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + GetProxyDllInfo @3 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE diff --git a/CmdLine/CmdLineps.mk b/CmdLine/CmdLineps.mk new file mode 100644 index 0000000..4ac65de --- /dev/null +++ b/CmdLine/CmdLineps.mk @@ -0,0 +1,16 @@ + +CmdLineps.dll: dlldata.obj CmdLine_p.obj CmdLine_i.obj + link /dll /out:CmdLineps.dll /def:CmdLineps.def /entry:DllMain dlldata.obj CmdLine_p.obj CmdLine_i.obj \ + kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \ + +.c.obj: + cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \ + $< + +clean: + @del CmdLineps.dll + @del CmdLineps.lib + @del CmdLineps.exp + @del dlldata.obj + @del CmdLine_p.obj + @del CmdLine_i.obj diff --git a/CmdLine/StdAfx.cpp b/CmdLine/StdAfx.cpp new file mode 100644 index 0000000..a5eea17 --- /dev/null +++ b/CmdLine/StdAfx.cpp @@ -0,0 +1,12 @@ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +#ifdef _ATL_STATIC_REGISTRY +#include +#include +#endif + +#include diff --git a/CmdLine/StdAfx.h b/CmdLine/StdAfx.h new file mode 100644 index 0000000..b806d84 --- /dev/null +++ b/CmdLine/StdAfx.h @@ -0,0 +1,41 @@ +// 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__E9C249C9_9196_11D3_BFBF_0020182B97FC__INCLUDED_) +#define AFX_STDAFX_H__E9C249C9_9196_11D3_BFBF_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define STRICT + +// Windows 95 Compatible +#undef WINVER +#define WINVER 0x0400 +#undef _WIN32_WINNT + +// Don't want our program dependant on some browser! +#undef _WIN32_IE +#define _WIN32_IE 0x0000 + +#define _ATL_APARTMENT_THREADED + +#include +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +#include "cmdlineapp.h" + +extern CCmdLineApp _Module; +#include + +#include "../common/componentarray.h" +extern CComponentArray g_aComponents; + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__E9C249C9_9196_11D3_BFBF_0020182B97FC__INCLUDED) diff --git a/CmdLine/res/Night Security Stub.ico b/CmdLine/res/Night Security Stub.ico new file mode 100644 index 0000000..2b50f8a Binary files /dev/null and b/CmdLine/res/Night Security Stub.ico differ diff --git a/CmdLine/resource.h b/CmdLine/resource.h new file mode 100644 index 0000000..10c2feb --- /dev/null +++ b/CmdLine/resource.h @@ -0,0 +1,20 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by CmdLine.rc +// +#define IDS_PROJNAME 100 +#define IDR_CmdLine 100 +#define IDD_CMDLINE_DLG 102 +#define IDR_MAINFRAME 128 +#define IDC_PARAMETERS 1003 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 201 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 201 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/Common/CmptData.cpp b/Common/CmptData.cpp new file mode 100644 index 0000000..2fd8878 --- /dev/null +++ b/Common/CmptData.cpp @@ -0,0 +1,200 @@ +// ShutdownData.cpp: implementation of the CPropertyBagImpl class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "CmptData.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CPropertyBag::CPropertyBag() +{ + m_pBag = NULL; +} + +CPropertyBag::~CPropertyBag() +{ + m_pBag = NULL; +} + +HRESULT CPropertyBag::Initialize(IUnknown * pUnk) +{ + if(pUnk == NULL) + { + if(m_pBag != NULL) + { + m_pBag->Release(); + m_pBag = NULL; + return S_OK; + } + else + return E_UNEXPECTED; + } + + HRESULT hr; + + hr = pUnk->QueryInterface(IID_IPropertyBag, (void**) &m_pBag); + + if(FAILED(hr)) + m_pBag = NULL; + + return hr; + +} + +HRESULT CPropertyBag::Initialize(int cUnks, IUnknown** ppUnks) +{ + HRESULT hr = S_FALSE; + + for (UINT i = 0; i < cUnks; i++) + { + hr = Initialize(ppUnks[i]); + + if(SUCCEEDED(hr)) + return hr; + } + + return hr; +} + +int CPropertyBag::GetInt(const string& sKeyName, int nDefault) const +{ + if(m_pBag == NULL) + return nDefault; + + CComVariant var; + + if(SUCCEEDED(m_pBag->Read(CComBSTR(sKeyName), &var, NULL))) + { + if(var.vt == VT_I4) + { + return var.lVal; + } + else + return nDefault; + } + else + { + return nDefault; + } +} + +string CPropertyBag::GetString(const string& sKeyName, const string& sDefault) const +{ + USES_CONVERSION; + + if(m_pBag == NULL) + return sDefault; + + CComVariant var; + string sRet; + + if(SUCCEEDED(m_pBag->Read(CComBSTR(sKeyName), &var, NULL))) + { + if(var.vt == VT_BSTR) + { + sRet = OLE2T(var.bstrVal); + return sRet; + } + else + return sDefault; + } + else { + return sDefault; + } + + +} + +HRESULT CPropertyBag::WriteInt(const string& sKeyName, int nValue) +{ + if(m_pBag == NULL) + return E_POINTER; + + CComVariant var; + + var.vt = VT_I4; + var.lVal = nValue; + + return m_pBag->Write(CComBSTR(sKeyName), &var); + +} + +HRESULT CPropertyBag::WriteString(const string& sKeyName, const string& sValue) +{ + if(m_pBag == NULL) + return E_POINTER; + + CComVariant var; + CComBSTR bsVal(sValue); + + var.vt = VT_BSTR; + var.bstrVal = bsVal; + + return m_pBag->Write(CComBSTR(sKeyName), &var); +} + + +HRESULT CPropertyBag::DeleteProperty(const string& sKeyName) +{ + if(m_pBag == NULL) + return E_POINTER; + + CComVariant var; + + var.Clear(); + + return m_pBag->Write(CComBSTR(sKeyName), &var); +} + +UINT CPropertyBag::GetStringSet(const string& sFormat, string_array& asData) const +{ + UINT nCnt = 0; + string sVal; + string sKeyName; + + // Format Key Name + sKeyName.format(sFormat, nCnt++); + + // Add URLs to List Box + while((sVal = GetString(sKeyName, NS_NO_KEY)) != NS_NO_KEY) + { + asData.push_back(sVal); + + // Format Key Name + sKeyName.format(sFormat, nCnt++); + } + + return --nCnt; +} + +UINT CPropertyBag::WriteStringSet(const string& sFormat, const string_array& asData) +{ + UINT nCnt = 0; // Number of URLs from Registry + string sKeyName; + + string_array::const_iterator iter = asData.begin(); + for(; iter != asData.end(); iter++) + { + sKeyName.format(sFormat, nCnt++); + WriteString(sKeyName, *iter); + } + + UINT nRet = nCnt - 1; + sKeyName.format(sFormat, nCnt++); + CComVariant var; + + while(SUCCEEDED(m_pBag->Read(CComBSTR(sKeyName), &var, NULL)) && + var.vt != VT_EMPTY && var.vt != VT_NULL) + { + // Format Registry Key + DeleteProperty(sKeyName); + sKeyName.format(sFormat, nCnt++); + var.Clear(); + } + + return nRet; + +} diff --git a/Common/CmptData.h b/Common/CmptData.h new file mode 100644 index 0000000..985de2d --- /dev/null +++ b/Common/CmptData.h @@ -0,0 +1,49 @@ +// ShutdownData.h: interface for the CShutdownData class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(PROPERTYBAGIMPL_H__6CC5C4C0_1F0A_11D2_B2D4_0020182B97FC__INCLUDED_) +#define PROPERTYBAGIMPL_H__6CC5C4C0_1F0A_11D2_B2D4_0020182B97FC__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#define NS_NO_KEY _T("No Key") +#define NS_BACKUP_REG_SOURCE _T("Source%.4d") +#define NS_BACKUP_REG_DEST _T("Destination") +#define NS_BACKUP_REG_ENGINE _T("Engine") +#define NS_IGNORE_REG_EXT _T("Ignore%.4d") +#define NS_ENCRYPT_REG_FILES _T("Path%.4d") +#define NS_ENCRYPT_REG_DISABLE _T("Disable") +#define NS_ENCRYPT_REG_READONLY _T("ReadOnly") + +class CPropertyBag +{ + +public: + CPropertyBag(); + virtual ~CPropertyBag(); + + HRESULT DeleteProperty(const string& sKeyName); + HRESULT WriteString(const string& sKeyName, const string& sValue); + HRESULT WriteInt(const string& sKeyName, int nValue); + string GetString(const string& sKeyName, const string& sDefault) const; + int GetInt(const string& sKeyName, int nDefault) const; + + // Chooses the first IPropertyBag it finds + HRESULT Initialize(int cUnks, IUnknown** ppUnks); + HRESULT Initialize(IUnknown* pUnk); + + bool IsInitialized() + { return m_pBag != NULL; }; + + UINT GetStringSet(const string& sFormat, string_array& asData) const; + UINT WriteStringSet(const string& sFormat, const string_array& asData); + +// Data +protected: + IPropertyBag* m_pBag; +}; + +#endif // !defined(AFX_PROPERTYBAGIMPL_H__6CC5C4C0_1F0A_11D2_B2D4_0020182B97FC__INCLUDED_) diff --git a/Common/ComponentArray.cpp b/Common/ComponentArray.cpp new file mode 100644 index 0000000..7bab44c --- /dev/null +++ b/Common/ComponentArray.cpp @@ -0,0 +1,281 @@ +// ComponentArray.cpp: implementation of the CComponentArray class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "ComponentArray.h" +#include "defines.h" + +#include +using std::find; + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CComponentArray::CComponentArray() { } + +CComponentArray::~CComponentArray() +{ + UnloadComponents(); +} + +////////////////////////////////////////////////////////////////// +// LoadComponents from Registry (Public Function) +// +// returns number of components. + +UINT CComponentArray::LoadComponents() +{ + // Can only load if empty + ASSERT(empty()); + + // Make sure List of Installed Components is Loaded + LoadInstalledComponents(); + + + // Open Key + CRegKey regKey; + if(regKey.Create(HKEY_CURRENT_USER, NS_REG_COMPONENTS) + != ERROR_SUCCESS) + + return 0; + + // Enumerate Subkeys which should contain Component ID's (GetIDFromKey) + DWORD dwCnt = 0; + DWORD dwLoadedCnt = 0; + string sKeyName; + while(!RegEnumKey(regKey.m_hKey, dwCnt, sKeyName.get_buffer(MAX_PATH), MAX_PATH)) + { + sKeyName.release_buffer(); + + dwCnt++; + + // Add the Component + if(SUCCEEDED(AddComponent(sKeyName))) + dwLoadedCnt++; // Increment Return Value + } + + // Check if there's anymore that are Installed + // But the user didn't have previously loaded (CheckOffInstalledComponent) + while(!m_asInstalledComponents.empty()) + { + // Add the Component + if(SUCCEEDED(AddComponent(m_asInstalledComponents[0]))) + dwLoadedCnt++; + } + + // Remove All NULL Spaces in array as we put each component + // at location requested by registry + iterator iter = begin(); + for(int nCnt = 0; nCnt < size(); nCnt++) + { + while((*this)[nCnt] == NULL) + erase(begin() + nCnt); + } + + if(empty()) + return 0; + + // Move DOS Components to End of Array + CComponentHolder* pComponent = NULL; + CComponentHolder* pLastComp = at(size() - 1); + for(nCnt = 0; nCnt < size() && pComponent != pLastComp; nCnt++) + { + pComponent = at(nCnt); + + if(pComponent->GetType() == COMPONENT_DOS) + { + erase(begin() + nCnt); + push_back(pComponent); + } + } + + // Return Number of Components + return (UINT)dwLoadedCnt; +} + +////////////////////////////////////////////////////////////////// +// Loads the component into memory and adds it to array at +// location requested. + +HRESULT CComponentArray::AddComponent(const string& sKeyName) +{ + CComponentHolder* pComponent; + HRESULT hr; + + + // Get the Component ID from a Registry KeyName + // eg: 'NightSecurity.ClearInetCache' would come from 'NightSecurity.ClearInetCache 2' + string sID = GetIDFromKey(sKeyName); + + + // Load and Initialize Component + pComponent = new CComponentHolder; + hr = pComponent->Initialize(sID, NS_REG_COMPONENTS + (_T("\\") + sKeyName)); + + + // If Failed then return NULL + if(SUCCEEDED(hr)) + { + + // Get the Component's Position + int nPos = pComponent->GetPos(); + + + // Add at nPos + // If nPos is already used insert before + if(nPos < size()) + { + + if(at(nPos) == NULL) + at(nPos) = pComponent; + else + insert(begin() + nPos, pComponent); + + } + else + { + resize(nPos + 1, NULL); + at(nPos) = pComponent; + } + + + } + + // Check it off from Installed List + CheckOffInstalledComponent(sID); + + + return hr; +} + + +///////////////////////////////////////////////////////// +// LoadInstalledComponents : Loads list of installed +// components for access later on +// +UINT CComponentArray::LoadInstalledComponents() +{ + + // Open Key + CRegKey regKey; + if(regKey.Create(HKEY_LOCAL_MACHINE, NS_REG_INSTALLEDCOMPONENTS) + != ERROR_SUCCESS) + + return 0; + + + + // Enumerate Subkeys which should be the IDs of Components + DWORD dwCnt = 0; + string sKeyName; + while(!RegEnumKey(regKey.m_hKey, dwCnt, sKeyName.get_buffer(MAX_PATH), MAX_PATH)) + { + + sKeyName.release_buffer(); + + // Add to List + m_asInstalledComponents.push_back(sKeyName); + + dwCnt++; + } + + + // Return Number of Components + return (UINT)dwCnt; + +} + +////////////////////////////////////////////////////////////////// +// Checks off the component from the Installed Components list +// Loaded with Installed Components + +bool CComponentArray::CheckOffInstalledComponent(const string& sID) +{ + int nFound = -1; + + string_array::iterator iter; + iter = find(m_asInstalledComponents.begin(), + m_asInstalledComponents.end(), sID); + + // If we found one then remove it + // Have to remove it outside of loop or we mess up the + // Array Index + if(iter != m_asInstalledComponents.end()) + { + m_asInstalledComponents.erase(iter); + return true; + } + + // Couldn't Find + return false; +} + + +////////////////////////////////////////////////////////////////// +// Remove the components from memory + +UINT CComponentArray::UnloadComponents() +{ + int nCnt = 0; + + while(!empty()) + { + nCnt++; + + // First let it do it's Clean Up + at(0)->Release(); + // Then Delete it + delete at(0); + // Then Remove it from Array + erase(begin()); + } + + // Return Number of Components + return nCnt; +} + + +////////////////////////////////////////////////////////////////// +// Takes a Component registry key and extracts the Program ID +// ID should come before space in Key +// eg: 'NightSecurity.ClearInetCache' would come from 'NightSecurity.ClearInetCache 2' + +string CComponentArray::GetIDFromKey(const string& sKeyName) +{ + // ID should come before space in Key + // eg: 'NightSecurity.ClearInetCache' would come from 'NightSecurity.ClearInetCache 2' + + string::size_type pos = sKeyName.find(_T(' ')); + + // return first part + // find return string::npos if fails (which also means end of string) + return sKeyName.substr(0, pos); + +} + + +////////////////////////////////////////////////////////////////// +// Saves each components data to the Registry + +HRESULT CComponentArray::SaveComponentData() +{ + HRESULT hrRet = S_OK; + + // Ask Each Component to Save it's own Data + iterator iter = begin(); + for(; iter != end(); iter++) + { + + // CComponentHolder checks to make sure that the + // Components are loaded, so we don't have to + // include error checking here. + HRESULT hr = (*iter)->GetData()->Save(); + if(FAILED(hr)) + hrRet = hr; + + } + + return hrRet; +} diff --git a/Common/ComponentArray.h b/Common/ComponentArray.h new file mode 100644 index 0000000..892faae --- /dev/null +++ b/Common/ComponentArray.h @@ -0,0 +1,80 @@ +////////////////////////////////////////////////////////////////// +// +// ComponentArray.h: interface for the CComponentArray class. +// +// Class that holds all the components for the application +// Need to call LoadComponents before you can use them +// +// Derived from a vector so you can access the components each +// as it's own CComponentHolder, but takes care of the Loading +// and Unloading itself. +// +// 'Installed Components' are components that haven't been used +// yet by a user, but have been installed on the system. +// The Loading code first loops through all the user's components +// and then sees if it's missing anything that's installed but +// hasn't been used yet. +// +// The reason for a distiction between a Program ID and a Registry +// Key is to support multiple instances of components in the future +// if needed. Each component would be inited from it's own Key. The +// keys could also be used as Stream ID's in a OLE Storage etc... +// +////////////////////////////////////////////////////////////////////// + +#if !defined(COMPONENTARRAY_H__ADB16FE6_1B31_11D2_B2D4_0020182B97FC__INCLUDED_) +#define COMPONENTARRAY_H__ADB16FE6_1B31_11D2_B2D4_0020182B97FC__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "..\Common\ComponentHolder.h" + +#include +#include +using std::vector; + +// An Array of CComponentHolder's with inbuilt Loading and Unloading + +typedef vector ArrayComponents; +typedef vector string_array; +class CComponentArray + : public ArrayComponents +{ +public: + CComponentArray(); + virtual ~CComponentArray(); + +public: + + // Load Components from Registry + UINT LoadComponents(); + + // Remove Components from Memory + UINT UnloadComponents(); + + // Save Comoponents Data to Registry + HRESULT SaveComponentData(); + +protected: + + ///////////////////////////////////////////////////////// + // List of All Installed Components + // Used to Compare with User's Current Components + string_array m_asInstalledComponents; + + // Load List of All Installed Components + UINT LoadInstalledComponents(); + + // Called when Loading a Component + bool CheckOffInstalledComponent(const string& sID); + HRESULT AddComponent(const string& sID); + + // Gets the Component ID from a Registry KeyName + // eg: 'NightSecurity.ClearInetCache' would come from 'NightSecurity.ClearInetCache 2' + string GetIDFromKey(const string& sKeyName); + +}; + +#endif // !defined(COMPONENTARRAY_H__ADB16FE6_1B31_11D2_B2D4_0020182B97FC__INCLUDED_) diff --git a/Common/ComponentData.cpp b/Common/ComponentData.cpp new file mode 100644 index 0000000..5b4d75d --- /dev/null +++ b/Common/ComponentData.cpp @@ -0,0 +1,407 @@ +// ComponentData.cpp : implementation file +// + +#include "stdafx.h" +#include "ComponentData.h" +#include "types.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#ifdef _DEBUG + +void DumpVariant(VARIANT& var) +{ + USES_CONVERSION; + + switch(var.vt) + { + case VT_NULL: + ATLTRACE(_T("VT_NULL")); + break; + case VT_EMPTY: + ATLTRACE(_T("VT_EMPTY")); + break; + case VT_UI1: + ATLTRACE(_T("VT_UI1: ")); + ATLTRACE(_T("%u"), (int)var.bVal); + break; + case VT_I2: + ATLTRACE(_T("VT_I2: ")); + ATLTRACE(_T("%d"), (int)var.bVal); + break; + case VT_I4: + ATLTRACE(_T("VT_I4: ")); + ATLTRACE(_T("%d"), (int)var.bVal); + break; + case VT_R4: + ATLTRACE(_T("VT_R4: ")); + ATLTRACE(_T("%f"), (double)var.bVal); + break; + case VT_R8: + ATLTRACE(_T("VT_R8: ")); + ATLTRACE(_T("%f"), (double)var.bVal); + break; + case VT_BOOL: + ATLTRACE(_T("VT_BOOL: ")); + ATLTRACE(_T("%s"), var.boolVal ? _T("true") : _T("false")); + break; + case VT_ERROR: + ATLTRACE(_T("VT_ERROR: ")); + ATLTRACE(_T("%d"), var.scode); + break; + case VT_CY: + ATLTRACE(_T("VT_CY: ")); + ATLTRACE(_T("%d"), var.cyVal); + break; + case VT_DATE: + ATLTRACE(_T("VT_DATE ")); + break; + case VT_BSTR: + ATLTRACE(_T("VT_BSTR: ")); + ATLTRACE(_T("%s"), OLE2T(var.bstrVal)); + break; + case VT_UNKNOWN: + ATLTRACE(_T("VT_UNKNOWN: ")); + break; + default: + ATLTRACE(_T("VT_ Other")); + break; + } +} + +#define TRACEVARIANT(var) DumpVariant(var) + +#else + +#define TRACEVARIANT(var) ((void)0) +#endif + + + +///////////////////////////////////////////////////////////////////////////// +// CComponentData + + +CComponentData::CComponentData() +{ +} + +CComponentData::~CComponentData() +{ +} + +///////////////////////////////////////////////////////////////////////////// +// CComponentData message handlers + +HRESULT CComponentData::Initialize(const string & sKey) +{ + // Need a registry key to read from + if(sKey.empty()) + return E_INVALIDARG; + + m_sKey = sKey; + + return S_OK; + +} + + +////////////////////////////////////////////////////////////////// +// Does the actual saving to the Registry + +HRESULT CComponentData::Save(string sKey /* = "" */) +{ + ATLTRACE(_T("DATA SAVE\n==========\n")); + + long lRet = 0; + CRegKey regKey; + + + // Set to Internal Key if sKey Is Empty + if(sKey.empty()) sKey = m_sKey; + + + // Try and open Our Key + if((lRet = regKey.Create(HKEY_CURRENT_USER, sKey)) != ERROR_SUCCESS) + return HRESULT_FROM_WIN32(lRet); + + + // Now do actual saving + // Only support number and String types for now + DWORD dwData = 0; + + string_variant_map::iterator iter = m_mapValues.begin(); + + for( ;iter != m_mapValues.end(); iter++) + { + ATLTRACE(_T("Saving: %s -- Value: "), iter->first.c_str()); + TRACEVARIANT(iter->second); + ATLTRACE(_T("\n")); + + switch(iter->second.vt) + { + // Number Types + case VT_UI1: + case VT_I2: + case VT_I4: + case VT_R4: + case VT_R8: + case VT_CY: + + lRet = regKey.SetValue(iter->second.lVal, iter->first); +// ASSERT(lRet == ERROR_SUCCESS); + break; + + // It's a String + case VT_BSTR: + + lRet = regKey.SetValue(string(iter->second.bstrVal), iter->first); +// ASSERT(lRet == ERROR_SUCCESS); + break; + + + // Delete the Key if NULL or Empty value + case VT_NULL: + case VT_EMPTY: + + lRet = regKey.DeleteValue(iter->first); +// ASSERT(lRet == ERROR_SUCCESS); + break; + + default: + break; + + + + } + + } + + return S_OK; + +} + +////////////////////////////////////////////////////////////////// +// Passes the caller a IUnknown to the the underlying IPropertyBag + +/*IUnknown* CComponentData::GetIUnknown(bool bAddRef) +{ + // If asked not to increment then Release + if(bAddRef) + this->AddRef(); + + + return GetUnknown(); +} +*/ + +////////////////////////////////////////////////////////////////// +// Reads actual Value from Registry + +HRESULT CComponentData::Read(const string & sValName, VARIANT& varVal) +{ + // First Lookup the Value in the current map + string_variant_map::iterator iter = m_mapValues.find(sValName); + if(iter != m_mapValues.end()) + return ::VariantCopy(&varVal, &(iter->second)); + + + + // Make sure we are initialized with a key + if(m_sKey == "") + return E_UNEXPECTED; + + // Open Key + CRegKey regDataKey; + if(regDataKey.Create(HKEY_CURRENT_USER, m_sKey) == ERROR_SUCCESS) + { + + // Get Size and Type of Registry Value + DWORD dwType = NULL; + DWORD dwSize; + if(::RegQueryValueEx(regDataKey.m_hKey, sValName, 0, &dwType, NULL, &dwSize) == ERROR_SUCCESS) + { + + + // We Only Support DWORD and String + switch(dwType) + { + + case REG_DWORD: + + // Get DWORD Value + DWORD dwData; + dwSize = sizeof(DWORD); + if(::RegQueryValueEx(regDataKey.m_hKey, sValName, 0, &dwType, (LPBYTE)&dwData, &dwSize) == ERROR_SUCCESS) + { + + // Make sure we have a clean variant + ::VariantClear(&varVal); + // Return a 4 byte Integer + varVal.vt = VT_I4; + varVal.lVal = dwData; + + + regDataKey.Close(); + return S_OK; + + } + break; + + + case REG_SZ: + + + // Get String Value + string sData; + if(::RegQueryValueEx(regDataKey.m_hKey, sValName, 0, &dwType, (LPBYTE)sData.get_buffer(dwSize), &dwSize) == ERROR_SUCCESS) + { + // Have to Release before we can AllocSysString + sData.release_buffer(); + + + // Make sure we have a clean variant + ::VariantClear(&varVal); + // Return a BSTR (Client responsible for cleanup) + varVal.vt = VT_BSTR; + varVal.bstrVal = _bstr_t(sData); + + regDataKey.Close(); + return S_OK; + + } + break; + } + + + } + + regDataKey.Close(); + return REGDB_E_KEYMISSING; + + } + + regDataKey.Close(); + return REGDB_E_READREGDB; + +} + +////////////////////////////////////////////////////////////////// +// Saves the value passed to Internal Map where it stays until +// saved by the function Save + +HRESULT CComponentData::Write(const string& sValName, const VARIANT & varVal) +{ + HRESULT hr; + CComVariant varCopy = varVal; + + // Check what we've got + // We only support DWORD and String + switch(varVal.vt) + { + + case VT_UI1: + case VT_I2: + case VT_I4: + case VT_R4: + case VT_R8: + case VT_CY: + + // First try and make a 4 byte integer out of it (DWORD) + hr = VariantChangeType(&varCopy, &varCopy, 0, VT_I4); + if(FAILED(hr)) + return hr; + + case VT_BSTR: + case VT_NULL: + case VT_EMPTY: + + // Add Item to Variant Map + m_mapValues.erase(sValName); + m_mapValues.insert(make_pair(sValName, varCopy)); + return S_OK; + break; + + + default: + + return E_INVALIDARG; + break; + + } + + return S_OK; + +} + + + +///////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////// +// IPropertyBag + +STDMETHODIMP CComponentData::Read(LPCOLESTR pszPropName, VARIANT* pVar, IErrorLog* pErrorLog) +{ +// TRACE("CComponentData::XPropertyBag::Read\n"); + + // Pass calls + ATLTRACE(_T("Read: %s -- Value: "), (LPCTSTR)string(pszPropName)); + HRESULT hr = Read(string(pszPropName), *pVar); + TRACEVARIANT(*pVar); + ATLTRACE(_T("\n")); + return hr; +} + +STDMETHODIMP CComponentData::Write(LPCOLESTR pszPropName, VARIANT* pVar) +{ +// TRACE("CComponentData::XPropertyBag::Write\n"); + + // Pass calls + ATLTRACE(_T("Write: %s -- Value: "), (LPCTSTR)string(pszPropName)); + TRACEVARIANT(*pVar); + ATLTRACE(_T("\n")); + return Write(string(pszPropName), *pVar); + +} + + +////////////////////////////////////////////////////////////////// +// Host specific Functions (returns default if error or can't find) + +int CComponentData::GetInt(const string& sKey, int nDefault) +{ + CComVariant var; + + var.vt = VT_I4; + var.lVal = nDefault; + + if(FAILED(Read(sKey, var))) + return nDefault; + else + return var.lVal; +} + +////////////////////////////////////////////////////////////////// +// Host specific Function + +bool CComponentData::WriteInt(const string& sKey, int nValue) +{ + CComVariant var; + + var.vt = VT_I4; + var.lVal = nValue; + + return SUCCEEDED(Write(sKey, var)); + +} + +bool CComponentData::Delete(const string& sKey) +{ + CComVariant var; + var.vt = VT_NULL; + return SUCCEEDED(Write(sKey, var)); +} diff --git a/Common/ComponentData.h b/Common/ComponentData.h new file mode 100644 index 0000000..75dcdbb --- /dev/null +++ b/Common/ComponentData.h @@ -0,0 +1,111 @@ +////////////////////////////////////////////////////////////////// +// CComponentData +// +// Exposes the IPropertyBag interface for the components to store +// their data in. +// +// Also supports other host specific settings. +// +// Current implementation saves the data in the registry and only +// saves when requested to by host. +// +// Component can pass a Variant NULL to delete the specified +// property +// +// Only the following types are supported for now: +// VT_UI1 +// VT_I2 +// VT_I4 +// VT_R4 +// VT_R8 +// VT_CY +// VT_BSTR +////////////////////////////////////////////////////////////////// + + +#if !defined(COMPONENTDATA_H__2AA70045_1988_11D2_B2D4_0020182B97FC__INCLUDED_) +#define COMPONENTDATA_H__2AA70045_1988_11D2_B2D4_0020182B97FC__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// ComponentData.h : header file +// + +#define DATA_KEY _T("Data") + +#include "../common/interfaces.h" +#include +#include +using std::map; +using std::make_pair; + +#include + +typedef map string_variant_map; + +///////////////////////////////////////////////////////////////////////////// +// CComponentData command target +class ATL_NO_VTABLE CComponentData : + public CComObjectRootEx, + public IPropertyBag +{ + +// Attributes +public: + CComponentData(); + virtual ~CComponentData(); + + +public: + // Host specific functions + // Add String support later when needed. + bool WriteInt(const string& sKey, int nValue); + int GetInt(const string& sKey, int nDefault); + bool Delete(const string& sKey); + + // Can be used by Host and also called from the + // IPropertyBag Implementation below + HRESULT Write(const string& sValName, const VARIANT& varVal); + HRESULT Read(const string& sValName, VARIANT& varVal); + + // Initializes Key + HRESULT Initialize(const string& sKey); + + + // Saves All Setting to Registry Key + // If sKey = NULL then saves to key given in Initialize + HRESULT Save(string sKey = _T("")); + + + // Returns an IUnknown to IPropertyBag +// IUnknown* GetIUnknown(bool bAddRef = false); + + +protected: + + // Arrays of Settings to be written to Registry + // Supports Integers and Strings Only + string_variant_map m_mapValues; + + // Registry Key + string m_sKey; + +public: + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CComponentData) + COM_INTERFACE_ENTRY(IPropertyBag) +END_COM_MAP() + + // IPropertyBag Interface + STDMETHOD(Read)(LPCOLESTR pszPropName, VARIANT* pVar, IErrorLog* pErrorLog); + STDMETHOD(Write)(LPCOLESTR pszPropName, VARIANT* pVar); + +}; + +///////////////////////////////////////////////////////////////////////////// + + +#endif // !defined(COMPONENTDATA_H__2AA70045_1988_11D2_B2D4_0020182B97FC__INCLUDED_) diff --git a/Common/ComponentHolder.cpp b/Common/ComponentHolder.cpp new file mode 100644 index 0000000..474809b --- /dev/null +++ b/Common/ComponentHolder.cpp @@ -0,0 +1,386 @@ +// ComponentHolder.cpp: implementation of the CComponentHolder class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "ComponentHolder.h" + +#ifdef _DEBUG +#undef THIS_FILE +static char THIS_FILE[]=__FILE__; +#define new DEBUG_NEW +#endif + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CComponentHolder::CComponentHolder() +{ + // Both pointers are null for an uninited object + m_pComponentDOS = NULL; + m_pComponentWin = NULL; +} + +CComponentHolder::~CComponentHolder() +{ + // Just in case owner forgot + Release(); +} + +////////////////////////////////////////////////////////////////// +// Returns the component type (DOS or Windows) + +UINT CComponentHolder::GetType() +{ + // Needs to be Initialzed + ASSERT(!(m_pComponentDOS == NULL && m_pComponentWin == NULL)); + + + // Return Type + if(m_pComponentWin != NULL) + return COMPONENT_WIN; + else + return COMPONENT_DOS; + +} + +////////////////////////////////////////////////////////////////// +// Returns a IUnknown to the current component + +IUnknown* CComponentHolder::GetUnknown() +{ + // Needs to be Initialzed + ASSERT(!(m_pComponentDOS == NULL && m_pComponentWin == NULL)); + + // When copying out a Pointer make sure to AddRef + if(m_pComponentWin != NULL) + { + m_pComponentWin->AddRef(); + return m_pComponentWin; + } + else + { + m_pComponentDOS->AddRef(); + return m_pComponentDOS; + } + +} + +////////////////////////////////////////////////////////////////// +// Accepts a String ID, converts it and then calls the real +// Initialize + +HRESULT CComponentHolder::Initialize(const string& sID, const string& sRegKey) +{ + ASSERT(!sRegKey.empty()); + + USES_CONVERSION; + HRESULT hr; + CLSID clsid; + + // Get the CLSID + hr = CLSIDFromString(T2OLE(sID), &clsid); + + if(FAILED(hr)) + return hr; + + // And then call the real version + return Initialize(clsid, sRegKey); + +} + +////////////////////////////////////////////////////////////////// +// Loads and Initializes the Component + +HRESULT CComponentHolder::Initialize(const CLSID & clsid, const string& sRegKey) +{ + ASSERT(!sRegKey.empty()); + USES_CONVERSION; + + // If we're already Initialized then Release all the + // and start again interfaces + if(IsInitialized()) + Release(); + + + // Intitialize the Data Component + m_Data.Initialize(sRegKey); + + + + // Get an IUnknown to the Component First + // Since we don't know what it supports + // (CComPtr) calls Release for this one + HRESULT hr; + CComPtr pUnk; + hr = CoCreateInstance(clsid, NULL, /*CLSCTX_ALL*/CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER , IID_IUnknown, (void**) &pUnk); + + if(FAILED(hr)) + return hr; + + + // Check if it Supports IID_ISecureShutdownWin + hr = pUnk->QueryInterface(IID_ISecureShutdownWin, (void**) &m_pComponentWin); + if(FAILED(hr)) m_pComponentWin = NULL; + + + // Check if it Supports IID_ISecureShutdownDOS + hr = pUnk->QueryInterface(IID_ISecureShutdownDOS, (void**) &m_pComponentDOS); + if(FAILED(hr)) m_pComponentDOS = NULL; + + + // Did we catch something? + if(!IsInitialized()) + return hr; + + switch(GetType()) + { + case COMPONENT_WIN: + // Give the Component it's Data Pointer + hr = m_pComponentWin->SetData(m_Data.GetUnknown()); + if(FAILED(hr)) return hr; + break; + case COMPONENT_DOS: + // Give the Component it's Data Pointer + hr = m_pComponentDOS->SetData(m_Data.GetUnknown()); + if(FAILED(hr)) return hr; + break; + } + + // Get Name + m_sName = GetInfoStr(nsName, _T("(No Name)")); + + return S_OK; + +} + +////////////////////////////////////////////////////////////////// +// Helper Function + +bool CComponentHolder::IsInitialized() +{ + // Either one has to be initialized + return !((m_pComponentDOS == NULL) && (m_pComponentWin == NULL)); +} + +/*#ifndef NS_NO_PROPPAGE +////////////////////////////////////////////////////////////////// +// Returns a pointer to the Property page for current component +// or error if none + + +HRESULT CComponentHolder::GetPropPage(CPropPageHolder** pPropPage) +{ + // If we already have a Prop Page then just get pointer + if(m_PropPage.IsInitialized()) + { + *pPropPage = &m_PropPage; + return S_OK; + } + + + // Otherwise Create one + HRESULT hr; + + + // Get a IUnkown to the current Component + CComPtr pUnk; // Releases Pointer + GetIUnknown(&pUnk); + + + // See if it likes us + hr = m_PropPage.Initialize(pUnk); + if(FAILED(hr)) return hr; + + + // Return Pointer + *pPropPage = &m_PropPage; + + + return S_OK; +} + + +bool CComponentHolder::HasPropPage() +{ + CPropPageHolder* pPropPage; + return SUCCEEDED(GetPropPage(&pPropPage)); +} + +#endif // NS_NO_PROPPAGE +*/ +////////////////////////////////////////////////////////////////// +// Completely removes the component from Memory + +HRESULT CComponentHolder::Release() +{ +/* + // Check if we've got PropPage + // If so then get rid of it + if(m_PropPage.IsInitialized()) + m_PropPage.Destroy(); +*/ + + // Save the Data to the DataObject + // m_Data.Save(); + + + // Only Update if Initialized + if(IsInitialized()){ + + switch(GetType()){ + + case COMPONENT_WIN: + + // Get Component to Release Data Pointer + m_pComponentWin->SetData(NULL); + + // Release Component + m_pComponentWin->Release(); + + break; + + case COMPONENT_DOS: + + // Get Component to Release Data Pointer + m_pComponentDOS->SetData(NULL); + + // Release Component + m_pComponentDOS->Release(); + + break; + + } + + // Set to NULL as a flag + m_pComponentWin = NULL; + m_pComponentDOS = NULL; + + m_sName = _T(""); + } + + return S_OK; +} + +////////////////////////////////////////////////////////////////// +// Invokes actual shutdown (Windows Components Only) + +HRESULT CComponentHolder::DoShutdown(DWORD dwMode, HWND hwndParent) +{ + // Needs to be Initialized First + ASSERT(!(m_pComponentDOS == NULL && m_pComponentWin == NULL)); + + + switch(GetType()){ + case COMPONENT_WIN: + + // Call Shutdown. Only Windows + return m_pComponentWin->DoShutdown((long)hwndParent, (long)dwMode); + + break; + + case COMPONENT_DOS: + + // Call Shutdown. DOS don't support + ASSERT(false); + return E_FAIL; + + break; + } + + return E_FAIL; + +} + +////////////////////////////////////////////////////////////////// +// Retrieves Text for Batch File (DOS Components Only) + +HRESULT CComponentHolder::GetBatchText(string& sBatchText) +{ + USES_CONVERSION; + BSTR bstrBatchText; + HRESULT hr; + + switch(GetType()) + { + case COMPONENT_WIN: + + // Not Supported in Windows + return E_FAIL; + + break; + + case COMPONENT_DOS: + + // Get Batch Text. + hr = m_pComponentDOS->GetBatchText(&bstrBatchText); + + // Transfer to CString + if(SUCCEEDED(hr)) + sBatchText = OLE2T(bstrBatchText); + + return hr; + + break; + + } + + return E_FAIL; + + +} + + +CComVariant CComponentHolder::GetInfo(NightSecInfo nsItem) +{ + USES_CONVERSION; + CComVariant vInfo; + vInfo.vt = VT_EMPTY; + HRESULT hr; + + switch(GetType()){ + + case COMPONENT_WIN: + hr = m_pComponentWin->get_Info(nsItem, &vInfo); + break; + case COMPONENT_DOS: + hr = m_pComponentDOS->get_Info(nsItem, &vInfo); + break; + + } + + if(FAILED(hr)) + vInfo.vt = VT_NULL; + + return vInfo; +} + +string CComponentHolder::GetInfoStr(NightSecInfo nsItem, const string& sDefault) +{ + USES_CONVERSION; + + // Get Name + CComVariant vInfo = GetInfo(nsItem); + + if(vInfo.vt == VT_BSTR) + return OLE2T(vInfo.bstrVal); + + return sDefault; + +} + +int CComponentHolder::GetInfoInt(NightSecInfo nsItem, int nDefault) +{ + // Get Name + CComVariant vInfo = GetInfo(nsItem); + + if(vInfo.vt == VT_NULL || vInfo.vt == VT_EMPTY) + return nDefault; + + if(SUCCEEDED(vInfo.ChangeType(VT_I4))) + return vInfo.lVal; + + return nDefault; + +} diff --git a/Common/ComponentHolder.h b/Common/ComponentHolder.h new file mode 100644 index 0000000..66b90e2 --- /dev/null +++ b/Common/ComponentHolder.h @@ -0,0 +1,104 @@ +////////////////////////////////////////////////////////////////// +// +// ComponentHolder.h: interface for the CComponentHolder class. +// +// Holds one componet (either DOS or Windows) +// +// Is Initialized when either DOS or Windows pointer is valid +// +// virtual functions make it possible to override the funtionality +// and create host based app specific components. +// See shutdown.exe program for example of this +// +////////////////////////////////////////////////////////////////////// + +#if !defined(COMPONENTHOLDER_H__FDBF1422_18AE_11D2_B2D4_0020182B97FC__INCLUDED_) +#define COMPONENTHOLDER_H__FDBF1422_18AE_11D2_B2D4_0020182B97FC__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "../common/defines.h" +#include "../common/interfaces.h" +#include "../common/ComponentData.h" + +#include + +#define CComObjectMember CComObjectGlobal + +class CComponentHolder +{ + +public: + CComponentHolder(); + virtual ~CComponentHolder(); + + // Calls main component function for Windows Components + virtual HRESULT DoShutdown(DWORD dwMode, HWND hwndParent = NULL); + // Calls main component function for DOS Components + virtual HRESULT GetBatchText(string& sBatchText); + + + // Initialization + // Needs Registry Key to Initialize and Save the Component Data + virtual bool IsInitialized(); + virtual HRESULT Initialize(const CLSID& clsid, const string& sRegKey); + virtual HRESULT Initialize(const string& sID, const string& sRegKey); + + + virtual HRESULT Release(); + + // Returns type (DOS or Windows) + virtual UINT GetType(); + + // Get's a IUnknown to the Component + virtual IUnknown* GetUnknown(); + +protected: + ISecureShutdownDOS* m_pComponentDOS; + ISecureShutdownWin* m_pComponentWin; + + // Component ID +protected: + string m_sID; +public: + virtual const string& GetID() const { return m_sID; }; + + // Name +protected: + string m_sName; +public: + const string& GetName() const { return m_sName; }; + +/* +#ifndef NS_NO_PROPPAGE + // Component Property Page +protected: + CComObjectMember m_PropPage; +public: +// virtual HRESULT GetPropPage(CPropPageHolder** pPropPage); +// bool HasPropPage(); +#endif // NS_NO_PROPPAGE +*/ + + // Component's Data +protected: + CComObjectMember m_Data; +public: + virtual CComponentData* GetData() { return &m_Data; }; + + + // Host specific Funtions for accessing component data +public: + int GetInfoInt(NightSecInfo nsItem, int nDefault); + string GetInfoStr(NightSecInfo nsItem, const string& sDefault); + CComVariant GetInfo(NightSecInfo nsItem); + virtual bool IsEnabled() { return m_Data.GetInt(ENABLED_KEY, false) ? true : false; }; + virtual bool Enable(bool bEnable) { return m_Data.WriteInt(ENABLED_KEY, bEnable); } ; + virtual int GetPos() { return m_Data.GetInt(POSITION_KEY, 1); } ; + virtual bool SetPos(int nPos) { return m_Data.WriteInt(POSITION_KEY, nPos); } ; + +}; + +#endif // !defined(COMPONENTHOLDER_H__FDBF1422_18AE_11D2_B2D4_0020182B97FC__INCLUDED_) diff --git a/Common/Defines.h b/Common/Defines.h new file mode 100644 index 0000000..b66b229 --- /dev/null +++ b/Common/Defines.h @@ -0,0 +1,32 @@ +#ifndef __DEFINES_H__980713 +#define __DEFINES_H__980713 + + +#define COMPONENT_WIN 1 +#define COMPONENT_DOS 2 + +#define WIZPAGE_MIDDLE 0 +#define WIZPAGE_FIRST 1 +#define WIZPAGE_LAST 2 + +#define NS_GROUP _T("Heavenly Helpers") +#define NS_MAIN _T("Night Security") +#define NS_COMPONENTS _T("Components") +#define NS_INSTALLEDCOMPONENTS _T("Installed Components") + +#define NS_HELP_FILE _T("nightsec.hlp") + +#define NS_REG_MAIN _T("Software\\Heavenly Helpers\\Night Security") +#define NS_REG_COMPONENTS _T("Software\\Heavenly Helpers\\Night Security\\Components") +#define NS_REG_INSTALLEDCOMPONENTS _T("Software\\Heavenly Helpers\\Night Security\\Installed Components") + +#define NIGHTSEC_CLEARALL 0x00000001 + +#define ENABLED_KEY _T("Enabled") +#define POSITION_KEY _T("Position") + +#define FORCE_SHUTDOWN_KEY _T("Force MSDOS") +#define IS_SETUP_KEY _T("Is Setup") +#define NO_LOG_KEY _T("No Log") + +#endif //__DEFINES_H__980713 \ No newline at end of file diff --git a/Common/NightSec.h b/Common/NightSec.h new file mode 100644 index 0000000..a3f8705 --- /dev/null +++ b/Common/NightSec.h @@ -0,0 +1,591 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 3.01.75 */ +/* at Wed Apr 21 21:38:00 1999 + */ +/* Compiler settings for NightSec Worker.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: none +*/ +//@@MIDL_FILE_HEADING( ) +#include "rpc.h" +#include "rpcndr.h" +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __NightSec_Worker_h__ +#define __NightSec_Worker_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __ISecureShutdownWin_FWD_DEFINED__ +#define __ISecureShutdownWin_FWD_DEFINED__ +typedef interface ISecureShutdownWin ISecureShutdownWin; +#endif /* __ISecureShutdownWin_FWD_DEFINED__ */ + + +#ifndef __ISecureShutdownDOS_FWD_DEFINED__ +#define __ISecureShutdownDOS_FWD_DEFINED__ +typedef interface ISecureShutdownDOS ISecureShutdownDOS; +#endif /* __ISecureShutdownDOS_FWD_DEFINED__ */ + + +#ifndef __EmptyRecycleBin_FWD_DEFINED__ +#define __EmptyRecycleBin_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class EmptyRecycleBin EmptyRecycleBin; +#else +typedef struct EmptyRecycleBin EmptyRecycleBin; +#endif /* __cplusplus */ + +#endif /* __EmptyRecycleBin_FWD_DEFINED__ */ + + +#ifndef __EmptyTempFolder_FWD_DEFINED__ +#define __EmptyTempFolder_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class EmptyTempFolder EmptyTempFolder; +#else +typedef struct EmptyTempFolder EmptyTempFolder; +#endif /* __cplusplus */ + +#endif /* __EmptyTempFolder_FWD_DEFINED__ */ + + +#ifndef __DeleteSwapFile_FWD_DEFINED__ +#define __DeleteSwapFile_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DeleteSwapFile DeleteSwapFile; +#else +typedef struct DeleteSwapFile DeleteSwapFile; +#endif /* __cplusplus */ + +#endif /* __DeleteSwapFile_FWD_DEFINED__ */ + + +#ifndef __RunScanDisk_FWD_DEFINED__ +#define __RunScanDisk_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class RunScanDisk RunScanDisk; +#else +typedef struct RunScanDisk RunScanDisk; +#endif /* __cplusplus */ + +#endif /* __RunScanDisk_FWD_DEFINED__ */ + + +#ifndef __WipefreeSpace_FWD_DEFINED__ +#define __WipefreeSpace_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class WipefreeSpace WipefreeSpace; +#else +typedef struct WipefreeSpace WipefreeSpace; +#endif /* __cplusplus */ + +#endif /* __WipefreeSpace_FWD_DEFINED__ */ + + +#ifndef __WXPYShutdown_FWD_DEFINED__ +#define __WXPYShutdown_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class WXPYShutdown WXPYShutdown; +#else +typedef struct WXPYShutdown WXPYShutdown; +#endif /* __cplusplus */ + +#endif /* __WXPYShutdown_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +/**************************************** + * Generated header for interface: __MIDL_itf_NightSec_Worker_0000 + * at Wed Apr 21 21:38:00 1999 + * using MIDL 3.01.75 + ****************************************/ +/* [local] */ + + +typedef /* [helpstring][uuid][v1_enum] */ +enum NightSecInfo + { nsName = 0, + nsCmdLine = nsName + 1, + nsHelpText = nsCmdLine + 1, + nsForceShow = nsHelpText + 1, + nsHideNormal = nsForceShow + 1, + nsCopyAble = nsHideNormal + 1, + nsHelpFile = nsCopyAble + 1, + nsHelpTopic = nsHelpFile + 1 + } NightSecInfo; + + + +extern RPC_IF_HANDLE __MIDL_itf_NightSec_Worker_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_NightSec_Worker_0000_v0_0_s_ifspec; + +#ifndef __ISecureShutdownWin_INTERFACE_DEFINED__ +#define __ISecureShutdownWin_INTERFACE_DEFINED__ + +/**************************************** + * Generated header for interface: ISecureShutdownWin + * at Wed Apr 21 21:38:00 1999 + * using MIDL 3.01.75 + ****************************************/ +/* [unique][helpstring][dual][uuid][object] */ + + + +EXTERN_C const IID IID_ISecureShutdownWin; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + interface DECLSPEC_UUID("34F11691-F275-11d2-A589-0020182B97FC") + ISecureShutdownWin : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE DoShutdown( + /* [in] */ long hParent, + /* [in] */ long lMode) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetData( + /* [in] */ IUnknown __RPC_FAR *pUnk) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Info( + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISecureShutdownWinVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + ISecureShutdownWin __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + ISecureShutdownWin __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + ISecureShutdownWin __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *DoShutdown )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ long hParent, + /* [in] */ long lMode); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SetData )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Info )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + END_INTERFACE + } ISecureShutdownWinVtbl; + + interface ISecureShutdownWin + { + CONST_VTBL struct ISecureShutdownWinVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISecureShutdownWin_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISecureShutdownWin_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISecureShutdownWin_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISecureShutdownWin_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISecureShutdownWin_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISecureShutdownWin_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISecureShutdownWin_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISecureShutdownWin_DoShutdown(This,hParent,lMode) \ + (This)->lpVtbl -> DoShutdown(This,hParent,lMode) + +#define ISecureShutdownWin_SetData(This,pUnk) \ + (This)->lpVtbl -> SetData(This,pUnk) + +#define ISecureShutdownWin_get_Info(This,nsItem,pvVal) \ + (This)->lpVtbl -> get_Info(This,nsItem,pvVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownWin_DoShutdown_Proxy( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ long hParent, + /* [in] */ long lMode); + + +void __RPC_STUB ISecureShutdownWin_DoShutdown_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownWin_SetData_Proxy( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + +void __RPC_STUB ISecureShutdownWin_SetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ISecureShutdownWin_get_Info_Proxy( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + +void __RPC_STUB ISecureShutdownWin_get_Info_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISecureShutdownWin_INTERFACE_DEFINED__ */ + + +#ifndef __ISecureShutdownDOS_INTERFACE_DEFINED__ +#define __ISecureShutdownDOS_INTERFACE_DEFINED__ + +/**************************************** + * Generated header for interface: ISecureShutdownDOS + * at Wed Apr 21 21:38:00 1999 + * using MIDL 3.01.75 + ****************************************/ +/* [unique][helpstring][dual][uuid][object] */ + + + +EXTERN_C const IID IID_ISecureShutdownDOS; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + interface DECLSPEC_UUID("34F11692-F275-11d2-A589-0020182B97FC") + ISecureShutdownDOS : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetBatchText( + /* [retval][out] */ BSTR __RPC_FAR *psText) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetData( + /* [in] */ IUnknown __RPC_FAR *pUnk) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Info( + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISecureShutdownDOSVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + ISecureShutdownDOS __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + ISecureShutdownDOS __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + ISecureShutdownDOS __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetBatchText )( + ISecureShutdownDOS __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *psText); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SetData )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Info )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + END_INTERFACE + } ISecureShutdownDOSVtbl; + + interface ISecureShutdownDOS + { + CONST_VTBL struct ISecureShutdownDOSVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISecureShutdownDOS_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISecureShutdownDOS_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISecureShutdownDOS_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISecureShutdownDOS_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISecureShutdownDOS_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISecureShutdownDOS_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISecureShutdownDOS_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISecureShutdownDOS_GetBatchText(This,psText) \ + (This)->lpVtbl -> GetBatchText(This,psText) + +#define ISecureShutdownDOS_SetData(This,pUnk) \ + (This)->lpVtbl -> SetData(This,pUnk) + +#define ISecureShutdownDOS_get_Info(This,nsItem,pvVal) \ + (This)->lpVtbl -> get_Info(This,nsItem,pvVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownDOS_GetBatchText_Proxy( + ISecureShutdownDOS __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *psText); + + +void __RPC_STUB ISecureShutdownDOS_GetBatchText_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownDOS_SetData_Proxy( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + +void __RPC_STUB ISecureShutdownDOS_SetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ISecureShutdownDOS_get_Info_Proxy( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + +void __RPC_STUB ISecureShutdownDOS_get_Info_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISecureShutdownDOS_INTERFACE_DEFINED__ */ + + + +#ifndef __NightSecComponents_LIBRARY_DEFINED__ +#define __NightSecComponents_LIBRARY_DEFINED__ + +/**************************************** + * Generated header for library: NightSecComponents + * at Wed Apr 21 21:38:00 1999 + * using MIDL 3.01.75 + ****************************************/ +/* [helpstring][version][uuid] */ + + + +EXTERN_C const IID LIBID_NightSecComponents; + +#ifdef __cplusplus +EXTERN_C const CLSID CLSID_EmptyRecycleBin; + +class DECLSPEC_UUID("34F11694-F275-11d2-A589-0020182B97FC") +EmptyRecycleBin; +#endif + +#ifdef __cplusplus +EXTERN_C const CLSID CLSID_EmptyTempFolder; + +class DECLSPEC_UUID("34F11695-F275-11d2-A589-0020182B97FC") +EmptyTempFolder; +#endif + +#ifdef __cplusplus +EXTERN_C const CLSID CLSID_DeleteSwapFile; + +class DECLSPEC_UUID("34F11696-F275-11d2-A589-0020182B97FC") +DeleteSwapFile; +#endif + +#ifdef __cplusplus +EXTERN_C const CLSID CLSID_RunScanDisk; + +class DECLSPEC_UUID("34F11697-F275-11d2-A589-0020182B97FC") +RunScanDisk; +#endif + +#ifdef __cplusplus +EXTERN_C const CLSID CLSID_WipefreeSpace; + +class DECLSPEC_UUID("34F11698-F275-11d2-A589-0020182B97FC") +WipefreeSpace; +#endif + +#ifdef __cplusplus +EXTERN_C const CLSID CLSID_WXPYShutdown; + +class DECLSPEC_UUID("34F11699-F275-11d2-A589-0020182B97FC") +WXPYShutdown; +#endif +#endif /* __NightSecComponents_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( unsigned long __RPC_FAR *, unsigned long , BSTR __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER BSTR_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER BSTR_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * ); +void __RPC_USER BSTR_UserFree( unsigned long __RPC_FAR *, BSTR __RPC_FAR * ); + +unsigned long __RPC_USER VARIANT_UserSize( unsigned long __RPC_FAR *, unsigned long , VARIANT __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER VARIANT_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER VARIANT_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * ); +void __RPC_USER VARIANT_UserFree( unsigned long __RPC_FAR *, VARIANT __RPC_FAR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Common/NightSecApp.cpp b/Common/NightSecApp.cpp new file mode 100644 index 0000000..0fcec5e --- /dev/null +++ b/Common/NightSecApp.cpp @@ -0,0 +1,138 @@ +// NightSecApp.cpp: implementation of the CNightSecApp class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "NightSecApp.h" + +#include +#include +#include +#include "../common/defines.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CComponentArray g_aComponents; + +#define NS_REGISTER_FAILED _T("Night Security was unable to register the %s component.\n\n%s\nIf Night Security doesn't seem to be working properly please reinstall.") +const DWORD dwTimeOut = 5000; // time for EXE to be idle before shutting down + +CNightSecApp::CNightSecApp(const string& sAppName, const string& sMtxName) + : m_sAppName(sAppName), m_oneInstance(sMtxName), + m_settings(HKEY_CURRENT_USER, NS_REG_MAIN) +{ + +} + +CNightSecApp::~CNightSecApp() +{ + +} + +bool CNightSecApp::InitInstance() +{ + LPCTSTR szCmdLine = GetCommandLine(); + + // If we've been asked to close then exit here + if(_tcsstr(szCmdLine, _T("close")) != NULL) + return false; + + // Load up all Components + if(!g_aComponents.LoadComponents()) + { + RegisterDlls(); + g_aComponents.LoadComponents(); + } + + return true; +} + +bool CNightSecApp::ExitInstance() +{ + g_aComponents.UnloadComponents(); + return false; +} + +HRESULT CNightSecApp::RegisterDlls(bool bUI /*= true*/) +{ + file_iterator iterFiles(GetProgramFolder(_Module.m_hInst), + _T("*.dll"), file_iterator::full_paths); + + file_iterator end; + + HRESULT hRet = S_OK; + + for( ; iterFiles != end; iterFiles++) + { + HRESULT hr = RegisterDLL(iterFiles->cFileName); + + if(SUCCEEDED(hr) || !bUI) + continue; + + string sError; + file_path fileDll(iterFiles->cFileName); + sError.format(NS_REGISTER_FAILED, (LPCTSTR)fileDll.file(), (LPCTSTR)FormatHR(hr)); + + MessageBox(NULL, sError, m_sAppName, MB_OK | MB_ICONEXCLAMATION); + } + + return hRet; +} + +// Passed to CreateThread to monitor the shutdown event +/*static DWORD WINAPI MonitorProc(void* pv) +{ + CNightSecApp* p = (CNightSecApp*)pv; + p->MonitorShutdown(); + return 0; +}*/ + +/*LONG CNightSecApp::Unlock() +{ + LONG l = CComModule::Unlock(); + if (l == 0) + { + bActivity = true; + SetEvent(hEventShutdown); // tell monitor that we transitioned to zero + } + return l; +} +*/ +//Monitors the shutdown event +/*void CNightSecApp::MonitorShutdown() +{ + while (1) + { + WaitForSingleObject(hEventShutdown, INFINITE); + DWORD dwWait=0; + do + { + bActivity = false; + dwWait = WaitForSingleObject(hEventShutdown, dwTimeOut); + } while (dwWait == WAIT_OBJECT_0); + // timed out + if (!bActivity && m_nLockCnt == 0) // if no activity let's really bail + { +#if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED) + CoSuspendClassObjects(); + if (!bActivity && m_nLockCnt == 0) +#endif + break; + } + } + CloseHandle(hEventShutdown); + PostThreadMessage(dwThreadID, WM_QUIT, 0, 0); +} + +bool CNightSecApp::StartMonitor() +{ + hEventShutdown = CreateEvent(NULL, false, false, NULL); + if (hEventShutdown == NULL) + return false; + DWORD dwThreadID; + HANDLE h = CreateThread(NULL, 0, MonitorProc, this, 0, &dwThreadID); + return (h != NULL); +} +*/ \ No newline at end of file diff --git a/Common/NightSecApp.h b/Common/NightSecApp.h new file mode 100644 index 0000000..80e9fae --- /dev/null +++ b/Common/NightSecApp.h @@ -0,0 +1,41 @@ +// NightSecApp.h: interface for the CNightSecApp class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_NIGHTSECAPP_H__19178A44_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_) +#define AFX_NIGHTSECAPP_H__19178A44_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include +#include +#include "../common/oneinstance.h" + +class CNightSecApp : public CComModule +{ +public: + CNightSecApp(const string& sAppName, const string& sMtxName = _T("")); + ~CNightSecApp(); + virtual bool InitInstance(); + virtual bool ExitInstance(); + HRESULT RegisterDlls(bool bUI = true); + + // From ATL +// LONG Unlock(); +// DWORD dwThreadID; +// HANDLE hEventShutdown; +// void MonitorShutdown(); +// bool StartMonitor(); + bool bActivity; + +protected: + const string m_sAppName; + COneInstance m_oneInstance; + +public: + CRegSettings m_settings; +}; + +#endif // !defined(AFX_NIGHTSECAPP_H__19178A44_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_) diff --git a/Common/OneInstance.h b/Common/OneInstance.h new file mode 100644 index 0000000..5eec36f --- /dev/null +++ b/Common/OneInstance.h @@ -0,0 +1,63 @@ +// OneInstance.h: interface for the COneInstance class. +// +////////////////////////////////////////////////////////////////////// + + +#if !defined(AFX_ONEINSTANCE_H__A3059F66_BFED_11D2_A501_0020182B97FC__INCLUDED_) +#define AFX_ONEINSTANCE_H__A3059F66_BFED_11D2_A501_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include + +class COneInstance +{ +public: + + // Constructor + COneInstance(LPCSTR szID) + : sMtxName(szID) {}; + + // Activates a Window based on the following... + // szClass: Class name of Window (get from SPY) + // szTitle: Title bar of Window + bool FindAndActivate(LPCSTR szClass, LPCSTR szTitle) const + { + // Search for the Window + HWND hWnd = ::FindWindow(szClass, szTitle); + + // Check if we have any popups + HWND hChild = GetLastActivePopup(hWnd); + + bool bRet = SetForegroundWindow(hWnd) ? true : false; // bring main window to top + + if (hWnd != hChild) + SetForegroundWindow(hChild); // a pop-up window is active + // bring it to the top too + // do not run second instance + return bRet; + } + + // Checks if there is already a program loaded + // with the ID passed when creating COneInstance + bool IsAlreadyLoaded() const + { + if(sMtxName.empty()) + return false; + + // Use a Mutex and not a FindWindow because process could exist + // without a Window ( + ::CreateMutex(NULL, true, sMtxName.c_str()); + + // mutex will be automatically deleted when process ends + return (::GetLastError() == ERROR_ALREADY_EXISTS); + } + + +protected: + std::string sMtxName; +}; + +#endif // !defined(AFX_ONEINSTANCE_H__A3059F66_BFED_11D2_A501_0020182B97FC__INCLUDED_) diff --git a/Common/PropPageHolder.cpp b/Common/PropPageHolder.cpp new file mode 100644 index 0000000..cd14ff8 --- /dev/null +++ b/Common/PropPageHolder.cpp @@ -0,0 +1,317 @@ +// PropPageHolder.cpp : implementation file +// + +#include "stdafx.h" +#include "PropPageHolder.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropPageHolder + +CPropPageHolder::CPropPageHolder() +{ + m_pSite = NULL; + m_pPropPage = NULL; + m_bActivated = false; + memset(&m_PageInfo, 0, sizeof(PROPPAGEINFO)); +} + +/*CPropPageHolder::CPropPageHolder(IPropertyPage* pPage, IUnknown* pSite) +{ + m_pSite = NULL; + m_pPropPage = NULL; + m_bActivated = false; + memset(&m_PageInfo, 0, sizeof(PROPPAGEINFO)); + + // We were passed a IUnknown, so Initialize from there + Initialize(pPage, pSite); +} +*/ + +CPropPageHolder::~CPropPageHolder() +{ + // Just in case + if(m_pPropPage != NULL) + Destroy(); + + if(m_PageInfo.cb != 0) + { + CoTaskMemFree(m_PageInfo.pszDocString); + CoTaskMemFree(m_PageInfo.pszHelpFile); + CoTaskMemFree(m_PageInfo.pszTitle); + } +} + +///////////////////////////////////////////////////////////////////////////// +// CPropPageHolder message handlers + +////////////////////////////////////////////////////////////////// +// Loads Prop Page if it has one + +HRESULT CPropPageHolder::Initialize(IPropertyPage* pPage, IUnknown* pSite) +{ + // Can't Reinitialize + ASSERT(!m_pPropPage); + ASSERT(pSite); + ASSERT(pPage); + + // This is the Container site + // (Returned from IPropertyPageSite::GetPageContainer) + m_pSite = pSite; + + m_pPropPage = pPage; + pPage->AddRef(); + + // Get a IPropertyPageSite Pointer to ourselves + // for the new Proppage + IPropertyPageSite* pPageSite = NULL; + QueryInterface(IID_IPropertyPageSite, (void**)&pPageSite); + ASSERT(pPageSite); + + + // Set Page Site + HRESULT hr = m_pPropPage->SetPageSite(pPageSite); + + // Make sure to reset to null if failed + if(FAILED(hr)) + { + m_pPropPage->Release(); + m_pPropPage = NULL; + } + else + { + // Property page should have AddRef'ed, + // So release our pointer + Release(); + } + + return hr; + +} + +////////////////////////////////////////////////////////////////// +// Creates and shows PropPage + +HRESULT CPropPageHolder::Create(HWND hwndParent, const RECT& rect, bool bModalParent /*= true*/) +{ + // Need to Initialize First + ASSERT(m_pPropPage); + + + // If we're already activated then just + // move to new coordinates + if(m_bActivated) + return Move(rect); + + + HRESULT hr; + + + // Activate the Page + hr = m_pPropPage->Activate(hwndParent, &rect, true); + + + if(!FAILED(hr)) + { + m_bActivated = true; + + // Make sure it's visible + m_pPropPage->Show(SW_SHOW); + } + + + return hr; +} + +////////////////////////////////////////////////////////////////// +// Destroys and Releases PropPage + +HRESULT CPropPageHolder::Destroy() +{ + // Can't destroy NULL object + if(m_pPropPage == NULL) + return S_OK; + + + Close(); + + // Make it let go of our IPropertyPageSite Pointer + HRESULT hr = m_pPropPage->SetPageSite(NULL); + + + // Then release it + m_pPropPage->Release(); + + + m_pPropPage = NULL; + + return hr; +} + +HRESULT CPropPageHolder::Close() +{ + // Need to Initialize + // and create first + ASSERT(m_pPropPage); + + if(m_bActivated) + { + + m_bActivated = false; + + // Deactivate page + return m_pPropPage->Deactivate(); + + } + + // It went okay but didn't do anything so... + return S_FALSE; + +} + +////////////////////////////////////////////////////////////////// +// Calls IPropPage Show + +HRESULT CPropPageHolder::Show(UINT nCmdShow) +{ + // Need to Initialize + // and create first + ASSERT(m_pPropPage); + ASSERT(m_bActivated); + + return m_pPropPage->Show(nCmdShow); + +} + +////////////////////////////////////////////////////////////////// +// Calls IPropPage Move + +HRESULT CPropPageHolder::Move(const RECT& rect) +{ + // Need to Initialize + // and create first + ASSERT(m_pPropPage); + ASSERT(m_bActivated); + + return m_pPropPage->Move(&rect); + +} + +////////////////////////////////////////////////////////////////// +// PropPage is inited properly if pointer not null + +bool CPropPageHolder::IsInitialized() +{ + return !(m_pPropPage == NULL); +} + +////////////////////////////////////////////////////////////////// +// Calls IPropPage Apply (results in a call to OnStatusChanged +// in our IPropPageSite) + +HRESULT CPropPageHolder::Apply() +{ + // Need to Initialize First + ASSERT(m_pPropPage); + + return m_pPropPage->Apply(); +} + +////////////////////////////////////////////////////////////////// +// Is it Created? + +bool CPropPageHolder::IsActivated() + { return m_bActivated; } + + + +///////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////// +// PropertyPageSite + +STDMETHODIMP CPropPageHolder::OnStatusChange(DWORD dwFlags) +{ + TRACE("CPropPageHolder::XPropertyPageSite::OnStatusChange\n"); + + // We don't need to implement any of this + // as we use delayed saving + return S_OK; +} + +STDMETHODIMP CPropPageHolder::GetLocaleID(LCID* pLocaleID) +{ + TRACE("CPropPageHolder::XPropertyPageSite::GetLocaleID\n"); + + // Just give'm a default language + *pLocaleID = LOCALE_SYSTEM_DEFAULT; + return S_OK; +} + +STDMETHODIMP CPropPageHolder::GetPageContainer(IUnknown** ppUnk) +{ + TRACE("CPropPageHolder::XPropertyPageSite::GetPageContainer\n"); + + // If Error we need to set to NULL + // This takes care of that cuz NULL is the only error around + *ppUnk = m_pSite; + + if(!m_pSite) + return E_UNEXPECTED; + + m_pSite->AddRef(); + + // Sorry + return S_OK; +} + +STDMETHODIMP CPropPageHolder::TranslateAccelerator(LPMSG pMsg) +{ + TRACE("CPropPageHolder::XPropertyPageSite::TranslateAccelerator\n"); + + // Sorry + return E_NOTIMPL; +} + +string CPropPageHolder::GetTitle() +{ + USES_CONVERSION; + LoadInfo(); + + if(m_PageInfo.pszTitle) + return OLE2T(m_PageInfo.pszTitle); + + return _T(""); +} + +string CPropPageHolder::GetHelpFile() +{ + USES_CONVERSION; + LoadInfo(); + + if(m_PageInfo.pszHelpFile) + return OLE2T(m_PageInfo.pszHelpFile); + + return _T(""); +} + +DWORD CPropPageHolder::GetHelpContext() +{ + LoadInfo(); + return m_PageInfo.dwHelpContext; +} + + +HRESULT CPropPageHolder::LoadInfo() +{ + if(m_PageInfo.cb != 0) + return S_OK; + + ASSERT(m_pPropPage); + m_PageInfo.cb = sizeof(PROPPAGEINFO); + return m_pPropPage->GetPageInfo(&m_PageInfo); +} diff --git a/Common/PropPageHolder.h b/Common/PropPageHolder.h new file mode 100644 index 0000000..4fec7ee --- /dev/null +++ b/Common/PropPageHolder.h @@ -0,0 +1,89 @@ +////////////////////////////////////////////////////////////////// +// +// PropPageHolder.h : header file +// +// CPropPageHolder manages the components IPropertyPage Interface +// +// It also exposes a IPropertyPageSite Interface for the +// Component (not used for much though) +// +////////////////////////////////////////////////////////////////// + +#if !defined(AFX_PROPPAGEHOLDER_H__F0EC0A29_18D4_11D2_B2D4_0020182B97FC__INCLUDED_) +#define AFX_PROPPAGEHOLDER_H__F0EC0A29_18D4_11D2_B2D4_0020182B97FC__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +///////////////////////////////////////////////////////////////////////////// +// CPropPageHolder command target + +class ATL_NO_VTABLE CPropPageHolder : + public CComObjectRootEx, + public IPropertyPageSite +{ + +// Attributes +public: + CPropPageHolder(); +// CPropPageHolder(IPropertyPage* pPage, IUnknown* pSite); + virtual ~CPropPageHolder(); + +// Operations +public: + HRESULT Close(); + + bool IsActivated(); // Is Proppage Created? + HRESULT Apply(); // Save Changes to Data Object + bool IsInitialized(); // Is Initialized? + + // Checks to see if it has a IPropPage + HRESULT Initialize(IPropertyPage* pUnk, IUnknown* pSite); + + // Activates and Shows the Page + // For best results start with WS_VISIBLE = false in + // dialog template (no flicker) + HRESULT Create(HWND hwndParent, const RECT& rect, bool bModalParent = true); + + // DeActivates Page and Releases IPropPage + HRESULT Destroy(); + + // Window Functions + HRESULT Show(UINT nCmdShow); + HRESULT Move(const RECT& rect); + +// Implementation +protected: + HRESULT LoadInfo(); + + // Is Created or not? + bool m_bActivated; + + IPropertyPage* m_pPropPage; + PROPPAGEINFO m_PageInfo; + IUnknown* m_pSite; // This is a pointer to the Page Container Site + // Returned from IPropertyPageSite::GetPageContainer + +public: + DWORD GetHelpContext(); + string GetHelpFile(); + string GetTitle(); + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CPropPageHolder) + COM_INTERFACE_ENTRY(IPropertyPageSite) +END_COM_MAP() + + // IPropertyBag + STDMETHOD(OnStatusChange)(DWORD dwFlags); + STDMETHOD(GetLocaleID)(LCID* pLocaleID); + STDMETHOD(GetPageContainer)(IUnknown** ppUnk); + STDMETHOD(TranslateAccelerator)(LPMSG pMsg); + +}; + +///////////////////////////////////////////////////////////////////////////// + +#endif // !defined(AFX_PROPPAGEHOLDER_H__F0EC0A29_18D4_11D2_B2D4_0020182B97FC__INCLUDED_) diff --git a/Common/events.h b/Common/events.h new file mode 100644 index 0000000..f736f9c --- /dev/null +++ b/Common/events.h @@ -0,0 +1,6 @@ +#ifndef __EVENTS_H__991107 +#define __EVENTS_H__991107 + +#import "../Shutdown/Shutdown.tlb" raw_interfaces_only, raw_native_types, no_namespace, named_guids //"Import typelib" + +#endif //__EVENTS_H__991107 \ No newline at end of file diff --git a/Common/interfaces.cpp b/Common/interfaces.cpp new file mode 100644 index 0000000..b43b8b5 --- /dev/null +++ b/Common/interfaces.cpp @@ -0,0 +1,4 @@ + +#include "../interfaces/CmptIFaces_i.c" +#include "../interfaces/SiteIFaces_i.c" + diff --git a/Common/interfaces.h b/Common/interfaces.h new file mode 100644 index 0000000..9bf5667 --- /dev/null +++ b/Common/interfaces.h @@ -0,0 +1,14 @@ +#ifndef __INTERFACES_H__980711 +#define __INTERFACES_H__980711 + +#include "../interfaces/CmptIFaces.h" +#include "../interfaces/SiteIFaces.h" + +#include + +_COM_SMARTPTR_TYPEDEF(INightSecError, __uuidof(INightSecError)); +_COM_SMARTPTR_TYPEDEF(INightSecErrorFix, __uuidof(INightSecErrorFix)); +_COM_SMARTPTR_TYPEDEF(INightSecErrorLog, __uuidof(INightSecErrorLog)); +_COM_SMARTPTR_TYPEDEF(INightSecSiteInfo, __uuidof(INightSecSiteInfo)); + +#endif //__INTERFACES_H__980711 \ No newline at end of file diff --git a/Common/types.h b/Common/types.h new file mode 100644 index 0000000..fa6a1b2 --- /dev/null +++ b/Common/types.h @@ -0,0 +1,10 @@ +// Extra types used in Night Security + +#include + +#include +typedef std::vector string_array; + +#include +typedef std::set string_set; + diff --git a/Graphics/Animations/ENC.MOV b/Graphics/Animations/ENC.MOV new file mode 100644 index 0000000..e0182da Binary files /dev/null and b/Graphics/Animations/ENC.MOV differ diff --git a/Graphics/Animations/FILECOMP.avi b/Graphics/Animations/FILECOMP.avi new file mode 100644 index 0000000..546e99f Binary files /dev/null and b/Graphics/Animations/FILECOMP.avi differ diff --git a/Graphics/Animations/FILECOPY.avi b/Graphics/Animations/FILECOPY.avi new file mode 100644 index 0000000..ec6acf7 Binary files /dev/null and b/Graphics/Animations/FILECOPY.avi differ diff --git a/Graphics/Animations/Final/Enc.ppj b/Graphics/Animations/Final/Enc.ppj new file mode 100644 index 0000000..3077165 --- /dev/null +++ b/Graphics/Animations/Final/Enc.ppj @@ -0,0 +1,4201 @@ +[HEAD] +signature=Rand +version=5 +dirOffset=16 +platform=PWIN +[PJLN] +21 +[PRJL] +ver=0 +ID=1 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=2 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=3 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=4 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=5 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=6 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=7 +type=0 +left=0 +rt=0 +desc=0, +sel=1 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=8 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=9 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=10 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=11 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=12 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=13 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=14 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=15 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=16 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=17 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=18 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=19 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=20 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[PRJL] +ver=0 +ID=20 +type=0 +left=0 +rt=0 +desc=0, +sel=0 +foldFormat=0 +loc=0,0 +foldItems= +foldOwn= +foldName=-1 +foldPos=0,0,0,0 +comment= +label1= +label2= +label3= +box=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +sortmode=0 +prevsort=0 +spare=0,0,0 +[TRAK] +[TRK0] +20 +[TRK0] +ID=21 +flags=1 +start=0 +end=4 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=22 +flags=1 +start=4 +end=8 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=23 +flags=1 +start=8 +end=12 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=24 +flags=1 +start=12 +end=16 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=25 +flags=1 +start=16 +end=20 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=26 +flags=1 +start=20 +end=24 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=27 +flags=1 +start=24 +end=28 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=28 +flags=1 +start=28 +end=32 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=29 +flags=1 +start=32 +end=36 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=30 +flags=1 +start=36 +end=40 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=31 +flags=1 +start=40 +end=44 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=32 +flags=1 +start=44 +end=48 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=33 +flags=1 +start=48 +end=52 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=34 +flags=1 +start=52 +end=56 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=35 +flags=1 +start=56 +end=60 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=36 +flags=1 +start=60 +end=64 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=37 +flags=1 +start=64 +end=68 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=38 +flags=1 +start=68 +end=72 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +4 +256 +256 +[TRK0] +ID=39 +flags=1 +start=72 +end=77 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +5 +256 +256 +[TRK0] +ID=40 +flags=1 +start=77 +end=89 +rBand=32 +panBand= +colr=16777215 +settings=0 +aliasing=0 +shadow=0 +reverKey=0 +maskonly=0 +type=0 +garbage=0,0,117,0,117,87,0,87 +enable=0 +state=0 +flags=0 +exclusive=0 +hasreverse=0 +hasedges=0 +hasstart=0 +hasend=0 +src=0 +reverse=0 +edgealias=0 +s%=0 +e%=0 +edgethick=0 +edgecolr=0 +startpt=0,0 +endpt=0,0 +midpt=0,0 +fxspecs= +iconHand= +vidfilters= +audfilters= +useCount=0 +motionRecHand= +matteID=0 +specflags=0 +gain=0 +outofsync=0 +blendrate=0 +locked=0 +clipH=185 +[RBND] +max=256 +numpts=2 +cline=0 +useAud=0 +bandtype=2 +[RBPT] +0 +256 +256 +12 +256 +256 +[TRK1] +0 +[TRK2] +0 +[TRK3] +0 +[TRK4] +0 +[TRK5] +0 +[TRK6] +0 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=34 +sib.prevID=0 +sib.nextID=0 +clipID=1 +fileID=238 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=35 +sib.prevID=0 +sib.nextID=0 +clipID=2 +fileID=239 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=36 +sib.prevID=0 +sib.nextID=0 +clipID=3 +fileID=240 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=37 +sib.prevID=0 +sib.nextID=0 +clipID=4 +fileID=241 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=38 +sib.prevID=0 +sib.nextID=0 +clipID=5 +fileID=242 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=39 +sib.prevID=0 +sib.nextID=0 +clipID=6 +fileID=243 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=40 +sib.prevID=0 +sib.nextID=0 +clipID=7 +fileID=244 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=142 +sib.prevID=0 +sib.nextID=0 +clipID=8 +fileID=245 +users=3 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209705,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=6 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=22 +sib.prevID=0 +sib.nextID=0 +clipID=9 +fileID=246 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=145 +sib.prevID=0 +sib.nextID=0 +clipID=10 +fileID=247 +users=3 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=24 +sib.prevID=0 +sib.nextID=0 +clipID=11 +fileID=248 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=148 +sib.prevID=0 +sib.nextID=0 +clipID=12 +fileID=249 +users=3 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=26 +sib.prevID=0 +sib.nextID=0 +clipID=13 +fileID=250 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=151 +sib.prevID=0 +sib.nextID=0 +clipID=14 +fileID=251 +users=3 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=28 +sib.prevID=0 +sib.nextID=0 +clipID=15 +fileID=252 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=154 +sib.prevID=0 +sib.nextID=0 +clipID=16 +fileID=253 +users=3 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=30 +sib.prevID=0 +sib.nextID=0 +clipID=17 +fileID=254 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=157 +sib.prevID=0 +sib.nextID=0 +clipID=18 +fileID=255 +users=3 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=32 +sib.prevID=0 +sib.nextID=0 +clipID=19 +fileID=256 +users=2 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=0 +childID=33 +sib.prevID=0 +sib.nextID=0 +clipID=20 +fileID=257 +users=9 +pubChildren=0 +backwards=0 +revision=1 +revcount=1 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=8 +childID=0 +sib.prevID=142 +sib.nextID=0 +clipID=21 +fileID=245 +users=2 +pubChildren=0 +backwards=0 +revision=6 +revcount=6 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=9 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=22 +fileID=246 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=10 +childID=0 +sib.prevID=145 +sib.nextID=0 +clipID=23 +fileID=247 +users=2 +pubChildren=0 +backwards=0 +revision=5 +revcount=5 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=11 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=24 +fileID=248 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=12 +childID=0 +sib.prevID=148 +sib.nextID=0 +clipID=25 +fileID=249 +users=2 +pubChildren=0 +backwards=0 +revision=5 +revcount=5 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=13 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=26 +fileID=250 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=14 +childID=0 +sib.prevID=151 +sib.nextID=0 +clipID=27 +fileID=251 +users=2 +pubChildren=0 +backwards=0 +revision=5 +revcount=5 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=15 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=28 +fileID=252 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=16 +childID=0 +sib.prevID=154 +sib.nextID=0 +clipID=29 +fileID=253 +users=2 +pubChildren=0 +backwards=0 +revision=5 +revcount=5 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=17 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=30 +fileID=254 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=18 +childID=0 +sib.prevID=157 +sib.nextID=0 +clipID=31 +fileID=255 +users=2 +pubChildren=0 +backwards=0 +revision=5 +revcount=5 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=19 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=32 +fileID=256 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=20 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=33 +fileID=257 +users=2 +pubChildren=0 +backwards=0 +revision=4 +revcount=4 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=1 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=34 +fileID=238 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=2 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=35 +fileID=239 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=3 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=36 +fileID=240 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=4 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=37 +fileID=241 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=5 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=38 +fileID=242 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209704,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=5 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=6 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=39 +fileID=243 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209705,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=6 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLIP] +magicS=-1412567314 +parentID=7 +childID=0 +sib.prevID=0 +sib.nextID=0 +clipID=40 +fileID=244 +users=2 +pubChildren=0 +backwards=0 +revision=2 +revcount=2 +rate=100.000000 +markers=209700,209714,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +markIn=-1 +markOut=-1 +tdb.value=15 +tdb.scale=30 +tdb.samp=1 +links.prevID=0 +links.nextID=0 +lockaspect=0 +data= +mediaType=1 +title= +aspectcolor=0 +markcount=0 +moremarkers=0 +fileH=488 +magicE=-1412567314 +[CLPA] +clipID=1 +aspectcolor=0 +[CLPA] +clipID=2 +aspectcolor=0 +[CLPA] +clipID=3 +aspectcolor=0 +[CLPA] +clipID=4 +aspectcolor=0 +[CLPA] +clipID=5 +aspectcolor=0 +[CLPA] +clipID=6 +aspectcolor=0 +[CLPA] +clipID=7 +aspectcolor=0 +[CLPA] +clipID=8 +aspectcolor=0 +[CLPA] +clipID=9 +aspectcolor=0 +[CLPA] +clipID=10 +aspectcolor=0 +[CLPA] +clipID=11 +aspectcolor=0 +[CLPA] +clipID=12 +aspectcolor=0 +[CLPA] +clipID=13 +aspectcolor=0 +[CLPA] +clipID=14 +aspectcolor=0 +[CLPA] +clipID=15 +aspectcolor=0 +[CLPA] +clipID=16 +aspectcolor=0 +[CLPA] +clipID=17 +aspectcolor=0 +[CLPA] +clipID=18 +aspectcolor=0 +[CLPA] +clipID=19 +aspectcolor=0 +[CLPA] +clipID=20 +aspectcolor=0 +[CLPA] +clipID=21 +aspectcolor=0 +[CLPA] +clipID=22 +aspectcolor=0 +[CLPA] +clipID=23 +aspectcolor=0 +[CLPA] +clipID=24 +aspectcolor=0 +[CLPA] +clipID=25 +aspectcolor=0 +[CLPA] +clipID=26 +aspectcolor=0 +[CLPA] +clipID=27 +aspectcolor=0 +[CLPA] +clipID=28 +aspectcolor=0 +[CLPA] +clipID=29 +aspectcolor=0 +[CLPA] +clipID=30 +aspectcolor=0 +[CLPA] +clipID=31 +aspectcolor=0 +[CLPA] +clipID=32 +aspectcolor=0 +[CLPA] +clipID=33 +aspectcolor=0 +[CLPA] +clipID=34 +aspectcolor=0 +[CLPA] +clipID=35 +aspectcolor=0 +[CLPA] +clipID=36 +aspectcolor=0 +[CLPA] +clipID=37 +aspectcolor=0 +[CLPA] +clipID=38 +aspectcolor=0 +[CLPA] +clipID=39 +aspectcolor=0 +[CLPA] +clipID=40 +aspectcolor=0 +[FILE] +fileID=238 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final2\\01.bmp +[PRID] +fileID=238 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final2 +[FILE] +fileID=239 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final2\\02.bmp +[PRID] +fileID=239 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final2 +[FILE] +fileID=240 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final2\\03.bmp +[PRID] +fileID=240 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final2 +[FILE] +fileID=241 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final2\\04.bmp +[PRID] +fileID=241 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final2 +[FILE] +fileID=242 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final2\\05.bmp +[PRID] +fileID=242 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final2 +[FILE] +fileID=243 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final2\\06.bmp +[PRID] +fileID=243 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final2 +[FILE] +fileID=244 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final2\\07.bmp +[PRID] +fileID=244 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final2 +[FILE] +fileID=245 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1145651778 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc01.bmp +[PRID] +fileID=245 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1145651778 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[FILE] +fileID=246 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc04.bmp +[PRID] +fileID=246 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[FILE] +fileID=247 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1145651778 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc07.bmp +[PRID] +fileID=247 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1145651778 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[FILE] +fileID=248 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc10.bmp +[PRID] +fileID=248 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[FILE] +fileID=249 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1145651778 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc13.bmp +[PRID] +fileID=249 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1145651778 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[FILE] +fileID=250 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc16.bmp +[PRID] +fileID=250 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[FILE] +fileID=251 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1145651778 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc19.bmp +[PRID] +fileID=251 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1145651778 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[FILE] +fileID=252 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc22.bmp +[PRID] +fileID=252 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[FILE] +fileID=253 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1145651778 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc25.bmp +[PRID] +fileID=253 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1145651778 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[FILE] +fileID=254 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc28.bmp +[PRID] +fileID=254 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[FILE] +fileID=255 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1145651778 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc31.bmp +[PRID] +fileID=255 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1145651778 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[FILE] +fileID=256 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1111640388 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc34.bmp +[PRID] +fileID=256 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1111640388 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[FILE] +fileID=257 +param=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +filetype=1145651778 +vname=0 +fname=0 +isframestore=0 +prefLength=0 +mediaType=1 +prefHandle= +title= +[FNAM] +fname=E:\\Projects\\NightSec\\Encrpyt\\Final\\enc36.bmp +[PRID] +fileID=257 +[FDAT] +frame=0,0,112,50 +audvalue=0 +audscale=0 +audsamp=0 +vidvalue=335544 +vidscale=24 +vidsamp=1 +depth=32 +flags=1 +audflags=0 +pixelAspect=0 +fieldType=0 +fieldsStacked=0 +hasPulldown=0 +pulldownPhase=0 +alphaType=0 +matteColor=0 +alphaInverted=0 +isVectors=0 +drawsExternal=0 +dontObscure=0 +noDuration=0 +isFramestore=0 +fType=1145651778 +timecode= +reelname= +vname=E:\\Projects\\NightSec\\Encrpyt\\Final +[TRKI] +theTrack= +active=1 +locked=0 +output=1 +shy=0 +name=-1 +linked=0 +hilitesection=-1 +type=-16384 +mapping=3 +disabled=0 +selected=0 +[TRKI] +theTrack= +active=0 +locked=0 +output=1 +shy=0 +name=-1 +linked=0 +hilitesection=-1 +type=-16384 +mapping=3 +disabled=0 +selected=0 +[TRKI] +theTrack= +active=0 +locked=0 +output=1 +shy=0 +name=-1 +linked=0 +hilitesection=-1 +type=-28672 +mapping=12 +disabled=0 +selected=0 +[TRKI] +theTrack= +active=0 +locked=0 +output=1 +shy=0 +name=-1 +linked=0 +hilitesection=-1 +type=8192 +mapping=0 +disabled=0 +selected=0 +[TRKI] +theTrack= +active=1 +locked=0 +output=1 +shy=0 +name=-1 +linked=0 +hilitesection=-1 +type=128 +mapping=0 +disabled=0 +selected=0 +[TRKI] +theTrack= +active=0 +locked=0 +output=1 +shy=0 +name=-1 +linked=0 +hilitesection=-1 +type=128 +mapping=0 +disabled=0 +selected=0 +[TRKI] +theTrack= +active=0 +locked=0 +output=1 +shy=0 +name=-1 +linked=0 +hilitesection=-1 +type=128 +mapping=0 +disabled=0 +selected=0 +[COLL] +1 +[COLL] +1 +[COLL] +1 +[COLL] +1 +[COLL] +1 +[COLL] +1 +[COLL] +1 +[PFP0] +time=0 +tag=0 +size=3 +copies=0 +mode=0 +snapto=0 +hide=0 +findin=0 +f.comment=Comment +f.l1=Label 1 +f.l2=Label 2 +f.l3=Label 3 +box=42,1,191,13,0,0,0,0,0,0,0,0,193,1,253,13,319,1,376,13,378,1,527,13,529,1,591,13,593,1,655,13,255,1,317,13,0,0,0,0,0,0,0,0,0,0,0,0,657,1,806,13,0,0,0,0,0,0,0,0,0,0,0,0 +order=0,3,8,4,5,6,7,12,-1,-1,-1,-1,-1,-1,-1,-1 +sortmode=999 +prefsort=0 +value=1 +scale=30 +samp=1 +val=1 +scale=22050 +samp=1 +sort=0 +spare= +[PFC0] +5 +0 +89 +-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +0 +0 +25 +1 +1 +22050 +1 +0 +0 +0 +0 +0 +1 +1 +1 +0 +1 +1 +0 +1 +1 +1 +1 +0 +1 +1 +0 +1 +0 +131096 +2 +5 +5 +5 +5 +5 +0,0,0,0,0,0 +0,0,0,0,0,0,0,0 +[TMP1] +[PTYP] +filetype=1096173910 +classid=1061109567 +compilerprefs= +samplesize=1 +scale=25 +timeformat=131097 +projectlength=10800000 +doaudio=1 +dovideo=1 +range=0 +openwhendone=1 +reserved1=0 +reserved2=0 +[PVID] +subtype=1162629709 +subtypeprefs= +width=112 +height=50 +samplesize=1 +scale=5 +quality=100 +depth=4 +fieldtype=0 +aspect43=0 +paletteType=0 +reserved1=0 +reserved2=0 +palette=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +[ASET] +subtype=1380013856 +audrate=22050 +audsamplesize=1 +audstereo=1 +interleave=0 +resampleQ=0 +dither=0 +logfade=0 +reserved1=0 +reserved2=0 +[DRAT] +datarate=1000 +comppct=5 +forcerecomp=0 +usedatarate=0 +usecomppct=0 +reserved1=0 +reserved2=0 +[KFRM] +keyframeevery=15 +atmarkers=0 +atedits=0 +dokeyframeevery=0 +framesatmarkers=0 +reserved1=0 +reserved2=0 +[RENO] +ignorevidfilters=0 +ignoreaudfilters=0 +ignorerubberbands=0 +expandstills=0 +reserved1=0 +reserved2=0 +[SPRC] +cropleft=0 +cropright=0 +croptop=0 +cropbottom=0 +gamma=0 +resizetocroprect=0 +noisefilter=0 +predinterlace=0 +bestresize=0 +reserved1=0 +reserved2=0 +[PCAP] +filetype=1096173910 +classID=1061109567 +scale=2997 +samplesize=100 +width=640 +height=480 +constrain=1 +useframesize=1 +abortondrops=0 +reportdrops=1 +decodeburnedtc=0 +usecaplimit=0 +log=0 +capvid=1 +capaud=1 +preroll=5 +caplim=600 +tcoffset=0 +subtype=1380013856 +audrate=44100 +audsamplesize=1 +audstereo=1 +capprefs= +reserved1=0 +reserved2=0 +[WPRJ] +left=12 +top=45 +width=240 +height=194 +visible=1 +filler=-62 +[WCMP] +left=30 +top=269 +width=901 +height=314 +visible=1 +filler=-62 +[WVEW] +left=7 +top=20 +width=160 +height=120 +visible=1 +filler=-62 diff --git a/Graphics/Animations/Final/open.psd b/Graphics/Animations/Final/open.psd new file mode 100644 index 0000000..ececd34 Binary files /dev/null and b/Graphics/Animations/Final/open.psd differ diff --git a/Graphics/Animations/Final2/01.bmp b/Graphics/Animations/Final2/01.bmp new file mode 100644 index 0000000..98064ba Binary files /dev/null and b/Graphics/Animations/Final2/01.bmp differ diff --git a/Graphics/Animations/Final2/02.bmp b/Graphics/Animations/Final2/02.bmp new file mode 100644 index 0000000..628c0b7 Binary files /dev/null and b/Graphics/Animations/Final2/02.bmp differ diff --git a/Graphics/Animations/Final2/03.bmp b/Graphics/Animations/Final2/03.bmp new file mode 100644 index 0000000..e3cca1d Binary files /dev/null and b/Graphics/Animations/Final2/03.bmp differ diff --git a/Graphics/Animations/Final2/04.bmp b/Graphics/Animations/Final2/04.bmp new file mode 100644 index 0000000..c9d13b2 Binary files /dev/null and b/Graphics/Animations/Final2/04.bmp differ diff --git a/Graphics/Animations/Final2/05.bmp b/Graphics/Animations/Final2/05.bmp new file mode 100644 index 0000000..663968e Binary files /dev/null and b/Graphics/Animations/Final2/05.bmp differ diff --git a/Graphics/Animations/Final2/06.bmp b/Graphics/Animations/Final2/06.bmp new file mode 100644 index 0000000..87e8c91 Binary files /dev/null and b/Graphics/Animations/Final2/06.bmp differ diff --git a/Graphics/Animations/Final2/07.bmp b/Graphics/Animations/Final2/07.bmp new file mode 100644 index 0000000..7f93f32 Binary files /dev/null and b/Graphics/Animations/Final2/07.bmp differ diff --git a/Graphics/Animations/Final2/closed.psd b/Graphics/Animations/Final2/closed.psd new file mode 100644 index 0000000..5d6de7c Binary files /dev/null and b/Graphics/Animations/Final2/closed.psd differ diff --git a/Graphics/Animations/Final2/output.avi b/Graphics/Animations/Final2/output.avi new file mode 100644 index 0000000..e3a5522 Binary files /dev/null and b/Graphics/Animations/Final2/output.avi differ diff --git a/Graphics/Animations/Final3/enc01.bmp b/Graphics/Animations/Final3/enc01.bmp new file mode 100644 index 0000000..ccd1343 Binary files /dev/null and b/Graphics/Animations/Final3/enc01.bmp differ diff --git a/Graphics/Animations/Final3/enc02.bmp b/Graphics/Animations/Final3/enc02.bmp new file mode 100644 index 0000000..542d000 Binary files /dev/null and b/Graphics/Animations/Final3/enc02.bmp differ diff --git a/Graphics/Animations/Final3/enc03.bmp b/Graphics/Animations/Final3/enc03.bmp new file mode 100644 index 0000000..e8ace97 Binary files /dev/null and b/Graphics/Animations/Final3/enc03.bmp differ diff --git a/Graphics/Animations/Final3/enc04.bmp b/Graphics/Animations/Final3/enc04.bmp new file mode 100644 index 0000000..2f84193 Binary files /dev/null and b/Graphics/Animations/Final3/enc04.bmp differ diff --git a/Graphics/Animations/Final3/enc05.bmp b/Graphics/Animations/Final3/enc05.bmp new file mode 100644 index 0000000..acf05ee Binary files /dev/null and b/Graphics/Animations/Final3/enc05.bmp differ diff --git a/Graphics/Animations/Final3/enc06.bmp b/Graphics/Animations/Final3/enc06.bmp new file mode 100644 index 0000000..80eeec8 Binary files /dev/null and b/Graphics/Animations/Final3/enc06.bmp differ diff --git a/Graphics/Animations/Final3/enc07.bmp b/Graphics/Animations/Final3/enc07.bmp new file mode 100644 index 0000000..82d8c74 Binary files /dev/null and b/Graphics/Animations/Final3/enc07.bmp differ diff --git a/Graphics/Animations/Final3/enc08.bmp b/Graphics/Animations/Final3/enc08.bmp new file mode 100644 index 0000000..e3b12e5 Binary files /dev/null and b/Graphics/Animations/Final3/enc08.bmp differ diff --git a/Graphics/Animations/Final3/enc09.bmp b/Graphics/Animations/Final3/enc09.bmp new file mode 100644 index 0000000..95239cd Binary files /dev/null and b/Graphics/Animations/Final3/enc09.bmp differ diff --git a/Graphics/Animations/Final3/enc10.bmp b/Graphics/Animations/Final3/enc10.bmp new file mode 100644 index 0000000..b687704 Binary files /dev/null and b/Graphics/Animations/Final3/enc10.bmp differ diff --git a/Graphics/Animations/Final3/enc11.bmp b/Graphics/Animations/Final3/enc11.bmp new file mode 100644 index 0000000..44423bf Binary files /dev/null and b/Graphics/Animations/Final3/enc11.bmp differ diff --git a/Graphics/Animations/Final3/enc12.bmp b/Graphics/Animations/Final3/enc12.bmp new file mode 100644 index 0000000..c923eb4 Binary files /dev/null and b/Graphics/Animations/Final3/enc12.bmp differ diff --git a/Graphics/Animations/Final3/enc13.bmp b/Graphics/Animations/Final3/enc13.bmp new file mode 100644 index 0000000..7eaab9c Binary files /dev/null and b/Graphics/Animations/Final3/enc13.bmp differ diff --git a/Graphics/Animations/Final3/enc14.bmp b/Graphics/Animations/Final3/enc14.bmp new file mode 100644 index 0000000..e48c1af Binary files /dev/null and b/Graphics/Animations/Final3/enc14.bmp differ diff --git a/Graphics/Animations/Final3/enc15.bmp b/Graphics/Animations/Final3/enc15.bmp new file mode 100644 index 0000000..ad53901 Binary files /dev/null and b/Graphics/Animations/Final3/enc15.bmp differ diff --git a/Graphics/Animations/Final3/enc16.bmp b/Graphics/Animations/Final3/enc16.bmp new file mode 100644 index 0000000..889cff8 Binary files /dev/null and b/Graphics/Animations/Final3/enc16.bmp differ diff --git a/Graphics/Animations/Final3/enc17.bmp b/Graphics/Animations/Final3/enc17.bmp new file mode 100644 index 0000000..a18b3e9 Binary files /dev/null and b/Graphics/Animations/Final3/enc17.bmp differ diff --git a/Graphics/Animations/Final3/enc18.bmp b/Graphics/Animations/Final3/enc18.bmp new file mode 100644 index 0000000..31d3a8b Binary files /dev/null and b/Graphics/Animations/Final3/enc18.bmp differ diff --git a/Graphics/Animations/Final3/enc19.bmp b/Graphics/Animations/Final3/enc19.bmp new file mode 100644 index 0000000..5265a15 Binary files /dev/null and b/Graphics/Animations/Final3/enc19.bmp differ diff --git a/Graphics/Animations/Final3/enc20.bmp b/Graphics/Animations/Final3/enc20.bmp new file mode 100644 index 0000000..ccd1343 Binary files /dev/null and b/Graphics/Animations/Final3/enc20.bmp differ diff --git a/Graphics/Animations/TAGSELEC.avi b/Graphics/Animations/TAGSELEC.avi new file mode 100644 index 0000000..a0cb46a Binary files /dev/null and b/Graphics/Animations/TAGSELEC.avi differ diff --git a/Graphics/Animations/blk.bmp b/Graphics/Animations/blk.bmp new file mode 100644 index 0000000..a645d84 Binary files /dev/null and b/Graphics/Animations/blk.bmp differ diff --git a/Graphics/Animations/edit_enc.avi b/Graphics/Animations/edit_enc.avi new file mode 100644 index 0000000..e4e321b Binary files /dev/null and b/Graphics/Animations/edit_enc.avi differ diff --git a/Graphics/Animations/enc.avi b/Graphics/Animations/enc.avi new file mode 100644 index 0000000..8a87819 Binary files /dev/null and b/Graphics/Animations/enc.avi differ diff --git a/Graphics/Animations/enc.bmp b/Graphics/Animations/enc.bmp new file mode 100644 index 0000000..704c9db Binary files /dev/null and b/Graphics/Animations/enc.bmp differ diff --git a/Graphics/Animations/enc01.bmp b/Graphics/Animations/enc01.bmp new file mode 100644 index 0000000..632321b Binary files /dev/null and b/Graphics/Animations/enc01.bmp differ diff --git a/Graphics/Animations/enc02.bmp b/Graphics/Animations/enc02.bmp new file mode 100644 index 0000000..632321b Binary files /dev/null and b/Graphics/Animations/enc02.bmp differ diff --git a/Graphics/Animations/enc03.bmp b/Graphics/Animations/enc03.bmp new file mode 100644 index 0000000..632321b Binary files /dev/null and b/Graphics/Animations/enc03.bmp differ diff --git a/Graphics/Animations/enc04.bmp b/Graphics/Animations/enc04.bmp new file mode 100644 index 0000000..7797c57 Binary files /dev/null and b/Graphics/Animations/enc04.bmp differ diff --git a/Graphics/Animations/enc05.bmp b/Graphics/Animations/enc05.bmp new file mode 100644 index 0000000..bcbcdcf Binary files /dev/null and b/Graphics/Animations/enc05.bmp differ diff --git a/Graphics/Animations/enc06.bmp b/Graphics/Animations/enc06.bmp new file mode 100644 index 0000000..6c62e91 Binary files /dev/null and b/Graphics/Animations/enc06.bmp differ diff --git a/Graphics/Animations/enc07.bmp b/Graphics/Animations/enc07.bmp new file mode 100644 index 0000000..756387f Binary files /dev/null and b/Graphics/Animations/enc07.bmp differ diff --git a/Graphics/Animations/enc08.bmp b/Graphics/Animations/enc08.bmp new file mode 100644 index 0000000..44123cd Binary files /dev/null and b/Graphics/Animations/enc08.bmp differ diff --git a/Graphics/Animations/enc09.bmp b/Graphics/Animations/enc09.bmp new file mode 100644 index 0000000..be23746 Binary files /dev/null and b/Graphics/Animations/enc09.bmp differ diff --git a/Graphics/Animations/enc10.bmp b/Graphics/Animations/enc10.bmp new file mode 100644 index 0000000..a645d84 Binary files /dev/null and b/Graphics/Animations/enc10.bmp differ diff --git a/Graphics/Animations/enc11.bmp b/Graphics/Animations/enc11.bmp new file mode 100644 index 0000000..a645d84 Binary files /dev/null and b/Graphics/Animations/enc11.bmp differ diff --git a/Graphics/Animations/enc_org.avi b/Graphics/Animations/enc_org.avi new file mode 100644 index 0000000..ee99d69 Binary files /dev/null and b/Graphics/Animations/enc_org.avi differ diff --git a/Graphics/Animations/open.bmp b/Graphics/Animations/open.bmp new file mode 100644 index 0000000..75e388e Binary files /dev/null and b/Graphics/Animations/open.bmp differ diff --git a/Graphics/nightsec_logo.tif b/Graphics/nightsec_logo.tif new file mode 100644 index 0000000..0bbe6b3 Binary files /dev/null and b/Graphics/nightsec_logo.tif differ diff --git a/Graphics/setup.bmp b/Graphics/setup.bmp new file mode 100644 index 0000000..29df013 Binary files /dev/null and b/Graphics/setup.bmp differ diff --git a/Graphics/setup.psd b/Graphics/setup.psd new file mode 100644 index 0000000..93b0d88 Binary files /dev/null and b/Graphics/setup.psd differ diff --git a/Graphics/setup24.bmp b/Graphics/setup24.bmp new file mode 100644 index 0000000..731477d Binary files /dev/null and b/Graphics/setup24.bmp differ diff --git a/Help/Heading.bmp b/Help/Heading.bmp new file mode 100644 index 0000000..0f4ba8f Binary files /dev/null and b/Help/Heading.bmp differ diff --git a/Help/Help Matic/NIGHT SECURITY.HLP b/Help/Help Matic/NIGHT SECURITY.HLP new file mode 100644 index 0000000..a807384 Binary files /dev/null and b/Help/Help Matic/NIGHT SECURITY.HLP differ diff --git a/Help/Help Matic/Night Security.cnt b/Help/Help Matic/Night Security.cnt new file mode 100644 index 0000000..bf1bbed --- /dev/null +++ b/Help/Help Matic/Night Security.cnt @@ -0,0 +1,20 @@ +:Base Night Security.hlp>main +:Title Night Security +1 What Is Night Security?=Topic1 +1 Why do I need a Secure Shutdown?=Topic2 +1 Troubleshooting=Topic3 +1 How Do I... +2 ...fill out the Checklist=Topic4 +2 ...do the Shutdown=Topic5 +1 The Checklist +2 Windows Options=Topic9 +2 DOS Options=Topic8 +2 The Advanced Wizard=Topic6 +1 The Different Items +2 WXPY Shutdown=Topic7 +2 Empty Recycle Bin=Topic12 +2 Empty Temp Folder=Topic11 +2 Clear Temporary Internet Files=Topic10 +2 Check Hard Disk for Lost Clusters=Topic13 +2 Delete Swap File=Topic14 +2 Wipe Free Space=Topic15 diff --git a/Help/Help Matic/Night Security.hmp b/Help/Help Matic/Night Security.hmp new file mode 100644 index 0000000..05b8411 Binary files /dev/null and b/Help/Help Matic/Night Security.hmp differ diff --git a/Help/Help Matic/Night Security.hpj b/Help/Help Matic/Night Security.hpj new file mode 100644 index 0000000..723fcd0 --- /dev/null +++ b/Help/Help Matic/Night Security.hpj @@ -0,0 +1,36 @@ +[OPTIONS] +TITLE = Night Security +COPYRIGHT = Copyright 1998 The Family (Thailand) +COMPRESS = YES +CONTENTS = Topic1 +REPORT = YES +ERRORLOG = E:\Projects\Night Security\Help\Help Matic\Night Security.log + +[FILES] +E:\Projects\Night Security\Help\Help Matic\Night Security.rtf + +[BITMAPS] +del.bmp +heading.bmp +ins.bmp +nightsec.bmp + +[WINDOWS] +main="Night Security Help",(454,111,509,840),28164,(r14680063),(r0) + +[MAP] +Topic1 1 +Topic2 2 +Topic3 1000 +Topic4 131272 +Topic5 5 +Topic6 131172 +Topic7 7 +Topic8 131074 +Topic9 131073 +Topic10 10 +Topic11 11 +Topic12 12 +Topic13 13 +Topic14 14 +Topic15 15 diff --git a/Help/Help Matic/Night Security.log b/Help/Help Matic/Night Security.log new file mode 100644 index 0000000..c18503f --- /dev/null +++ b/Help/Help Matic/Night Security.log @@ -0,0 +1,15 @@ +Microsoft (R) Help Compiler +HCRTF 4.03.0002 +Copyright (c) Microsoft Corp 1990 - 1995. All rights reserved. +night security.hpj +15 Topics +13 Jumps +20 Keywords +7 Bitmaps + + +Created e:\projects\night security\help\help matic\night security.hlp, 28,039 bytes +Bitmaps: 1,663 bytes +Phrase+Zeck compression decreased help file by 10,813 bytes. +Compile time: 0 minutes, 0 seconds +0 notes, 0 warnings diff --git a/Help/Help Matic/Night Security.rtf b/Help/Help Matic/Night Security.rtf new file mode 100644 index 0000000..0f97b01 --- /dev/null +++ b/Help/Help Matic/Night Security.rtf @@ -0,0 +1,381 @@ +{\rtf1\ansi\deff0\deftab720 +{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 Tahoma;}{\f3\fswiss\fprq2 Arial;}{\f4\fswiss\fprq2 System;}{\f5\fswiss\fprq2 Haettenschweiler;}{\f6\fmodern\fprq1 Courier New;}} +{\colortbl\red0\green0\blue0;\red11\green8\blue125;\red223\green223\blue223;\red0\green128\blue128;} +#{\footnote Topic1} +${\footnote What Is Night Security?} +K{\footnote WXPY Shutdown} +\deflang1033\pard\plain\f5\fs44\cf2 \keepn \{bmc heading.bmp \} Night Security Help\plain\f2\fs18\cf0 \par\pard \plain\f2\fs18 +\par To learn more about using help press F1 now. +\par +\par \plain\f3\fs28\b \{bmc nightsec.bmp \} What is Night Security? +\par \pard\li425\plain\f2\fs18 Night Security is a program that sets up your entire shutdown for you without you having to do much. +\par +\par (For more information on why it's a good idea to have a shutdown see \plain\lang1024\f2\fs18 {\uldb Why do I need a Secure Shutdown}{\v Topic2}) +\par \plain\f2\fs18 +\par The Night Security Checklist lets you select the different items you want it to do.\plain\lang1024\f2\fs18 {\uldb Click here}{\v Topic4} \plain\f2\fs18 for more info on setting up your Checklist. +\par +\par Secure Shutdown 'does' the Security on your computer running all the different items you checked in your checklist. \plain\lang1024\f2\fs18 {\uldb Click here}{\v Topic5} \plain\f2\fs18 for more info on running it. +\par \pard\plain\f2\fs18 +\par \plain\lang1024\f2\fs18 +\par \plain\f3\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic2} +${\footnote Why Do I Need a Secure Shutdown} +\deflang1033\pard\plain\f5\fs44\cf2 \keepn \{bmc heading.bmp \} Why do I need a Secure Shutdown?\plain\f2\fs18\cf0 \par\pard \plain\f5\fs36\cf3 +\par \plain\f2\fs18 As mentioned in the Charter: \tab +\par +\par \pard\li360\tx1134\tx2552\plain\lang1024\f6\fs18 [9.] C. Computer files (other than programs) must be kept encrypted, and be "wiped" after they have been erased. +\par \pard\li851\tx1134\tx2552\plain\lang1024\f6\fs18 +\par \pard\plain\f2\fs18 In other words you need to encrypt all your data and make sure that the unencrypted data isn't hanging around on your hard disk somewhere. This is possible in all sorts of ways, here's some of the most common: +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f2\fs18 \{bmct onestep.bmp\}\tab For starters if a file is in you Recycle Bin anyone can get it out until it's actually been emptied. The \plain\lang1024\f2\fs18\b Empty Recycle Bin\plain\lang1024\f2\fs18 Item on the checklist can take care of this one. +\par \tab ({\uldb more info}{\v Topic12}) +\par +\par \{bmct onestep.bmp\}\tab When files are deleted they aren't actually removed from your hard disk even if you empty your recycle bin. Just the name is removed from a sorta index. For this reason you need to make sure to wipe the free space on your hard disk every night. The \plain\lang1024\f2\fs18\b Wipe Free Space\plain\lang1024\f2\fs18 Item in the checklist does this for you. +\par \tab ({\uldb more info}{\v Topic15}) +\par +\par \{bmct onestep.bmp\}\tab A lot of programs create temporary files when they run. Most of the time they remove those files. But if something goes funny (your computer crashes etc\'85) those files can still be around. The \plain\lang1024\f2\fs18\b Empty Temp Folder \plain\lang1024\f2\fs18 item on the checklist will clear those out for you. +\par \tab ({\uldb more info}{\v Topic11}) +\par +\par \{bmct onestep.bmp\}\tab If you're on a Network, then data you view on your Intranet can still be on your computer in the 'Temporary Internet Files' Folder. The \plain\lang1024\f2\fs18\b Clear Temporary Internet Files\plain\lang1024\f2\fs18 item can clear'm out. +\par \tab ({\uldb more info}{\v Topic10}) +\par +\par \{bmct onestep.bmp\}\tab Windows uses a file called a swap file to provide memory to programs if there isn't enough. Don't worry about the details, but there can be unencrypted data hiding in that file. The \plain\lang1024\f2\fs18\b Delete Windows Swap File\plain\lang1024\f2\fs18 item on the checklist will take care of that one. +\par \tab ({\uldb more info}{\v Topic14}) +\par +\par \{bmct onestep.bmp\}\tab Sometimes if you've had a computer crash there can be data hiding out in little nooks and crannies of your computer called lost clusters. To make sure they're cleared up check off the \plain\lang1024\f2\fs18\b Check Hard Disk for Lost Clusters\plain\lang1024\f2\fs18 item on the checklist. +\par \tab ({\uldb more info}{\v Topic13}) +\par +\par \pard\plain\f2\fs18 The WXPY Shutdown does a great job of encrypting all your files and backing them up, but setting up a batch file system for wiping your hard drive outside of Windows and taking care of all the rest of the above weird stuff is a little complex. +\par +\par Now you don't have to worry about any of those specifics, just fill out your {\uldb checklist}{\v Topic4}.\plain\f3\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic3} +${\footnote Troubleshooting} +K{\footnote Read Only Files;Troubleshooting; WXPY; Windows NT;} +A{\footnote Troubleshooting} +\deflang1033\pard\plain\f5\fs44\cf2 \keepn \{bmc heading.bmp \} Troubleshooting\plain\f2\fs18\cf0 \par\pard \plain\f3\fs24\b +\par \plain\lang1024\f3\fs28\b \{bmct open.bmp\}\plain\f3\fs24\b Hey, the Checklist is empty +\par +\par \plain\f2\fs18 In most cases uninstalling the program and reinstalling it will fix this problem. Here's how: +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f2\fs18\b 1\plain\lang1024\f2\fs18 \tab Choose 'Add/Remove Programs' from the Control Panel. {\uldb \{bmct shortcut.bmp\}}{\v !ControlPanel(appwiz.cpl)} +\par \plain\lang1024\f2\fs18\b 2\plain\lang1024\f2\fs18 \tab From the list of programs choose 'Night Security 2.0,' and click the 'Add/Remove\'85' button. +\par \plain\lang1024\f2\fs18\b 3\plain\lang1024\f2\fs18 \tab After it's done reboot and then run the Setup program on the Night Security Install Disk +\par +\par +\par +\par \pard\plain\lang1024\f3\fs28\b \{bmct open.bmp\}\plain\f3\fs24 \plain\f3\fs24\b It keeps stopping while encrypting my files +\par \plain\f2\fs18 +\par Menu Extension won't encrypt files that are read only, and stops to tell you about it. Here's how to change a file so it's not read only. +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f2\fs18\b 1\plain\lang1024\f2\fs18 \tab Note the name of the file that it stops on, and find that same file in Explorer. +\par \plain\lang1024\f2\fs18\b 2\plain\lang1024\f2\fs18 \tab Right click on the file and select 'Properties' from the menu that pops up. +\par \plain\lang1024\f2\fs18\b 3\plain\lang1024\f2\fs18 \tab Make sure the 'Read Only' check box isn't checked. +\par \plain\lang1024\f2\fs18\b 4\plain\lang1024\f2\fs18 \tab Click 'OK' to save your changes +\par \pard\plain\f2\fs18 +\par One other thing to keep in mind is that you have any files open, it'll also stop on them. Make sure to close all your programs before starting your Secure Shutdown. +\par +\par +\par +\par \plain\lang1024\f3\fs28\b \{bmct open.bmp\}\plain\f3\fs24 \plain\f3\fs24\b Man, this sure takes a long time to wipe +\par \plain\f2\fs18 +\par Check how much free space you have on your hard disk. If there's lots over 500 MB or so you may want to copy some ballast over to fill it up. These files would only be temporarily on your hard disk, so when you need the space you can remove them. +\par +\par You could try copying some folders from the HomeARC. +\par \plain\lang1024\f2\fs18\b +\par +\par +\par \plain\lang1024\f3\fs28\b \{bmct open.bmp\}\plain\f3\fs24 \plain\f3\fs24\b It's telling me it can't find WXPY +\par \plain\f2\fs18 +\par T\plain\lang1024\f2\fs18 ry Reinstalling Menu Extension. \plain\lang1024\f2\fs18\b +\par \plain\f3\fs24 +\par \pard\li567\fi-425\tx567\plain\lang1024\f2\fs18\b 1\plain\lang1024\f2\fs18 \tab Choose 'Add/Remove Programs' from the Control Panel. {\uldb \{bmct shortcut.bmp\}}{\v !ControlPanel(appwiz.cpl)} +\par \plain\lang1024\f2\fs18\b 2\plain\lang1024\f2\fs18 \tab From the list of programs choose 'Menu Extension,' and click the 'Add/Remove\'85' button. +\par \plain\lang1024\f2\fs18\b 3\plain\lang1024\f2\fs18 \tab After it's done reboot. +\par \plain\lang1024\f2\fs18\b 4\plain\lang1024\f2\fs18 \tab Insert the HomeARC Setup CD and select 'Menu Extension' setup from the window that pops up. +\par \pard\plain\lang1024\f2\fs18\b +\par +\par +\par \plain\lang1024\f3\fs28\b \{bmct open.bmp\}\plain\f3\fs24 \plain\f3\fs24\b I just installed Menu Extension, but I get a big white dialog box whenever I try to XPY something or do my Secure Shutdown +\par \plain\f2\fs18 +\par This can happen, if you haven't installed the HomeARC but are trying to use Menu Extension. (If you're using Windows NT see the next question) +\par +\par The simplest solution is just to install the HomeARC and after you reboot everything should work fine. If for some reason you can't do that, or it doesn't work, try the following.\plain\lang1024\f2\fs18\b +\par \plain\f3\fs24 +\par \pard\li567\fi-425\tx567\plain\lang1024\f2\fs18\b 1\plain\lang1024\f2\fs18 \tab Copy the file 'memctrl.com' from your HomeARC 98 Setup CD to the root folder on your hard disk (ie: C:\\). You'll find this file in the '\\Win95\\Util' folder on the CD. +\par \plain\lang1024\f2\fs18\b 2\plain\lang1024\f2\fs18 \tab Open your 'autoexec.bat' file using notepad. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(notepad.exe,c:\\autoexec.bat)} +\par \plain\lang1024\f2\fs18\b 3\plain\lang1024\f2\fs18 \tab Add the following line to the bottom of the file: +\par +\par \tab \plain\lang1024\f6\fs18 C:\\MEMCTRL.COM /i\plain\lang1024\f2\fs18 +\par +\par \plain\lang1024\f2\fs18\b 4\plain\lang1024\f2\fs18 \tab Save the file and reboot your computer. +\par \pard\plain\f3\fs24 +\par +\par +\par \plain\lang1024\f3\fs28\b \{bmct open.bmp\}\plain\f3\fs24 \plain\f3\fs24\b Can I run Night Security on Windows NT? +\par \plain\f2\fs18 +\par Y\plain\lang1024\f2\fs18 es, Night Security is completely compatible with Windows NT 4.0 and higher. +\par +\par Some of the DOS options, like 'Delete Swap File' won't run because you just can't do that on Windows NT. The remainder of the DOS Options that work run in a DOS Window, since you can't exit to DOS under Windows NT. +\par +\par On the other hand the current version of Menu Extension, which Night Security uses for it's encryption, is not compatible. So you have to do your own encryption before starting the Secure Shutdown. +\par \plain\f3\fs24 +\par \pard\li567\fi-425\tx567\plain\f3\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic4} +${\footnote Your Night Security Checklist} +K{\footnote Menu Extension;WXPY;Night Security Checklist} +\deflang1024\pard\plain\lang1033\f5\fs44\cf2 \keepn \{bmc heading.bmp \} Your Night Security Checklist\plain\lang1033\f2\fs18\cf0 \par\pard \plain\lang1033\f5\fs36\cf3 +\par \plain\lang1033\f2\fs18 Here's how to fill out your checklist. The following only needs to be done once. Since Night Security uses the program 'Menu Extension' that comes with the HomeARC to encrypt your files, you'll need to have that installed. See the {\uldb Troubleshooting}{\v Topic3} page for info on how to install it. +\par +\par \plain\f3\fs28\b \{bmct open.bmp\} \plain\lang1033\f3\fs28\b Setting up Menu Extension +\par \plain\lang1033\f2\fs18 First you have to tell Menu Extension which files you want to encrypt: +\par +\par \pard\li567\fi-425\tx567\plain\f2\fs18\b 1\plain\f2\fs18 \tab Choose 'Programs | Heavenly Helpers | Menu Extension' from the Start Menu. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(menuext.exe)} +\par \plain\f2\fs18\b 2\plain\f2\fs18 \tab Click the 'WXPY Options' button, and in the box that pops up click the 'Shutdown XPY' tab. +\par \plain\f2\fs18\b 3\plain\f2\fs18 \tab By clicking the 'Browse' button you can select the folders you want to encrypt. +\par \plain\f2\fs18\b 4\plain\f2\fs18 \tab Click 'OK' in all the boxes after you're done. +\par +\par \pard\plain\f3\fs28\b \{bmct open.bmp\} \plain\lang1033\f3\fs28\b Filling out the Checklist +\par \plain\lang1033\f2\fs18 Now it's time to fill out your Night Security Checklist and tell it what exactly you want it to do. For more info on the different options see 'Why do I need a Secure Shutdown.' +\par +\par \pard\li567\fi-425\tx567\plain\f2\fs18\b 1\plain\f2\fs18 \tab Choose 'Programs | Night Security | Night Security Checklist' from the Start Menu. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(secsetup.exe)} +\par \plain\f2\fs18\b 2\plain\f2\fs18 \tab Click the 'Next' button and you'll be presented with a list of all the different things that Night Security can do while still in Windows before actually shutting down your computer. Normally you'd select all of them. +\par \plain\f2\fs18\b 3\plain\f2\fs18 \tab After you're done there click the 'Next' button to go to the list of things that happen after exiting Windows. As above normally you'd select all these options. The Wipe Free Space option is especially important. +\par \plain\f2\fs18\b 4\plain\f2\fs18 \tab Click the 'Finish' button to save your choices. +\par +\par \pard\plain\lang1033\f3\fs24 +\par \plain\lang1033\f2\fs18\cf0 +\par \{button , ALink(Items)\} \plain\lang1033\f2\fs18\cf0\b Checklist Items\plain\f0\fs20 +\par \plain\lang1033\f3\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic5} +${\footnote Using the Secure Shutdown} +K{\footnote Secure Shutdown} +\deflang1033\pard\plain\f5\fs44\cf2 \keepn \{bmc heading.bmp \} Using the Secure Shutdown\plain\f2\fs20\cf2 +\par (ie: 'doing security')\plain\f2\fs18\cf0 \par\pard \plain\f5\fs36\cf3 +\par \plain\f2\fs18 Here's how you'll use the Secure Shutdown every night. Depending on your computer this could take between 5 and 20 minutes. +\par \plain\lang1024\f3\fs28\b +\par \{bmct open.bmp\}\plain\f3\fs28\b Doing Security +\par \plain\f2\fs18 +\par \pard\li567\fi-567\tx567\plain\f2\fs18\b 1\plain\f2\fs18 \tab Make sure all your programs are closed. +\par \plain\f2\fs18\b 2\plain\f2\fs18 \tab Choose 'Secure Shutdown' from the top of your Start Menu. +\par \plain\f2\fs18\b 3\plain\f2\fs18 \tab If prompted enter your password twice. +\par +\par +\par \pard\plain\f2\fs18 Secure Shutdown will appear in the top left corner of your screen and a bunch of other boxes and progress bars will show up as it's doing it's work. After a while it'll shutdown Windows and run some different programs. By and by it should wipe your hard disk. +\par +\par Don't actually turn off your computer till you see the 'It's now safe to turn off your computer' message. +\par \pard\li425\plain\f2\fs18 +\par +\par \pard\plain\lang1024\f2\fs18\b \{button , JumpContext(1000)\} Problems? +\par \plain\f0\fs20 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic6} +${\footnote Advanced Wizard} +K{\footnote Advanced Wizard} +\deflang1033\pard\plain\f5\fs44\cf2 \keepn \{bmc heading.bmp \} The Advanced Wizard\plain\f2\fs18\cf0 \par\pard +\par The Advanced Wizard lets you tweak all the settings to your heart's content. +\par +\par You can also drag the different items options to change their order in the shutdown. However remember that it's almost always best to have the 'Wipe Free Space' item last. +\par +\par +\par \{button , ALink(Items)\} \plain\f2\fs18\cf0\b Checklist Items\plain\f3\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic7} +${\footnote WXPY Shutdown} +K{\footnote Checklist Items: Windows, WXPY Shutdown; WXPY} +A{\footnote Items} ++{\footnote items:010} +\deflang1033\pard\plain\f5\fs44\cf2 \keepn \{bmc heading.bmp \} WXPY Shutdown\plain\f2\fs18\cf0 \par\pard +\par \plain\lang1024\f2\fs18\cf0 This item encrypts your data and optionally backs it up. Night Security uses the Menu Extension program from the HomeARC for it's encryption and backup. +\par \plain\lang1024\f3\fs28\b +\par \{bmct open.bmp\} \plain\f3\fs28\b Setting up your WXPY Shutdown +\par \plain\f2\fs18 +\par First you have to tell Menu Extension which files you want to encrypt: +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f2\fs18\b 1\plain\lang1024\f2\fs18 \tab Choose 'Programs | Heavenly Helpers | Menu Extension' from the Start Menu. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(menuext.exe)} +\par \plain\lang1024\f2\fs18\b 2\plain\lang1024\f2\fs18 \tab Click the 'WXPY Options' button, and in the box that pops up click the 'Shutdown XPY' tab. +\par \plain\lang1024\f2\fs18\b 3\plain\lang1024\f2\fs18 \tab By clicking the 'Browse' button you can select the folders you want to encrypt. +\par \plain\lang1024\f2\fs18\b 4\plain\lang1024\f2\fs18 \tab Click 'OK' in all the boxes after you're done. +\par \tab \tab +\par +\par \pard\li425\fi-425\tx567\plain\lang1024\f3\fs28\b \{bmct open.bmp\} \plain\f3\fs28\b Advanced Properties +\par \plain\f2\fs18\cf0\b +\par Disable Password\plain\f2\fs18\cf0 +\par \tab Use this option to remove your password from memory after the encrypting is finished. If you don't turn off your computer and you password is still in memory other's can open your files, so it's a good idea to keep this set. +\par +\par \pard\plain\f2\fs18\cf0 +\par +\par \{button , ALink(Items)\} \plain\f2\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \pard\li425\fi-425\tx567\plain\f3\fs28\b +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic8} +${\footnote DOS Options} +K{\footnote Checklist Items: MS-DOS Mode, } +\deflang1033\pard\plain\f5\fs44\cf2 \keepn \{bmc heading.bmp \} DOS Options\plain\f2\fs18\cf0 \par\pard +\par The different items you select in the DOS Section of your checklist all get run after exiting Windows. These include things such as wiping the free space on your hard disk and other clean up tasks that can't (or shouldn't be) run in Windows. +\par +\par Remember that it's almost always best to have the 'Wipe Free Space' item enabled. That's the whole reason you do your shutdown. +\par +\par (See: {\uldb Why do I need a Secure Shutdown}{\v Topic2} for more info) +\par +\par +\par \{button , ALink(Items)\} \plain\f2\fs18\cf0\b Checklist Items\plain\f3\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic9} +${\footnote Windows Options} +K{\footnote Checklist Items: Windows} +\deflang1033\pard\plain\f5\fs44\cf2 \keepn \{bmc heading.bmp \} Windows Options\plain\f2\fs18\cf0 \par\pard +\par The different items you select in the Windows Section of your checklist all get run before actually exiting Windows. These include things such as encrypting your data, or emptying your Recycle Bin. +\par +\par Night Security uses 'Menu Extension' for it's encryption. {\uldb Here's}{\v Topic4} how to set that up. +\par +\par +\par \{button , ALink(Items)\} \plain\f2\fs18\cf0\b Checklist Items\plain\f3\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic10} +${\footnote Clear Temporary Internet Files} +K{\footnote Checklist Items: Windows, Clear Temporary Internet Files} +A{\footnote Items} ++{\footnote items:040} +\deflang1033\pard\plain\f5\fs44\cf2 \keepn \{bmc heading.bmp \} Clear Temporary Internet Files\plain\f2\fs18\cf0 \par\pard +\par \plain\lang1024\f2\fs18\cf0 Stored in your Temporary Internet Files folder is a cache of everything you browse in your web browser. If you're on a Network and use an Intranet, this item can be used to clear out any sensitive data you view. +\par +\par Also since your Temporary Internet Files folder can baloon in size this could also be used to help keep it trim. +\par +\par By default this item clears out all your Temporary Internet Files, however using the Advanced Properties you can specify which files to clear. +\par +\par (Note that this item might not be installed. If it doesn't appear in the list, rerun the Night Security Setup and make sure to choose 'Network Components.') +\par \plain\lang1024\f3\fs28\b +\par \{bmct open.bmp\} \plain\f3\fs28\b Advanced Properties +\par \plain\f2\fs18 +\par All the files in the Temporary Internet Files come from one server or another. In the Advanced Properties you can specify which servers' files you want to clear. This can be useful if you only want to clear sensitive information in the cache from one or two servers. +\par +\par \{bmc ins.bmp \}\tab +\par \pard\li360\plain\f2\fs18 Adds as server to the list. +\par \pard\plain\f2\fs18 +\par \{bmc del.bmp \} +\par \pard\li360\plain\f2\fs18 Removes a server or servers from the list. +\par \pard\plain\f2\fs18 +\par \plain\f2\fs18\b Clear All\plain\f2\fs18 +\par \pard\li360\plain\f2\fs18 Override the list of servers and clear everything (the default) +\par \pard\plain\f2\fs18 +\par \plain\f2\fs18\b Cookies +\par \pard\li360\plain\f2\fs18 This option clears cookies as well as other files from the cache. Usually you won't want to do this. +\par \pard\li567\fi-425\tx567\plain\f2\fs18 +\par \pard\li425\fi-425\tx567\plain\f3\fs28\b +\par \pard\plain\f2\fs18\cf0 +\par +\par \{button , ALink(Items)\} \plain\f2\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \pard\li425\fi-425\tx567\plain\f3\fs28\b +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic11} +${\footnote Empty Temp Folder} +K{\footnote Checklist Items: Windows, Empty Temp Folder} +A{\footnote Items} ++{\footnote items:030} +\deflang1024\pard\plain\lang1033\f5\fs44\cf2 \keepn \{bmc heading.bmp \} Empty Temp Folder\plain\lang1033\f2\fs18\cf0 \par\pard +\par \plain\f2\fs18\cf0 This item clears the folder where your temporary files are stored. +\par +\par \plain\f2\fs18 A lot of programs create temporary files when they run. Most of the time they remove those files. But if something goes funny (your computer crashes etc\'85) those files can still be around. \plain\f2\fs18\cf0 +\par +\par Usually this folder is located 'C:\\Windows\\Temp.' +\par +\par \plain\lang1033\f2\fs18\cf0 +\par +\par \{button , ALink(Items)\} \plain\lang1033\f2\fs18\cf0\b Other Checklist Items\plain\f0\fs20 +\par \plain\lang1033\f3\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic12} +${\footnote Empty Recycle Bin} +K{\footnote Checklist Items: Windows, Empty Recycle Bin} +A{\footnote Items} ++{\footnote items:020} +\deflang1024\pard\plain\lang1033\f5\fs44\cf2 \keepn \{bmc heading.bmp \} Empty Recycle Bin\plain\lang1033\f2\fs18\cf0 \par\pard +\par \plain\f2\fs18\cf0 Any files in your Recycle Bin can be easily recovered. It makes sense to clear it before wiping. +\par +\par However some people like to take out the trash themselves. Feel free to disable this one if you're one of those. +\par \plain\f3\fs28\b +\par \plain\f0\fs20 +\par \plain\lang1033\f2\fs18\cf0 \{button , ALink(Items)\} \plain\lang1033\f2\fs18\cf0\b Other Checklist Items\plain\f0\fs20 +\par +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic13} +${\footnote Check Hard Disk for Lost Clusters} +K{\footnote Checklist Items: MS-DOS Mode, Check Hard Disk for Lost Clusters} +A{\footnote Items} ++{\footnote items:050} +\deflang1033\pard\plain\f5\fs44\cf2 \keepn \{bmc heading.bmp \} Check Hard Disk for Lost Clusters\plain\f2\fs18\cf0 \par\pard +\par \plain\lang1024\f2\fs18 Sometimes if you've had a computer crash there can be data hiding out in little nooks and crannies of your computer called lost clusters. These are locations on the hard disk that are marked as used, but aren't linked up to any files. +\par +\par Because there can be sensitive data in them, and the Wipe Free Space item can't get to them, it's good to do this check. +\par \plain\lang1024\f3\fs28\b +\par \{bmct open.bmp\} \plain\f3\fs28\b Advanced Properties +\par \plain\f2\fs18 +\par \plain\f2\fs18\b Automatially Fix Errors\plain\f2\fs18 +\par \pard\li360\plain\f2\fs18 When this option is checked Scandisk will run automatically without any intervention from you. (the default) +\par \pard\plain\f2\fs18 +\par \plain\f2\fs18\b Delete Lost Clusters +\par \pard\li360\plain\f2\fs18 This option will remove any lost clusters and make the space available for Wipe Free Space to do it's clean up work. This is definitely recommended over the next option. +\par \pard\plain\f2\fs18 +\par \plain\f2\fs18\b Save Lost Clusters as Files +\par \pard\li360\plain\f2\fs18 This option will save the lost data instead of deleting it. It'll put it in files called 'file0001.chk' in the root folder of your hard disk. +\par \pard\li567\fi-425\tx567\plain\f2\fs18 +\par \pard\li425\fi-425\tx567\plain\f3\fs28\b +\par \pard\plain\f2\fs18\cf0 +\par \{button , ALink(Items)\} \plain\f2\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic14} +${\footnote Delete Swap File} +K{\footnote Checklist Items: MS-DOS Mode, Delete Swap File} +A{\footnote Items} ++{\footnote items:060} +\deflang1024\pard\plain\lang1033\f5\fs44\cf2 \keepn \{bmc heading.bmp \} Delete Swap File\plain\lang1033\f2\fs18\cf0 \par\pard +\par \plain\f2\fs18 Windows uses a file called a swap file to provide memory to programs if there isn't enough. Don't worry about the details, but there can be unencrypted data hiding in that file. +\par +\par It's good to leave this option enabled and remove this file before wiping. +\par +\par Windows will make a new file when it boots the next time, so don't worry about this messing things up\plain\f2\fs18\cf0 . +\par \plain\f3\fs28\b +\par \pard\li425\fi-425\tx567\plain\lang1033\f3\fs28\b +\par \pard\plain\lang1033\f2\fs18\cf0 \{button , ALink(Items)\} \plain\lang1033\f2\fs18\cf0\b Other Checklist Items\plain\f0\fs20 +\par +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic15} +${\footnote Wipe Free Space} +K{\footnote Checklist Items: MS-DOS Mode, Wipe Free Space} +A{\footnote Items} ++{\footnote items:070} +\deflang1024\pard\plain\lang1033\f5\fs44\cf2 \keepn \{bmc heading.bmp \} Wipe Free Space\plain\lang1033\f2\fs18\cf0 \par\pard +\par \plain\f2\fs18 Everytime a file is deleted it isn't actually removed from your hard disk even if you empty your Recycle Bin. Just the name is removed from a sorta index. For this reason you need to make sure to wipe the free space on your hard disk every night. +\par +\par \plain\f2\fs18\cf0 Also note that a lot of the other items on the checklist delete files (which aren't properly removed), so it makes sense to leave this item as the last one on the list. +\par +\par Depending on the size of your hard disk, the speed of your computer, and how hard you stare at the monitor (just kidding) this can take anywhere from 15 to 45 minutes. +\par \plain\f3\fs28\b +\par \{bmct open.bmp\} \plain\lang1033\f3\fs28\b Advanced Properties +\par \plain\lang1033\f2\fs18 +\par \pard\li360\plain\lang1033\f2\fs18 Normally this item wipes all the drives on your computer. If you have more than one and some of them really don't need to be wiped (ie: have no sensitive data on them) then you can deselect them. You should always wipe the hard disk you have Windows on, though (usually that's C:). +\par \pard\li425\fi-425\tx567\plain\lang1033\f3\fs28\b +\par +\par \pard\plain\lang1033\f2\fs18\cf0 \{button , ALink(Items)\} \plain\lang1033\f2\fs18\cf0\b Other Checklist Items\plain\f0\fs20 +\par \pard\li425\fi-425\tx567\plain\lang1033\f3\fs28\b +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +} diff --git a/Help/Help Matic/night security.GID b/Help/Help Matic/night security.GID new file mode 100644 index 0000000..7350815 Binary files /dev/null and b/Help/Help Matic/night security.GID differ diff --git a/Help/NIGHTSEC.GID b/Help/NIGHTSEC.GID new file mode 100644 index 0000000..9d151fe Binary files /dev/null and b/Help/NIGHTSEC.GID differ diff --git a/Help/NIGHTSEC.HLP b/Help/NIGHTSEC.HLP new file mode 100644 index 0000000..6ce64b4 Binary files /dev/null and b/Help/NIGHTSEC.HLP differ diff --git a/Help/NightSec.FTS b/Help/NightSec.FTS new file mode 100644 index 0000000..d44d70d Binary files /dev/null and b/Help/NightSec.FTS differ diff --git a/Help/NightSec.cnt b/Help/NightSec.cnt new file mode 100644 index 0000000..abb226d --- /dev/null +++ b/Help/NightSec.cnt @@ -0,0 +1,23 @@ +:Base NightSec.hlp>main +:Title Night Security +1 What Is Night Security?=Topic1 +1 Why do I need a Secure Shutdown?=Topic2 +1 Troubleshooting=Topic3 +1 How Do I... +2 ...fill out the Checklist=Topic4 +2 ...do the Shutdown=Topic5 +1 The Checklist +2 Night Security Options=Topic8 +2 The Advanced Checklist=Topic6 +1 The Different Items +2 Encrypt Data=Topic7 +2 Backup Data=Topic9 +2 Empty Recycle Bin=Topic12 +2 Empty Temp Folder=Topic11 +2 Clear Temporary Internet Files=Topic10 +2 Check Hard Disk for Lost Clusters=Topic13 +2 Delete Swap File=Topic14 +2 Wipe Free Space=Topic15 +1 The Shutdown +2 Secure Shutdown=Topic5 +2 The Log Window=Topic17 diff --git a/Help/NightSec.hmp b/Help/NightSec.hmp new file mode 100644 index 0000000..b13e259 Binary files /dev/null and b/Help/NightSec.hmp differ diff --git a/Help/NightSec.hpj b/Help/NightSec.hpj new file mode 100644 index 0000000..cc04533 --- /dev/null +++ b/Help/NightSec.hpj @@ -0,0 +1,74 @@ +[OPTIONS] +TITLE = Night Security +COPYRIGHT = Copyright 1998 The Family (Thailand) +COMPRESS = YES +CONTENTS = Topic1 +REPORT = YES +ERRORLOG = E:\Projects\NightSec\Help\NightSec.log + +[FILES] +E:\Projects\NightSec\Help\NightSec.rtf + +[BITMAPS] +del.bmp +heading.bmp +ins.bmp +nightsec.bmp + +[WINDOWS] +main="Night Security Help",(605,316,358,633),28164,(r14680063),(r0) + +[MAP] +Topic1 1 +Topic2 2000 +Topic3 1000 +Topic4 1006 +Topic5 1005 +Topic6 1003 +Topic7 7 +Topic8 1004 +Topic9 9 +Topic10 10 +Topic11 11 +Topic12 12 +Topic13 13 +Topic14 14 +Topic15 15 +Topic16 16 +Topic17 17 +Topic18 18 +Popup19 3001 +Popup20 3002 +Popup21 3003 +Popup22 3502 +Popup23 3501 +Popup24 4013 +Popup25 4008 +Popup26 4012 +Popup27 4009 +Popup28 4011 +Popup29 4010 +Popup30 4018 +Popup31 4017 +Popup32 4007 +Popup33 4001 +Popup34 4006 +Popup35 4004 +Popup36 4003 +Popup37 4002 +Popup38 4005 +Popup39 4016 +Popup40 4015 +Popup41 4014 +Popup42 4020 +Popup43 4019 +Popup44 4024 +Popup45 4021 +Popup46 4023 +Popup47 4022 +Popup48 501 +Popup49 502 +Popup50 503 +Popup51 5001 +Popup52 5002 +Popup53 5003 diff --git a/Help/NightSec.log b/Help/NightSec.log new file mode 100644 index 0000000..38da44f --- /dev/null +++ b/Help/NightSec.log @@ -0,0 +1,15 @@ +Microsoft (R) Help Compiler +HCRTF 4.03.0002 +Copyright (c) Microsoft Corp 1990 - 1995. All rights reserved. +NightSec.hpj +53 Topics +21 Jumps +33 Keywords +7 Bitmaps + + +Created E:\Projects\NightSec\Help\NightSec.hlp, 33,740 bytes +Bitmaps: 1,663 bytes +Hall+Zeck compression decreased help file by 14,907 bytes. +Compile time: 0 minutes, 0 seconds +0 notes, 0 warnings diff --git a/Help/NightSec.rtf b/Help/NightSec.rtf new file mode 100644 index 0000000..5a2b310 --- /dev/null +++ b/Help/NightSec.rtf @@ -0,0 +1,624 @@ +{\rtf1\ansi\deff0\deftab720 +{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 Haettenschweiler;}{\f3\fswiss\fprq2 Tahoma;}{\f4\fswiss\fprq2 Arial;}{\f5\fswiss\fprq2 System;}{\f6\fmodern\fprq1 Courier New;}} +{\colortbl\red0\green0\blue0;\red11\green8\blue125;\red223\green223\blue223;\red0\green128\blue128;} +#{\footnote Topic1} +${\footnote What Is Night Security?} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Night Security Help\plain\f3\fs18\cf0 \par\pard \plain\f3\fs18 +\par To learn more about using help press F1 now. +\par +\par \plain\f4\fs28\b \{bmc nightsec.bmp \} What is Night Security? +\par \pard\li425\plain\f3\fs18 Night Security is a program that sets up your entire computer security for you without you having to do much. +\par +\par (For more information on why it's a good idea to have a computer security see \plain\lang1024\f3\fs18 {\uldb Why do I need a Secure Shutdown}{\v Topic2}) +\par \plain\f3\fs18 +\par The Night Security Checklist lets you select the different items you want it to do.\plain\lang1024\f3\fs18 {\uldb Click here}{\v Topic4} \plain\f3\fs18 for how to setting up your Checklist. +\par +\par Secure Shutdown 'does' the Security on your computer running all the different items you checked in your checklist. \plain\lang1024\f3\fs18 {\uldb Click here}{\v Topic5} \plain\f3\fs18 for more info on running it. +\par +\par If you've used Night Security before, find out what's new in version 2.5 {\uldb here}{\v Topic16}. +\par \pard\plain\f3\fs18 +\par \plain\lang1024\f3\fs18 +\par \plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic2} +${\footnote Why Do I Need a Secure Shutdown?} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Why do I need a Secure Shutdown?\plain\f3\fs18\cf0 \par\pard \plain\f2\fs36\cf3 +\par \plain\f3\fs18 As mentioned in the Charter: \tab +\par +\par \pard\li360\ri360\tx1134\tx2552\plain\lang1024\f6\fs18 [9.] C. Computer files (other than programs) must be kept encrypted, and be "wiped" after they have been erased. +\par \pard\li851\tx1134\tx2552\plain\lang1024\f6\fs18 +\par \pard\plain\f3\fs18 In other words you need to encrypt all your data and make sure that the unencrypted data isn't hanging around on your hard disk somewhere. This is possible in all sorts of ways, here's some of the most common: +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18 \{bmct onestep.bmp\}\tab For starters if a file is in you Recycle Bin anyone can get it out until it's actually been emptied. Also if you have Norton Protection installed on your computer there'll be tons of files that are hiding around behind the scenes. The \plain\lang1024\f3\fs18\b Empty Recycle Bin\plain\lang1024\f3\fs18 Item on the checklist can take care of this stuff. +\par \tab ({\uldb more info}{\v Topic12}) +\par +\par \{bmct onestep.bmp\}\tab When files are deleted they aren't actually removed from your hard disk even if you empty your recycle bin. Just the name is removed from a sorta index. For this reason you need to make sure to wipe the free space on your hard disk every night. The \plain\lang1024\f3\fs18\b Wipe Free Space\plain\lang1024\f3\fs18 Item in the checklist does this for you. +\par \tab ({\uldb more info}{\v Topic15}) +\par +\par \{bmct onestep.bmp\}\tab A lot of programs create temporary files when they run. Most of the time they remove those files. But if something goes funny (your computer crashes etc\'85) those files can still be around. The \plain\lang1024\f3\fs18\b Empty Temp Folder \plain\lang1024\f3\fs18 item on the checklist will clear those out for you. +\par \tab ({\uldb more info}{\v Topic11}) +\par +\par \{bmct onestep.bmp\}\tab If you're on a Network, then data you view on your Intranet can still be on your computer in the 'Temporary Internet Files' Folder. The \plain\lang1024\f3\fs18\b Clear Temporary Internet Files\plain\lang1024\f3\fs18 item can clear'm out. +\par \tab ({\uldb more info}{\v Topic10}) +\par +\par \{bmct onestep.bmp\}\tab Windows uses a file called a swap file to provide memory to programs if there isn't enough. Don't worry about the details, but there can be unencrypted data hiding in that file. The \plain\lang1024\f3\fs18\b Delete Windows Swap File\plain\lang1024\f3\fs18 item on the checklist will take care of that one. +\par \tab ({\uldb more info}{\v Topic14}) +\par +\par \{bmct onestep.bmp\}\tab Sometimes if you've had a computer crash there can be data hiding out in little nooks and crannies of your computer called lost clusters. To make sure they're cleared up check off the \plain\lang1024\f3\fs18\b Check Hard Disk for Lost Clusters\plain\lang1024\f3\fs18 item on the checklist. +\par \tab ({\uldb more info}{\v Topic13}) +\par +\par \{bmct onestep.bmp\}\tab In addition to the above, Night Security can also \plain\lang1024\f3\fs18\b Encrypt\plain\lang1024\f3\fs18 your files for you. Or it can also do a \plain\lang1024\f3\fs18\b Backup\plain\lang1024\f3\fs18 for you if you like. +\par \tab {\uldb more info}{\v Topic7} +\par +\par \pard\plain\f3\fs18 Now you don't have to worry about any of those specifics, just fill out your {\uldb checklist}{\v Topic4}.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic3} +${\footnote Troubleshooting} +K{\footnote read-only files;troubleshooting;Windows NT;Menu Extension;backup problems} +A{\footnote Troubleshooting} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Troubleshooting\plain\f3\fs18\cf0 \par\pard \plain\f4\fs24\b +\par \plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24\b Hey, the Checklist is empty +\par +\par \plain\f3\fs18 In most cases uninstalling the program and reinstalling it will fix this problem. Here's how: +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18\b 1\plain\lang1024\f3\fs18 \tab Choose 'Add/Remove Programs' from the Control Panel.{\uldb \{bmct shortcut.bmp\}}{\v !ControlPanel(appwiz.cpl)} +\par \plain\lang1024\f3\fs18\b 2\plain\lang1024\f3\fs18 \tab From the list of programs choose 'Night Security 2.5,' and click the 'Add/Remove\'85' button. +\par \plain\lang1024\f3\fs18\b 3\plain\lang1024\f3\fs18 \tab After it's done reboot and then run the Setup program on the Night Security Install Disk. +\par +\par +\par \pard\plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24 \plain\f4\fs24\b I want it to encrypt my read-only files +\par \plain\f3\fs18 +\par Normally as a safety feature XPY Encryption won't let you encrypt read-only or system files. Here's how to override that. +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18\b 1\plain\lang1024\f3\fs18 \tab Start up the Night Security Checklist, and click the 'Advanced' button. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(checklist.exe)} +\par \plain\lang1024\f3\fs18\b 2\plain\lang1024\f3\fs18 \tab Select 'Encrypt Data' from the box at the top. +\par \plain\lang1024\f3\fs18\b 3\plain\lang1024\f3\fs18 \tab Now click the 'More' tab in the lower left corner to get at the advanced encryption options. +\par \plain\lang1024\f3\fs18\b 4\plain\lang1024\f3\fs18 \tab Check the 'Encrypt read-only/system files' box. +\par \plain\lang1024\f3\fs18\b 5\plain\lang1024\f3\fs18 \tab Click 'Next' and then 'Finish'. +\par \pard\plain\f3\fs18 +\par One other thing to keep in mind is that you have any files open, they can't be encrypted. Make sure to close all your programs before starting your Secure Shutdown. +\par +\par +\par \plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24 \plain\f4\fs24\b Man, this sure takes a long time to wipe +\par \plain\f3\fs18 +\par Check how much free space you have on your hard disk. If there's lots over 500 MB or so you may want to copy some ballast over to fill it up. These files would only be temporarily on your hard disk, so when you need the space you can remove them. +\par +\par You could try copying some folders from the HomeARC. +\par \plain\lang1024\f3\fs18\b +\par +\par \plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24 \plain\f4\fs24\b It's telling me it can't find Menu Extension or WXPY +\par \plain\f3\fs18 +\par T\plain\lang1024\f3\fs18 ry Reinstalling Menu Extension from the HomeARC CD. \plain\lang1024\f3\fs18\b +\par \plain\f4\fs24 +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18\b 1\plain\lang1024\f3\fs18 \tab Choose 'Add/Remove Programs' from the Control Panel. {\uldb \{bmct shortcut.bmp\}}{\v !ControlPanel(appwiz.cpl)} +\par \plain\lang1024\f3\fs18\b 2\plain\lang1024\f3\fs18 \tab From the list of programs choose 'Menu Extension,' and click the 'Add/Remove\'85' button. +\par \plain\lang1024\f3\fs18\b 3\plain\lang1024\f3\fs18 \tab After it's done reboot. +\par \plain\lang1024\f3\fs18\b 4\plain\lang1024\f3\fs18 \tab Insert the HomeARC Setup CD and select 'Menu Extension' setup from the window that pops up. +\par \pard\plain\lang1024\f3\fs18\b +\par +\par \plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24 \plain\f4\fs24\b I just installed Menu Extension, but I get a big white dialog box whenever I try to XPY something or do my Secure Shutdown +\par \plain\f3\fs18 +\par This can happen, if you haven't installed the HomeARC but are trying to use Menu Extension. (If you're using Windows NT see the next question) +\par +\par The simplest solution is just to install the HomeARC and after you reboot everything should work fine. If for some reason you can't do that, or it doesn't work, try the following.\plain\lang1024\f3\fs18\b +\par \plain\f4\fs24 +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18\b 1\plain\lang1024\f3\fs18 \tab Copy the file 'memctrl.com' from your HomeARC 98 Setup CD to the root folder on your hard disk (ie: C:\\). You'll find this file in the '\\Win95\\Util' folder on the CD. +\par \plain\lang1024\f3\fs18\b 2\plain\lang1024\f3\fs18 \tab Open your 'autoexec.bat' file using notepad. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(notepad.exe,c:\\autoexec.bat)} +\par \plain\lang1024\f3\fs18\b 3\plain\lang1024\f3\fs18 \tab Add the following line to the bottom of the file: +\par +\par \tab \plain\lang1024\f6\fs18 C:\\MEMCTRL.COM /i\plain\lang1024\f3\fs18 +\par +\par \plain\lang1024\f3\fs18\b 4\plain\lang1024\f3\fs18 \tab Save the file and reboot your computer. +\par \pard\plain\f4\fs24 +\par +\par \plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24 \plain\f4\fs24\b Can I run Night Security on Windows NT? +\par \plain\f3\fs18 +\par Y\plain\lang1024\f3\fs18 es, Night Security is completely compatible with Windows NT 4.0 and higher. +\par +\par Some of the DOS options, like 'Delete Swap File' won't run because you just can't do that on Windows NT. The remainder of the DOS Options that work run in a DOS Window, since you can't exit to DOS under Windows NT. +\par +\par On the other hand the current version of Menu Extension, which Night Security uses for it's encryption, is not compatible. So you have to do your own encryption before starting the Secure Shutdown. +\par \plain\f4\fs24 +\par +\par \plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24 \plain\f4\fs24\b Why won't it backup all my data? +\par \plain\f3\fs18 +\par First of all check if the folder you're trying to backup is properly in the backup list, and make sure you're backing up to the right destination.\plain\lang1024\f3\fs18 +\par +\par If that didn't work then try a backup by Date. +\par \plain\f3\fs18 +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18\b 1\plain\lang1024\f3\fs18 \tab Start up the Night Security Checklist, and click the 'Advanced' button. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(checklist.exe)} +\par \plain\lang1024\f3\fs18\b 2\plain\lang1024\f3\fs18 \tab Select 'Backup Data' from the box at the top. +\par \plain\lang1024\f3\fs18\b 3\plain\lang1024\f3\fs18 \tab Now click the 'More' tab in the lower left corner to get at the advanced backup options. +\par \plain\lang1024\f3\fs18\b 4\plain\lang1024\f3\fs18 \tab Change the option 'Backup according to', by selecting 'Date' from the drop-down box. +\par \plain\lang1024\f3\fs18\b 5\plain\lang1024\f3\fs18 \tab Click 'Next' and then 'Finish'. +\par \pard\plain\lang1024\f3\fs18 +\par Also make sure that you're not skipping over any files by putting their extensions in the 'Ignore files with these extensions' box. +\par \plain\f3\fs18 +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18\b 1\plain\lang1024\f3\fs18 \tab Start up the Night Security Checklist, and click the 'Advanced' button. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(checklist.exe)} +\par \plain\lang1024\f3\fs18\b 2\plain\lang1024\f3\fs18 \tab Select 'Backup Data' from the box at the top. +\par \plain\lang1024\f3\fs18\b 3\plain\lang1024\f3\fs18 \tab Now click the 'More' tab in the lower left corner to get at the advanced backup options. +\par \plain\lang1024\f3\fs18\b 4\plain\lang1024\f3\fs18 \tab Select all the items in the 'Ignore files with these extensions box' and press the delete button. +\par \plain\lang1024\f3\fs18\b 5\plain\lang1024\f3\fs18 \tab Click 'Next' and then 'Finish'. +\par \pard\plain\lang1024\f3\fs18 +\par +\par \plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic4} +${\footnote Your Night Security Checklist} +K{\footnote checklist} +\deflang1024\pard\plain\lang1033\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Your Night Security Checklist\plain\lang1033\f3\fs18\cf0 \par\pard \plain\lang1033\f2\fs36\cf3 +\par \plain\lang1033\f3\fs18 Here's how to fill out your checklist. The following only needs to be done once. Since Night Security uses a part of the program 'Menu Extension' that comes with the HomeARC to encrypt your files, you'll need to have that installed. See the {\uldb Troubleshooting}{\v Topic3} page for info on how to install it. +\par \pard\li567\fi-425\tx567\plain\f3\fs18 +\par \pard\plain\f4\fs28\b \{bmct open.bmp\} \plain\lang1033\f4\fs28\b Filling out the Checklist +\par \plain\lang1033\f3\fs18 Now it's time to fill out your Night Security Checklist and tell it what exactly you want it to do. For more info on the different options see {\uldb Why do I need a Secure Shutdown}{\v Topic2}. +\par +\par \pard\li567\fi-425\tx567\plain\f3\fs18\b 1\plain\f3\fs18 \tab Choose 'Programs | Night Security | Night Security Checklist' from the Start Menu. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(checklist.exe)} +\par \plain\f3\fs18\b 2\plain\f3\fs18 \tab Click the 'Next' button and you'll be presented with a list of all the different things that Night Security can do. Normally you'd select all of them. (Well actually, the 'Backup Data' option is more like an extra\emdash not really necessary for security.) The Wipe Free Space option is especially important. +\par \plain\f3\fs18\b 3\plain\f3\fs18 \tab Now the Checklist will ask you for more specifics about the items you chose above. For example if you selected the... +\par +\par \tab \plain\f3\fs18\b Encrypt Data\plain\f3\fs18 option, you'll be asked for the list of folders or files to encrypt. Simply press the 'Add' button to add folders, or drag them from explorer. +\par +\par \tab \plain\f3\fs18\b Backup Data\plain\f3\fs18 option, you'll first be asked for the folders you'd like to back up. Use the 'Add' button as above. Then after you click 'Next' you'll be asked for the destination you'd like to copy those items to. Press the 'Browse' button to select your Zip Drive or other spot you'd like to send your files. +\par +\par \plain\f3\fs18\b 4\plain\f3\fs18 \tab On the last page click 'Finish' to save your choices. Done! +\par \pard\plain\f3\fs18 +\par \plain\lang1033\f3\fs18\cf0 +\par \{button , ALink(Items)\} \plain\lang1033\f3\fs18\cf0\b More on the Checklist Items\plain\f0\fs20 +\par \plain\lang1033\f3\fs18\cf0 \{button , JumpContext(2000)\} \plain\lang1033\f3\fs18\cf0\b Why Do I Need Night Security?\plain\lang1033\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic5} +${\footnote Using the Secure Shutdown} +K{\footnote secure shutdown} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Using the Secure Shutdown\plain\f3\fs20\cf2 +\par (ie: 'doing security')\plain\f3\fs18\cf0 \par\pard \plain\f2\fs36\cf3 +\par \plain\f3\fs18 Here's how you'll use the Secure Shutdown every night. Depending on your computer this could take between 5 and 20 minutes (or hours if you just bought the latest machine and have egads of free space. There's a tip on the {\uldb Troubleshooting}{\v Topic3} page on that.). +\par \plain\lang1024\f4\fs28\b +\par \{bmct open.bmp\}\plain\f4\fs28\b Doing Security +\par \plain\f3\fs18 +\par \pard\li567\fi-567\tx567\plain\f3\fs18\b 1\plain\f3\fs18 \tab Make sure all your programs are closed. +\par \plain\f3\fs18\b 2\plain\f3\fs18 \tab Choose 'Secure Shutdown' from the top of your Start Menu. +\par \plain\f3\fs18\b 3\plain\f3\fs18 \tab If prompted enter your password to encrypt your files. +\par +\par +\par \pard\plain\f3\fs18 Secure Shutdown will appear in the top left corner of your screen and a bunch of other boxes and progress bars will show up as it's doing it's work. If any errors take place (for example if a file can't be encrypted) they'll appear in a {\uldb log window}{\v Topic17}. +\par +\par After a while it'll shutdown Windows and run some different programs. By and by it should wipe your hard disk. +\par +\par Don't actually turn off your computer till you see the 'It's now safe to turn off your computer' message. +\par \pard\li425\plain\f3\fs18 +\par +\par \pard\plain\lang1024\f3\fs18\b \{button , JumpContext(1000)\} Problems? +\par \plain\f0\fs20 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic6} +${\footnote Advanced Checklist} +K{\footnote advanced checklist;MS-DOS mode} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} The Advanced Checklist\plain\f3\fs18\cf0 \par\pard +\par The Advanced Wizard lets you tweak all the settings to your heart's content. You can also drag the different items options to change their order in the shutdown. +\par +\par The different items are listed seperately. First come the ones that run in Windows and then on the next page are listed the items that run in MS-DOS Mode. +\par +\par If you change the order of the items, remember that it's almost always best to have the 'Wipe Free Space' item last. +\par +\par +\par \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Checklist Items\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic7} +${\footnote Encrypt Data} +K{\footnote checklist items, encrypt data;WXPY shutdown;read-only files;HomeARC password;ignoring file types} +A{\footnote Items} ++{\footnote items:010} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Encrypt Data\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18\cf0 This item encrypts your data using XPY encryption. Night Security uses parts of Menu Extension program from the HomeARC for it's encryption, so you'll need to make sure you have it installed. +\par \plain\lang1024\f4\fs28\b +\par \{bmct open.bmp\} \plain\f4\fs28\b Setting up your Encryption +\par \plain\f3\fs18 +\par \pard\tx567\plain\f3\fs18 Use the 'Add' button to add folders to the list. Or just drag files or folders from explorer. To remove folders first select them and click the 'Remove' button or press Delete (on your keyboard).\plain\lang1024\f3\fs18 +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18 +\par \pard\li425\fi-425\tx567\plain\lang1024\f4\fs28\b \{bmct open.bmp\} \plain\f4\fs28\b Advanced Options +\par \plain\f3\fs18\cf0\b +\par Disable HomeARC Password\plain\f3\fs18\cf0 +\par \tab Use this option to remove your password from memory after the encrypting is finished. If you don't turn off your computer and your password is still in memory others can open your files, so it's a good idea to keep this option checked. +\par +\par \plain\f3\fs18\cf0\b Encrypt Read-only/System Files\plain\f3\fs18\cf0 +\par \tab Normally XPY encryption won't close read-only or system files as a safety feature. If you'd like to override this for some reason then check this box. +\par +\par \plain\f3\fs18\cf0\b Ignore Files with These Extensions\plain\f3\fs18\cf0 +\par \tab If you want to leave certain types of files out of your encryption here's where to do it. For example you may not want to encrypt shortcut files because then they won't work properly. To ignore these files first click on the new button (the little sparkle) and type 'lnk' (the extension for shortcuts) in the box. Or if you don't want to encrypt Excel files you'd type 'xls'. +\par +\par +\par \pard\plain\f3\fs18\cf0 \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \pard\li425\fi-425\tx567\plain\f4\fs28\b +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic8} +${\footnote Night Security Options} +K{\footnote checklist items} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Night Security Options\plain\f3\fs18\cf0 \par\pard +\par The different items you select in the top of your checklist all get run before actually exiting Windows. These include things such as encrypting your data, or emptying your Recycle Bin. +\par +\par Some of the items near the bottom get run after exiting Windows. These include things such as wiping the free space on your hard disk and other clean up tasks that can't (or shouldn't be) run in Windows. +\par +\par Remember that it's almost always best to have the 'Wipe Free Space' item enabled. That's the whole reason you do your shutdown. +\par +\par (See: {\uldb Why do I need a Secure Shutdown}{\v Topic2} for more info) +\par +\par +\par \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Checklist Items\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic9} +${\footnote Backup Data} +K{\footnote checklist items: backup data;backup types;backup types,archive based;backup types,date based;ignoring file types;} +A{\footnote Items} ++{\footnote Items:015} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Backup Data\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18\cf0 This item backs up your data to either a removable drive such as a Zip Drive, or if you're on a network you can copy your files to a server. +\par \plain\lang1024\f4\fs28\b +\par \{bmct open.bmp\} \plain\f4\fs28\b Setting up your Backup +\par \plain\f3\fs18 +\par First you have to specify what you want to backup. To add folders click the 'Add' button. You can also drag files or folders from Exlporer. To remove folders from the list select them and click 'Remove'. +\par +\par Now on the next page, choose the location you'd like to send your files. Click 'Browse' and then select your Zip drive, or network location. +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18 \tab \tab +\par \pard\li425\fi-425\tx567\plain\lang1024\f4\fs28\b \{bmct open.bmp\} \plain\f4\fs28\b Advanced Options +\par \plain\f3\fs18\cf0\b +\par Backup According to\plain\f3\fs18\cf0 +\par \tab There are two ways you can backup your data. Either it can be compared and checked when it was last modified (by Date) or each file can be marked when backed up (by Archive). There's a slight but important difference here. +\par \tab +\par \tab \plain\f3\fs18\cf0\b Archive backup\plain\f3\fs18\cf0 : This is faster and generally reccomended. It marks each file on your computer as backed up and won't back it up again until it's changed. If you want to backup to a new location, it's best to use Date backup or you won't get everything copied. +\par +\par \tab \plain\f3\fs18\cf0\b Date backup\plain\f3\fs18\cf0 : This option compares the last modified date for each file with the one in the backup location. It'll always make sure nothing's missing from the backup. Depending on the amount of files you're backing up it can take up to 20 or 30 times as long. You may get extra copies of files. It also won't work on multiple disks since all the files aren't on the same disk. +\par \pard\li360\tx567\plain\f3\fs18\cf0 +\par \pard\li425\fi-425\tx567\plain\f3\fs18\cf0\b Ignore Files with These Extensions\plain\f3\fs18\cf0 +\par \tab If you want to leave certain types of files out of your backup here's where to do it. For example you may not want to backup MP3 files because of their size. To ignore these files first click on the new button (the little sparkle) and type 'mp3' in the box. +\par \pard\plain\f3\fs18\cf0 +\par +\par \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\f4\fs28\b +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic10} +${\footnote Clear Temporary Internet Files} +K{\footnote checklist items, clear temporary internet files} +A{\footnote Items} ++{\footnote items:040} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Clear Temporary Internet Files\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18\cf0 Stored in your Temporary Internet Files folder is a cache of everything you browse in your web browser. If you're on a Network and use an Intranet, this item can be used to clear out any sensitive data you view. +\par +\par Also since your Temporary Internet Files folder can baloon in size this could also be used to help keep it trim. +\par +\par By default this item clears out all your Temporary Internet Files, however using the Advanced Properties you can specify which files to clear. +\par +\par (Note that this item might not be installed. If it doesn't appear in the list, rerun the Night Security Setup and make sure to choose 'Network Components.') +\par \plain\lang1024\f4\fs28\b +\par \{bmct open.bmp\} \plain\f4\fs28\b Advanced Properties +\par \plain\f3\fs18 +\par All the files in the Temporary Internet Files come from one server or another. In the Advanced Properties you can specify which servers' files you want to clear. This can be useful if you only want to clear sensitive information in the cache from one or two servers. +\par +\par \{bmc ins.bmp \}\tab +\par \pard\li360\plain\f3\fs18 Adds as server to the list. +\par \pard\plain\f3\fs18 +\par \{bmc del.bmp \} +\par \pard\li360\plain\f3\fs18 Removes a server or servers from the list. +\par \pard\plain\f3\fs18 +\par \plain\f3\fs18\b Clear All\plain\f3\fs18 +\par \pard\li360\plain\f3\fs18 Override the list of servers and clear everything (the default) +\par \pard\plain\f3\fs18 +\par \plain\f3\fs18\b Cookies +\par \pard\li360\plain\f3\fs18 This option clears cookies as well as other files from the cache. Usually you won't want to do this. +\par \pard\plain\f3\fs18\cf0 +\par +\par \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \pard\li425\fi-425\tx567\plain\f4\fs28\b +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic11} +${\footnote Empty Temp Folder} +K{\footnote checklist items, empty temp folder} +A{\footnote Items} ++{\footnote items:030} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Empty Temp Folder\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18\cf0 This item clears the folder where your temporary files are stored. +\par +\par \plain\lang1024\f3\fs18 A lot of programs create temporary files when they run. Most of the time they remove those files. But if something goes funny (your computer crashes etc\'85) those files can still be around. \plain\lang1024\f3\fs18\cf0 +\par +\par On Windows 95/98 usually this folder is located 'C:\\Windows\\Temp.' +\par +\par If the Temp folder on your computer doesn't look like a normal Temporary Files folder then Secure Shutdown will warn you before deleting anything. If this happens make sure that it is actually a folder with only Temp files in it. +\par +\par \plain\f3\fs18\cf0 +\par +\par \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic12} +${\footnote Empty Recycle Bin} +K{\footnote checklist items, empty recycle bin} +A{\footnote Items} ++{\footnote items:020} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Empty Recycle Bin\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18\cf0 Any files in your Recycle Bin can be easily recovered. It makes sense to clear it before wiping. +\par +\par This item empties your Recycle Bin and if you have Norton Protection installed also empties the Norton Protected Files. +\par +\par However some people like to take out the trash themselves. Feel free to disable this one if you're one of those. +\par \plain\lang1024\f4\fs28\b +\par \plain\lang1024\f0\fs20 +\par \plain\f3\fs18\cf0 \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic13} +${\footnote Check Hard Disk for Lost Clusters} +K{\footnote checklist items, check hard disk for lost clusters} +A{\footnote Items} ++{\footnote items:050} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Check Hard Disk for Lost Clusters\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18 Sometimes if you've had a computer crash there can be data hiding out in little nooks and crannies of your computer called lost clusters. These are locations on the hard disk that are marked as used, but aren't linked up to any files. +\par +\par Because there can be sensitive data in them, and the Wipe Free Space item can't get to them, it's good to do this check. +\par \plain\lang1024\f4\fs28\b +\par \{bmct open.bmp\} \plain\f4\fs28\b Advanced Properties +\par \plain\f3\fs18 +\par \plain\f3\fs18\b Automatially Fix Errors\plain\f3\fs18 +\par \pard\li360\plain\f3\fs18 When this option is checked Scandisk will run automatically without any intervention from you. (the default) +\par \pard\plain\f3\fs18 +\par \plain\f3\fs18\b Delete Lost Clusters +\par \pard\li360\plain\f3\fs18 This option will remove any lost clusters and make the space available for Wipe Free Space to do it's clean up work. This is definitely recommended over the next option. +\par \pard\plain\f3\fs18 +\par \plain\f3\fs18\b Save Lost Clusters as Files +\par \pard\li360\plain\f3\fs18 This option will save the lost data instead of deleting it. It'll put it in files called 'file0001.chk' in the root folder of your hard disk. +\par \pard\li567\fi-425\tx567\plain\f3\fs18 +\par \pard\plain\f3\fs18\cf0 +\par \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic14} +${\footnote Delete Swap File} +K{\footnote checklist items, delete swap file} +A{\footnote Items} ++{\footnote items:060} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Delete Swap File\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18 Windows uses a file called a swap file to provide memory to programs if there isn't enough. Don't worry about the details, but there can be unencrypted data hiding in that file. +\par +\par It's good to leave this option enabled and remove this file before wiping. +\par +\par Windows will make a new file when it boots the next time, so don't worry about this messing things up\plain\lang1024\f3\fs18\cf0 . +\par \plain\lang1024\f4\fs28\b +\par \pard\li425\fi-425\tx567\plain\f4\fs28\b +\par \pard\plain\f3\fs18\cf0 \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic15} +${\footnote Wipe Free Space} +K{\footnote checklist items, wipe free space} +A{\footnote Items} ++{\footnote items:070} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Wipe Free Space\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18 Everytime a file is deleted it isn't actually removed from your hard disk even if you empty your Recycle Bin. Just the name is removed from a sorta index. For this reason you need to make sure to wipe the free space on your hard disk every night. +\par +\par \plain\lang1024\f3\fs18\cf0 Also note that a lot of the other items on the checklist delete files (which aren't properly removed), so it makes sense to leave this item as the last one on the list. +\par +\par Depending on the size of your hard disk, the speed of your computer, and how hard you stare at the monitor (just kidding) this can take anywhere from 15 to 45 minutes. +\par \plain\lang1024\f4\fs28\b +\par \{bmct open.bmp\} \plain\f4\fs28\b Advanced Properties +\par \plain\f3\fs18 +\par \pard\li360\plain\f3\fs18 Normally this item wipes all the drives on your computer. If you have more than one and some of them really don't need to be wiped (ie: have no sensitive data on them) then you can deselect them. You should always wipe the hard disk you have Windows on, though (usually that's C:). +\par +\par +\par \pard\plain\f3\fs18\cf0 \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \pard\li425\fi-425\tx567\plain\f4\fs28\b +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic16} +${\footnote What's New} +K{\footnote new;what's new} ++{\footnote What's New} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} What's New in 2.5\plain\f3\fs18\cf0 \par\pard \plain\f3\fs18 +\par It makes your coffee, bed and does your laundry. It even wakes you up when sleeping in devotions. Oops! Well those are all features for version 3.0, so you'll have to wait. Besides the bugs that were fixed, here's what version 2.5 has got. +\par +\par \plain\f4\fs28\b \{bmc nightsec.bmp \} New Features +\par \pard\li720\fi-360{\*\pn\pnlvlblt\pnf1\pnindent360{\pntxtb\'b7}}\plain\f3\fs18 {\pntext\f1\'b7\tab}There's an all new Encryption feature. There were too many problems and crashes with the old one. Now Encryption is built in. It'll even encrypt read-only files if you want it to. Or ignore certain file types. ({\uldb more}{\v Topic7}) +\par \pard\li360\plain\f3\fs18 +\par \pard\li720\fi-360{\*\pn\pnlvlblt\pnf1\pnindent360{\pntxtb\'b7}}\plain\f3\fs18 {\pntext\f1\'b7\tab}If you need to backup data, you can use the new built in Backup feature. It'll do a backup by last modified date, or by archive setting whatever you prefer. It can also ignore certain types of files. +\par \pard\li360\plain\f3\fs18 +\par \pard\li720\fi-360{\*\pn\pnlvlblt\pnf1\pnindent360{\pntxtb\'b7}}\plain\f3\fs18 {\pntext\f1\'b7\tab}All errors go to log window and don't hold up your Secure Shutdown. Have you ever walked away (read: went to a meeting) while your computer was shutting down, expecting it to be all done after you came back? But instead there was this prompt on your screen! Well, no more! +\par \pard\li360\plain\f3\fs18 +\par \pard\li720\fi-360{\*\pn\pnlvlblt\pnf1\pnindent360{\pntxtb\'b7}}\plain\f3\fs18 {\pntext\f1\'b7\tab}The Wipe Free Space feature now supports more than 2 GB of free space. Previously when you had this much free space it wouldn't get wiped properly. However if you have this much free space it'll take quite a while to wipe. Check out the {\uldb Troubleshooting}{\v Topic3} page for a tip on this. +\par \pard\plain\f3\fs18 +\par \plain\f3\fs18\cf0 \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Checklist Items\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic17} +${\footnote The Log Window} +K{\footnote log window;errors;} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} The Log Window\plain\f3\fs18\cf0 \par\pard +\par If something wierd happens while your Secure Shutdown is, well, 'shutting-down' then a note if it will get sent to the log window. From there you can try and see what went wrong and fix the problem. +\par +\par First try letting it fix it self by right clicking on the problem, and selecting 'Fix'. If that doesn't work, or if 'Fix' just plain isn't available. Then use the 'Retry' option. +\par +\par If that still doesn't fix it, take a look at {\uldb this list}{\v Topic18} and see if you can figure out what went wrong. +\par +\par You can save the list of errors by clicking the 'Save' button at the top of the window. Actually this happens automatically if something goes wrong and you're not at your computer while your computer is doing a Secure Shutdown. +\par +\par +\par \plain\lang1024\f3\fs18\b \{button , JumpContext(1000)\} Troubleshooting\plain\f0\fs20 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic18} +${\footnote Log Window Errors} +K{\footnote access denied;read-only files;errors} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Log Window Errors\plain\f3\fs18\cf0 \par\pard \plain\f4\fs22\b +\par \plain\f3\fs18\cf0 For your reference, here are some common errors that can occur while your shutdown is taking place.\plain\f4\fs22\b +\par +\par \plain\lang1024\f4\fs22\b \{bmct open.bmp\}\plain\f4\fs22\b \plain\f4\fs22\b Access is denied\plain\f0\fs20 +\par \pard\li360\plain\f3\fs18\cf0 This error means that either the file is read-only and it can't be overwritten, or on a network you don't have the permission to change this file. In a backup, it's probably referring to the destination file.\plain\f0\fs20 +\par \pard\plain\f0\fs20 +\par \plain\lang1024\f4\fs22\b \{bmct open.bmp\}\plain\f4\fs22\b \plain\f4\fs22\b The process cannot access the file because it is being used by another process.\plain\f0\fs22\b +\par \pard\li360\plain\f3\fs18\cf0 A program has this file open and it can't be changed at the same time. Close all other programs on your computer and try again.\plain\f0\fs20 +\par \pard\plain\f0\fs20 +\par \plain\lang1024\f4\fs22\b \{bmct open.bmp\}\plain\f4\fs22\b \plain\f4\fs22\b The file is a read-only, system, hidden or invalid file.\plain\f0\fs20 +\par \pard\li360\plain\f3\fs18\cf0 As a safety precaution XPY Encryption won't encrypt read-only or system files. When it encounters one of these it spews up this error. If you'd like to override this and let XPY encrypt read-only files, go to the advanced wizard and choose that {\uldb option}{\v Topic7}. +\par +\par +\par \pard\plain\lang1024\f3\fs18\b \{button , JumpContext(1000)\} Troubleshooting +\par \plain\f3\fs18\cf0 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup19} +\deflang1033\pard\plain\f0\fs16 Lets you change more options and get at the advanced settings. +\par +\par \plain\f0\fs16\cf0 \{button , JumpContext(1003)\} \plain\f0\fs16\cf0\b Advanced Checklist\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup20} +\deflang1033\pard\plain\f0\fs16\cf0 List of items you'd like to use during your Secure Shutdown. Put a check next to the items you want to use.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup21} +\deflang1033\pard\plain\f0\fs16\cf0 Start the Secure Shutdown now.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup22} +\deflang1033\pard\plain\f0\fs16\cf0 List of items that will run before going into MS-DOS mode. Drag an item to change the order.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup23} +\deflang1033\pard\plain\f0\fs16\cf0 List of items that happen after going into MS-DOS mode. To change the order drag an item. Make sure to keep 'Wipe Free Space' last, though.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup24} +\deflang1033\pard\plain\f0\fs16\cf0 List of files and folders to encrypt. To add files you can drag files from Explorer, or press the 'Add' button.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup25} +\deflang1033\pard\plain\f0\fs16\cf0 Adds a folder to the list of folders to be encrypted. You can also drag files or folders from Explorer.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup26} +\deflang1033\pard\plain\f0\fs16\cf0 Removes a folder from the list of folders to encrypt.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup27} +\deflang1033\pard\plain\f0\fs16\cf0 Disables your XPY/HomeARC password after the Secure Shutdown is complete. \plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup28} +\deflang1033\pard\li425\fi-425\tx567\plain\f0\fs16\cf0 Allow XPY Encryption to encrypt read-only and system files. (Normally not recommended)\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup29} +\deflang1033\pard\plain\f0\fs16\cf0 Ignore files with these extensions when encrypting. (eg: If you wanted to ignore MP3 files make a new item with 'mp3' in it).\plain\f0\fs20 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup30} +\deflang1033\pard\plain\f0\fs16\cf0 Add an item to the list.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup31} +\deflang1033\pard\plain\f0\fs16\cf0 Remove an item from the list.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup32} +\deflang1033\pard\plain\f0\fs16\cf0 List of files and folders to backup. You can drag and drop files here from explorer, or use the 'Add' button.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup33} +\deflang1033\pard\plain\f0\fs16 Adds a folder to the backup list. You can also drag files or folders from Explorer.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup34} +\deflang1033\pard\plain\f0\fs16\cf0 Removes a folder from the list of folders to backup.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup35} +\deflang1033\pard\plain\f0\fs16\cf0 The destination for the backup (use the 'Browse' button, that's easier). You could choose either a Zip Drive or a network location for example.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup36} +\deflang1033\pard\plain\f0\fs16\cf0 Sets the destination for the backup. You could choose either a Zip Drive or a network location for example.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup37} +\deflang1033\pard\plain\f0\fs16 Choose the appropriate method for backups: +\par +\par \plain\f0\fs16\b Archive Backup\plain\f0\fs16 : Faster, and generally recommended. But won't copy all files if backing up to a new location. +\par +\par \plain\f0\fs16\b Date Backup\plain\f0\fs16 : Checks each file for the date it was last modified, slower, but more reliable.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup38} +\deflang1033\pard\plain\f0\fs16\cf0 Ignore files with these extensions when backing up. (eg: If you wanted to ignore MP3 files make a new item with 'mp3' in it).\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup39} +\deflang1033\pard\plain\f0\fs16\cf0 List of servers you'd like to remove cached internet data for.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup40} +\deflang1033\pard\plain\f0\fs16\cf0 In addition, clear cookies from this computer.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup41} +\deflang1033\pard\plain\f0\fs16\cf0 Clear all cached Internet data from the computer.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup42} +\deflang1033\pard\plain\f0\fs16\cf0 Empties the Recycle Bin during the Secure Shutdown.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup43} +\deflang1033\pard\plain\f0\fs16\cf0 Empties the Norton Protected files from the computer if this is installed.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup44} +\deflang1033\pard\plain\f0\fs16\cf0 Drives to wipe the free space on.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup45} +\deflang1033\pard\plain\f0\fs16\cf0 Automatically checks for lost clusters, without prompts or summaries.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup46} +\deflang1033\pard\plain\f0\fs16\cf0 Convert any lost clusters found into files.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup47} +\deflang1033\pard\plain\f0\fs16\cf0 Delete any lost clusters found.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup48} +\deflang1033\pard\plain\f0\fs16\cf0 Go to the next page of the wizard.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup49} +\deflang1033\pard\plain\f0\fs16 Go to the previous page of the wizard.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup50} +\deflang1033\pard\plain\f0\fs16\cf0 Save all my choices and exit.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup51} +\deflang1033\pard\plain\f0\fs16 Saves the error list in a file on your desktop.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup52} +\deflang1033\pard\plain\f0\fs16\cf0 Hides or closes this log window.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup53} +\deflang1033\pard\plain\f0\fs16\cf0 A list of all the errors that occured during the Secure Shutdown.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +} diff --git a/Help/NightSec.rtf.XRP b/Help/NightSec.rtf.XRP new file mode 100644 index 0000000..5a2b310 --- /dev/null +++ b/Help/NightSec.rtf.XRP @@ -0,0 +1,624 @@ +{\rtf1\ansi\deff0\deftab720 +{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 Haettenschweiler;}{\f3\fswiss\fprq2 Tahoma;}{\f4\fswiss\fprq2 Arial;}{\f5\fswiss\fprq2 System;}{\f6\fmodern\fprq1 Courier New;}} +{\colortbl\red0\green0\blue0;\red11\green8\blue125;\red223\green223\blue223;\red0\green128\blue128;} +#{\footnote Topic1} +${\footnote What Is Night Security?} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Night Security Help\plain\f3\fs18\cf0 \par\pard \plain\f3\fs18 +\par To learn more about using help press F1 now. +\par +\par \plain\f4\fs28\b \{bmc nightsec.bmp \} What is Night Security? +\par \pard\li425\plain\f3\fs18 Night Security is a program that sets up your entire computer security for you without you having to do much. +\par +\par (For more information on why it's a good idea to have a computer security see \plain\lang1024\f3\fs18 {\uldb Why do I need a Secure Shutdown}{\v Topic2}) +\par \plain\f3\fs18 +\par The Night Security Checklist lets you select the different items you want it to do.\plain\lang1024\f3\fs18 {\uldb Click here}{\v Topic4} \plain\f3\fs18 for how to setting up your Checklist. +\par +\par Secure Shutdown 'does' the Security on your computer running all the different items you checked in your checklist. \plain\lang1024\f3\fs18 {\uldb Click here}{\v Topic5} \plain\f3\fs18 for more info on running it. +\par +\par If you've used Night Security before, find out what's new in version 2.5 {\uldb here}{\v Topic16}. +\par \pard\plain\f3\fs18 +\par \plain\lang1024\f3\fs18 +\par \plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic2} +${\footnote Why Do I Need a Secure Shutdown?} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Why do I need a Secure Shutdown?\plain\f3\fs18\cf0 \par\pard \plain\f2\fs36\cf3 +\par \plain\f3\fs18 As mentioned in the Charter: \tab +\par +\par \pard\li360\ri360\tx1134\tx2552\plain\lang1024\f6\fs18 [9.] C. Computer files (other than programs) must be kept encrypted, and be "wiped" after they have been erased. +\par \pard\li851\tx1134\tx2552\plain\lang1024\f6\fs18 +\par \pard\plain\f3\fs18 In other words you need to encrypt all your data and make sure that the unencrypted data isn't hanging around on your hard disk somewhere. This is possible in all sorts of ways, here's some of the most common: +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18 \{bmct onestep.bmp\}\tab For starters if a file is in you Recycle Bin anyone can get it out until it's actually been emptied. Also if you have Norton Protection installed on your computer there'll be tons of files that are hiding around behind the scenes. The \plain\lang1024\f3\fs18\b Empty Recycle Bin\plain\lang1024\f3\fs18 Item on the checklist can take care of this stuff. +\par \tab ({\uldb more info}{\v Topic12}) +\par +\par \{bmct onestep.bmp\}\tab When files are deleted they aren't actually removed from your hard disk even if you empty your recycle bin. Just the name is removed from a sorta index. For this reason you need to make sure to wipe the free space on your hard disk every night. The \plain\lang1024\f3\fs18\b Wipe Free Space\plain\lang1024\f3\fs18 Item in the checklist does this for you. +\par \tab ({\uldb more info}{\v Topic15}) +\par +\par \{bmct onestep.bmp\}\tab A lot of programs create temporary files when they run. Most of the time they remove those files. But if something goes funny (your computer crashes etc\'85) those files can still be around. The \plain\lang1024\f3\fs18\b Empty Temp Folder \plain\lang1024\f3\fs18 item on the checklist will clear those out for you. +\par \tab ({\uldb more info}{\v Topic11}) +\par +\par \{bmct onestep.bmp\}\tab If you're on a Network, then data you view on your Intranet can still be on your computer in the 'Temporary Internet Files' Folder. The \plain\lang1024\f3\fs18\b Clear Temporary Internet Files\plain\lang1024\f3\fs18 item can clear'm out. +\par \tab ({\uldb more info}{\v Topic10}) +\par +\par \{bmct onestep.bmp\}\tab Windows uses a file called a swap file to provide memory to programs if there isn't enough. Don't worry about the details, but there can be unencrypted data hiding in that file. The \plain\lang1024\f3\fs18\b Delete Windows Swap File\plain\lang1024\f3\fs18 item on the checklist will take care of that one. +\par \tab ({\uldb more info}{\v Topic14}) +\par +\par \{bmct onestep.bmp\}\tab Sometimes if you've had a computer crash there can be data hiding out in little nooks and crannies of your computer called lost clusters. To make sure they're cleared up check off the \plain\lang1024\f3\fs18\b Check Hard Disk for Lost Clusters\plain\lang1024\f3\fs18 item on the checklist. +\par \tab ({\uldb more info}{\v Topic13}) +\par +\par \{bmct onestep.bmp\}\tab In addition to the above, Night Security can also \plain\lang1024\f3\fs18\b Encrypt\plain\lang1024\f3\fs18 your files for you. Or it can also do a \plain\lang1024\f3\fs18\b Backup\plain\lang1024\f3\fs18 for you if you like. +\par \tab {\uldb more info}{\v Topic7} +\par +\par \pard\plain\f3\fs18 Now you don't have to worry about any of those specifics, just fill out your {\uldb checklist}{\v Topic4}.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic3} +${\footnote Troubleshooting} +K{\footnote read-only files;troubleshooting;Windows NT;Menu Extension;backup problems} +A{\footnote Troubleshooting} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Troubleshooting\plain\f3\fs18\cf0 \par\pard \plain\f4\fs24\b +\par \plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24\b Hey, the Checklist is empty +\par +\par \plain\f3\fs18 In most cases uninstalling the program and reinstalling it will fix this problem. Here's how: +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18\b 1\plain\lang1024\f3\fs18 \tab Choose 'Add/Remove Programs' from the Control Panel.{\uldb \{bmct shortcut.bmp\}}{\v !ControlPanel(appwiz.cpl)} +\par \plain\lang1024\f3\fs18\b 2\plain\lang1024\f3\fs18 \tab From the list of programs choose 'Night Security 2.5,' and click the 'Add/Remove\'85' button. +\par \plain\lang1024\f3\fs18\b 3\plain\lang1024\f3\fs18 \tab After it's done reboot and then run the Setup program on the Night Security Install Disk. +\par +\par +\par \pard\plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24 \plain\f4\fs24\b I want it to encrypt my read-only files +\par \plain\f3\fs18 +\par Normally as a safety feature XPY Encryption won't let you encrypt read-only or system files. Here's how to override that. +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18\b 1\plain\lang1024\f3\fs18 \tab Start up the Night Security Checklist, and click the 'Advanced' button. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(checklist.exe)} +\par \plain\lang1024\f3\fs18\b 2\plain\lang1024\f3\fs18 \tab Select 'Encrypt Data' from the box at the top. +\par \plain\lang1024\f3\fs18\b 3\plain\lang1024\f3\fs18 \tab Now click the 'More' tab in the lower left corner to get at the advanced encryption options. +\par \plain\lang1024\f3\fs18\b 4\plain\lang1024\f3\fs18 \tab Check the 'Encrypt read-only/system files' box. +\par \plain\lang1024\f3\fs18\b 5\plain\lang1024\f3\fs18 \tab Click 'Next' and then 'Finish'. +\par \pard\plain\f3\fs18 +\par One other thing to keep in mind is that you have any files open, they can't be encrypted. Make sure to close all your programs before starting your Secure Shutdown. +\par +\par +\par \plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24 \plain\f4\fs24\b Man, this sure takes a long time to wipe +\par \plain\f3\fs18 +\par Check how much free space you have on your hard disk. If there's lots over 500 MB or so you may want to copy some ballast over to fill it up. These files would only be temporarily on your hard disk, so when you need the space you can remove them. +\par +\par You could try copying some folders from the HomeARC. +\par \plain\lang1024\f3\fs18\b +\par +\par \plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24 \plain\f4\fs24\b It's telling me it can't find Menu Extension or WXPY +\par \plain\f3\fs18 +\par T\plain\lang1024\f3\fs18 ry Reinstalling Menu Extension from the HomeARC CD. \plain\lang1024\f3\fs18\b +\par \plain\f4\fs24 +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18\b 1\plain\lang1024\f3\fs18 \tab Choose 'Add/Remove Programs' from the Control Panel. {\uldb \{bmct shortcut.bmp\}}{\v !ControlPanel(appwiz.cpl)} +\par \plain\lang1024\f3\fs18\b 2\plain\lang1024\f3\fs18 \tab From the list of programs choose 'Menu Extension,' and click the 'Add/Remove\'85' button. +\par \plain\lang1024\f3\fs18\b 3\plain\lang1024\f3\fs18 \tab After it's done reboot. +\par \plain\lang1024\f3\fs18\b 4\plain\lang1024\f3\fs18 \tab Insert the HomeARC Setup CD and select 'Menu Extension' setup from the window that pops up. +\par \pard\plain\lang1024\f3\fs18\b +\par +\par \plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24 \plain\f4\fs24\b I just installed Menu Extension, but I get a big white dialog box whenever I try to XPY something or do my Secure Shutdown +\par \plain\f3\fs18 +\par This can happen, if you haven't installed the HomeARC but are trying to use Menu Extension. (If you're using Windows NT see the next question) +\par +\par The simplest solution is just to install the HomeARC and after you reboot everything should work fine. If for some reason you can't do that, or it doesn't work, try the following.\plain\lang1024\f3\fs18\b +\par \plain\f4\fs24 +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18\b 1\plain\lang1024\f3\fs18 \tab Copy the file 'memctrl.com' from your HomeARC 98 Setup CD to the root folder on your hard disk (ie: C:\\). You'll find this file in the '\\Win95\\Util' folder on the CD. +\par \plain\lang1024\f3\fs18\b 2\plain\lang1024\f3\fs18 \tab Open your 'autoexec.bat' file using notepad. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(notepad.exe,c:\\autoexec.bat)} +\par \plain\lang1024\f3\fs18\b 3\plain\lang1024\f3\fs18 \tab Add the following line to the bottom of the file: +\par +\par \tab \plain\lang1024\f6\fs18 C:\\MEMCTRL.COM /i\plain\lang1024\f3\fs18 +\par +\par \plain\lang1024\f3\fs18\b 4\plain\lang1024\f3\fs18 \tab Save the file and reboot your computer. +\par \pard\plain\f4\fs24 +\par +\par \plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24 \plain\f4\fs24\b Can I run Night Security on Windows NT? +\par \plain\f3\fs18 +\par Y\plain\lang1024\f3\fs18 es, Night Security is completely compatible with Windows NT 4.0 and higher. +\par +\par Some of the DOS options, like 'Delete Swap File' won't run because you just can't do that on Windows NT. The remainder of the DOS Options that work run in a DOS Window, since you can't exit to DOS under Windows NT. +\par +\par On the other hand the current version of Menu Extension, which Night Security uses for it's encryption, is not compatible. So you have to do your own encryption before starting the Secure Shutdown. +\par \plain\f4\fs24 +\par +\par \plain\lang1024\f4\fs28\b \{bmct open.bmp\}\plain\f4\fs24 \plain\f4\fs24\b Why won't it backup all my data? +\par \plain\f3\fs18 +\par First of all check if the folder you're trying to backup is properly in the backup list, and make sure you're backing up to the right destination.\plain\lang1024\f3\fs18 +\par +\par If that didn't work then try a backup by Date. +\par \plain\f3\fs18 +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18\b 1\plain\lang1024\f3\fs18 \tab Start up the Night Security Checklist, and click the 'Advanced' button. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(checklist.exe)} +\par \plain\lang1024\f3\fs18\b 2\plain\lang1024\f3\fs18 \tab Select 'Backup Data' from the box at the top. +\par \plain\lang1024\f3\fs18\b 3\plain\lang1024\f3\fs18 \tab Now click the 'More' tab in the lower left corner to get at the advanced backup options. +\par \plain\lang1024\f3\fs18\b 4\plain\lang1024\f3\fs18 \tab Change the option 'Backup according to', by selecting 'Date' from the drop-down box. +\par \plain\lang1024\f3\fs18\b 5\plain\lang1024\f3\fs18 \tab Click 'Next' and then 'Finish'. +\par \pard\plain\lang1024\f3\fs18 +\par Also make sure that you're not skipping over any files by putting their extensions in the 'Ignore files with these extensions' box. +\par \plain\f3\fs18 +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18\b 1\plain\lang1024\f3\fs18 \tab Start up the Night Security Checklist, and click the 'Advanced' button. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(checklist.exe)} +\par \plain\lang1024\f3\fs18\b 2\plain\lang1024\f3\fs18 \tab Select 'Backup Data' from the box at the top. +\par \plain\lang1024\f3\fs18\b 3\plain\lang1024\f3\fs18 \tab Now click the 'More' tab in the lower left corner to get at the advanced backup options. +\par \plain\lang1024\f3\fs18\b 4\plain\lang1024\f3\fs18 \tab Select all the items in the 'Ignore files with these extensions box' and press the delete button. +\par \plain\lang1024\f3\fs18\b 5\plain\lang1024\f3\fs18 \tab Click 'Next' and then 'Finish'. +\par \pard\plain\lang1024\f3\fs18 +\par +\par \plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic4} +${\footnote Your Night Security Checklist} +K{\footnote checklist} +\deflang1024\pard\plain\lang1033\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Your Night Security Checklist\plain\lang1033\f3\fs18\cf0 \par\pard \plain\lang1033\f2\fs36\cf3 +\par \plain\lang1033\f3\fs18 Here's how to fill out your checklist. The following only needs to be done once. Since Night Security uses a part of the program 'Menu Extension' that comes with the HomeARC to encrypt your files, you'll need to have that installed. See the {\uldb Troubleshooting}{\v Topic3} page for info on how to install it. +\par \pard\li567\fi-425\tx567\plain\f3\fs18 +\par \pard\plain\f4\fs28\b \{bmct open.bmp\} \plain\lang1033\f4\fs28\b Filling out the Checklist +\par \plain\lang1033\f3\fs18 Now it's time to fill out your Night Security Checklist and tell it what exactly you want it to do. For more info on the different options see {\uldb Why do I need a Secure Shutdown}{\v Topic2}. +\par +\par \pard\li567\fi-425\tx567\plain\f3\fs18\b 1\plain\f3\fs18 \tab Choose 'Programs | Night Security | Night Security Checklist' from the Start Menu. {\uldb \{bmct shortcut.bmp\}}{\v !ExecFile(checklist.exe)} +\par \plain\f3\fs18\b 2\plain\f3\fs18 \tab Click the 'Next' button and you'll be presented with a list of all the different things that Night Security can do. Normally you'd select all of them. (Well actually, the 'Backup Data' option is more like an extra\emdash not really necessary for security.) The Wipe Free Space option is especially important. +\par \plain\f3\fs18\b 3\plain\f3\fs18 \tab Now the Checklist will ask you for more specifics about the items you chose above. For example if you selected the... +\par +\par \tab \plain\f3\fs18\b Encrypt Data\plain\f3\fs18 option, you'll be asked for the list of folders or files to encrypt. Simply press the 'Add' button to add folders, or drag them from explorer. +\par +\par \tab \plain\f3\fs18\b Backup Data\plain\f3\fs18 option, you'll first be asked for the folders you'd like to back up. Use the 'Add' button as above. Then after you click 'Next' you'll be asked for the destination you'd like to copy those items to. Press the 'Browse' button to select your Zip Drive or other spot you'd like to send your files. +\par +\par \plain\f3\fs18\b 4\plain\f3\fs18 \tab On the last page click 'Finish' to save your choices. Done! +\par \pard\plain\f3\fs18 +\par \plain\lang1033\f3\fs18\cf0 +\par \{button , ALink(Items)\} \plain\lang1033\f3\fs18\cf0\b More on the Checklist Items\plain\f0\fs20 +\par \plain\lang1033\f3\fs18\cf0 \{button , JumpContext(2000)\} \plain\lang1033\f3\fs18\cf0\b Why Do I Need Night Security?\plain\lang1033\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic5} +${\footnote Using the Secure Shutdown} +K{\footnote secure shutdown} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Using the Secure Shutdown\plain\f3\fs20\cf2 +\par (ie: 'doing security')\plain\f3\fs18\cf0 \par\pard \plain\f2\fs36\cf3 +\par \plain\f3\fs18 Here's how you'll use the Secure Shutdown every night. Depending on your computer this could take between 5 and 20 minutes (or hours if you just bought the latest machine and have egads of free space. There's a tip on the {\uldb Troubleshooting}{\v Topic3} page on that.). +\par \plain\lang1024\f4\fs28\b +\par \{bmct open.bmp\}\plain\f4\fs28\b Doing Security +\par \plain\f3\fs18 +\par \pard\li567\fi-567\tx567\plain\f3\fs18\b 1\plain\f3\fs18 \tab Make sure all your programs are closed. +\par \plain\f3\fs18\b 2\plain\f3\fs18 \tab Choose 'Secure Shutdown' from the top of your Start Menu. +\par \plain\f3\fs18\b 3\plain\f3\fs18 \tab If prompted enter your password to encrypt your files. +\par +\par +\par \pard\plain\f3\fs18 Secure Shutdown will appear in the top left corner of your screen and a bunch of other boxes and progress bars will show up as it's doing it's work. If any errors take place (for example if a file can't be encrypted) they'll appear in a {\uldb log window}{\v Topic17}. +\par +\par After a while it'll shutdown Windows and run some different programs. By and by it should wipe your hard disk. +\par +\par Don't actually turn off your computer till you see the 'It's now safe to turn off your computer' message. +\par \pard\li425\plain\f3\fs18 +\par +\par \pard\plain\lang1024\f3\fs18\b \{button , JumpContext(1000)\} Problems? +\par \plain\f0\fs20 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic6} +${\footnote Advanced Checklist} +K{\footnote advanced checklist;MS-DOS mode} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} The Advanced Checklist\plain\f3\fs18\cf0 \par\pard +\par The Advanced Wizard lets you tweak all the settings to your heart's content. You can also drag the different items options to change their order in the shutdown. +\par +\par The different items are listed seperately. First come the ones that run in Windows and then on the next page are listed the items that run in MS-DOS Mode. +\par +\par If you change the order of the items, remember that it's almost always best to have the 'Wipe Free Space' item last. +\par +\par +\par \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Checklist Items\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic7} +${\footnote Encrypt Data} +K{\footnote checklist items, encrypt data;WXPY shutdown;read-only files;HomeARC password;ignoring file types} +A{\footnote Items} ++{\footnote items:010} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Encrypt Data\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18\cf0 This item encrypts your data using XPY encryption. Night Security uses parts of Menu Extension program from the HomeARC for it's encryption, so you'll need to make sure you have it installed. +\par \plain\lang1024\f4\fs28\b +\par \{bmct open.bmp\} \plain\f4\fs28\b Setting up your Encryption +\par \plain\f3\fs18 +\par \pard\tx567\plain\f3\fs18 Use the 'Add' button to add folders to the list. Or just drag files or folders from explorer. To remove folders first select them and click the 'Remove' button or press Delete (on your keyboard).\plain\lang1024\f3\fs18 +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18 +\par \pard\li425\fi-425\tx567\plain\lang1024\f4\fs28\b \{bmct open.bmp\} \plain\f4\fs28\b Advanced Options +\par \plain\f3\fs18\cf0\b +\par Disable HomeARC Password\plain\f3\fs18\cf0 +\par \tab Use this option to remove your password from memory after the encrypting is finished. If you don't turn off your computer and your password is still in memory others can open your files, so it's a good idea to keep this option checked. +\par +\par \plain\f3\fs18\cf0\b Encrypt Read-only/System Files\plain\f3\fs18\cf0 +\par \tab Normally XPY encryption won't close read-only or system files as a safety feature. If you'd like to override this for some reason then check this box. +\par +\par \plain\f3\fs18\cf0\b Ignore Files with These Extensions\plain\f3\fs18\cf0 +\par \tab If you want to leave certain types of files out of your encryption here's where to do it. For example you may not want to encrypt shortcut files because then they won't work properly. To ignore these files first click on the new button (the little sparkle) and type 'lnk' (the extension for shortcuts) in the box. Or if you don't want to encrypt Excel files you'd type 'xls'. +\par +\par +\par \pard\plain\f3\fs18\cf0 \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \pard\li425\fi-425\tx567\plain\f4\fs28\b +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic8} +${\footnote Night Security Options} +K{\footnote checklist items} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Night Security Options\plain\f3\fs18\cf0 \par\pard +\par The different items you select in the top of your checklist all get run before actually exiting Windows. These include things such as encrypting your data, or emptying your Recycle Bin. +\par +\par Some of the items near the bottom get run after exiting Windows. These include things such as wiping the free space on your hard disk and other clean up tasks that can't (or shouldn't be) run in Windows. +\par +\par Remember that it's almost always best to have the 'Wipe Free Space' item enabled. That's the whole reason you do your shutdown. +\par +\par (See: {\uldb Why do I need a Secure Shutdown}{\v Topic2} for more info) +\par +\par +\par \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Checklist Items\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic9} +${\footnote Backup Data} +K{\footnote checklist items: backup data;backup types;backup types,archive based;backup types,date based;ignoring file types;} +A{\footnote Items} ++{\footnote Items:015} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Backup Data\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18\cf0 This item backs up your data to either a removable drive such as a Zip Drive, or if you're on a network you can copy your files to a server. +\par \plain\lang1024\f4\fs28\b +\par \{bmct open.bmp\} \plain\f4\fs28\b Setting up your Backup +\par \plain\f3\fs18 +\par First you have to specify what you want to backup. To add folders click the 'Add' button. You can also drag files or folders from Exlporer. To remove folders from the list select them and click 'Remove'. +\par +\par Now on the next page, choose the location you'd like to send your files. Click 'Browse' and then select your Zip drive, or network location. +\par +\par \pard\li567\fi-425\tx567\plain\lang1024\f3\fs18 \tab \tab +\par \pard\li425\fi-425\tx567\plain\lang1024\f4\fs28\b \{bmct open.bmp\} \plain\f4\fs28\b Advanced Options +\par \plain\f3\fs18\cf0\b +\par Backup According to\plain\f3\fs18\cf0 +\par \tab There are two ways you can backup your data. Either it can be compared and checked when it was last modified (by Date) or each file can be marked when backed up (by Archive). There's a slight but important difference here. +\par \tab +\par \tab \plain\f3\fs18\cf0\b Archive backup\plain\f3\fs18\cf0 : This is faster and generally reccomended. It marks each file on your computer as backed up and won't back it up again until it's changed. If you want to backup to a new location, it's best to use Date backup or you won't get everything copied. +\par +\par \tab \plain\f3\fs18\cf0\b Date backup\plain\f3\fs18\cf0 : This option compares the last modified date for each file with the one in the backup location. It'll always make sure nothing's missing from the backup. Depending on the amount of files you're backing up it can take up to 20 or 30 times as long. You may get extra copies of files. It also won't work on multiple disks since all the files aren't on the same disk. +\par \pard\li360\tx567\plain\f3\fs18\cf0 +\par \pard\li425\fi-425\tx567\plain\f3\fs18\cf0\b Ignore Files with These Extensions\plain\f3\fs18\cf0 +\par \tab If you want to leave certain types of files out of your backup here's where to do it. For example you may not want to backup MP3 files because of their size. To ignore these files first click on the new button (the little sparkle) and type 'mp3' in the box. +\par \pard\plain\f3\fs18\cf0 +\par +\par \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\f4\fs28\b +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic10} +${\footnote Clear Temporary Internet Files} +K{\footnote checklist items, clear temporary internet files} +A{\footnote Items} ++{\footnote items:040} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Clear Temporary Internet Files\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18\cf0 Stored in your Temporary Internet Files folder is a cache of everything you browse in your web browser. If you're on a Network and use an Intranet, this item can be used to clear out any sensitive data you view. +\par +\par Also since your Temporary Internet Files folder can baloon in size this could also be used to help keep it trim. +\par +\par By default this item clears out all your Temporary Internet Files, however using the Advanced Properties you can specify which files to clear. +\par +\par (Note that this item might not be installed. If it doesn't appear in the list, rerun the Night Security Setup and make sure to choose 'Network Components.') +\par \plain\lang1024\f4\fs28\b +\par \{bmct open.bmp\} \plain\f4\fs28\b Advanced Properties +\par \plain\f3\fs18 +\par All the files in the Temporary Internet Files come from one server or another. In the Advanced Properties you can specify which servers' files you want to clear. This can be useful if you only want to clear sensitive information in the cache from one or two servers. +\par +\par \{bmc ins.bmp \}\tab +\par \pard\li360\plain\f3\fs18 Adds as server to the list. +\par \pard\plain\f3\fs18 +\par \{bmc del.bmp \} +\par \pard\li360\plain\f3\fs18 Removes a server or servers from the list. +\par \pard\plain\f3\fs18 +\par \plain\f3\fs18\b Clear All\plain\f3\fs18 +\par \pard\li360\plain\f3\fs18 Override the list of servers and clear everything (the default) +\par \pard\plain\f3\fs18 +\par \plain\f3\fs18\b Cookies +\par \pard\li360\plain\f3\fs18 This option clears cookies as well as other files from the cache. Usually you won't want to do this. +\par \pard\plain\f3\fs18\cf0 +\par +\par \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \pard\li425\fi-425\tx567\plain\f4\fs28\b +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic11} +${\footnote Empty Temp Folder} +K{\footnote checklist items, empty temp folder} +A{\footnote Items} ++{\footnote items:030} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Empty Temp Folder\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18\cf0 This item clears the folder where your temporary files are stored. +\par +\par \plain\lang1024\f3\fs18 A lot of programs create temporary files when they run. Most of the time they remove those files. But if something goes funny (your computer crashes etc\'85) those files can still be around. \plain\lang1024\f3\fs18\cf0 +\par +\par On Windows 95/98 usually this folder is located 'C:\\Windows\\Temp.' +\par +\par If the Temp folder on your computer doesn't look like a normal Temporary Files folder then Secure Shutdown will warn you before deleting anything. If this happens make sure that it is actually a folder with only Temp files in it. +\par +\par \plain\f3\fs18\cf0 +\par +\par \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic12} +${\footnote Empty Recycle Bin} +K{\footnote checklist items, empty recycle bin} +A{\footnote Items} ++{\footnote items:020} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Empty Recycle Bin\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18\cf0 Any files in your Recycle Bin can be easily recovered. It makes sense to clear it before wiping. +\par +\par This item empties your Recycle Bin and if you have Norton Protection installed also empties the Norton Protected Files. +\par +\par However some people like to take out the trash themselves. Feel free to disable this one if you're one of those. +\par \plain\lang1024\f4\fs28\b +\par \plain\lang1024\f0\fs20 +\par \plain\f3\fs18\cf0 \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic13} +${\footnote Check Hard Disk for Lost Clusters} +K{\footnote checklist items, check hard disk for lost clusters} +A{\footnote Items} ++{\footnote items:050} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Check Hard Disk for Lost Clusters\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18 Sometimes if you've had a computer crash there can be data hiding out in little nooks and crannies of your computer called lost clusters. These are locations on the hard disk that are marked as used, but aren't linked up to any files. +\par +\par Because there can be sensitive data in them, and the Wipe Free Space item can't get to them, it's good to do this check. +\par \plain\lang1024\f4\fs28\b +\par \{bmct open.bmp\} \plain\f4\fs28\b Advanced Properties +\par \plain\f3\fs18 +\par \plain\f3\fs18\b Automatially Fix Errors\plain\f3\fs18 +\par \pard\li360\plain\f3\fs18 When this option is checked Scandisk will run automatically without any intervention from you. (the default) +\par \pard\plain\f3\fs18 +\par \plain\f3\fs18\b Delete Lost Clusters +\par \pard\li360\plain\f3\fs18 This option will remove any lost clusters and make the space available for Wipe Free Space to do it's clean up work. This is definitely recommended over the next option. +\par \pard\plain\f3\fs18 +\par \plain\f3\fs18\b Save Lost Clusters as Files +\par \pard\li360\plain\f3\fs18 This option will save the lost data instead of deleting it. It'll put it in files called 'file0001.chk' in the root folder of your hard disk. +\par \pard\li567\fi-425\tx567\plain\f3\fs18 +\par \pard\plain\f3\fs18\cf0 +\par \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic14} +${\footnote Delete Swap File} +K{\footnote checklist items, delete swap file} +A{\footnote Items} ++{\footnote items:060} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Delete Swap File\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18 Windows uses a file called a swap file to provide memory to programs if there isn't enough. Don't worry about the details, but there can be unencrypted data hiding in that file. +\par +\par It's good to leave this option enabled and remove this file before wiping. +\par +\par Windows will make a new file when it boots the next time, so don't worry about this messing things up\plain\lang1024\f3\fs18\cf0 . +\par \plain\lang1024\f4\fs28\b +\par \pard\li425\fi-425\tx567\plain\f4\fs28\b +\par \pard\plain\f3\fs18\cf0 \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic15} +${\footnote Wipe Free Space} +K{\footnote checklist items, wipe free space} +A{\footnote Items} ++{\footnote items:070} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Wipe Free Space\plain\f3\fs18\cf0 \par\pard +\par \plain\lang1024\f3\fs18 Everytime a file is deleted it isn't actually removed from your hard disk even if you empty your Recycle Bin. Just the name is removed from a sorta index. For this reason you need to make sure to wipe the free space on your hard disk every night. +\par +\par \plain\lang1024\f3\fs18\cf0 Also note that a lot of the other items on the checklist delete files (which aren't properly removed), so it makes sense to leave this item as the last one on the list. +\par +\par Depending on the size of your hard disk, the speed of your computer, and how hard you stare at the monitor (just kidding) this can take anywhere from 15 to 45 minutes. +\par \plain\lang1024\f4\fs28\b +\par \{bmct open.bmp\} \plain\f4\fs28\b Advanced Properties +\par \plain\f3\fs18 +\par \pard\li360\plain\f3\fs18 Normally this item wipes all the drives on your computer. If you have more than one and some of them really don't need to be wiped (ie: have no sensitive data on them) then you can deselect them. You should always wipe the hard disk you have Windows on, though (usually that's C:). +\par +\par +\par \pard\plain\f3\fs18\cf0 \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Other Checklist Items\plain\lang1024\f0\fs20 +\par \pard\li425\fi-425\tx567\plain\f4\fs28\b +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic16} +${\footnote What's New} +K{\footnote new;what's new} ++{\footnote What's New} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} What's New in 2.5\plain\f3\fs18\cf0 \par\pard \plain\f3\fs18 +\par It makes your coffee, bed and does your laundry. It even wakes you up when sleeping in devotions. Oops! Well those are all features for version 3.0, so you'll have to wait. Besides the bugs that were fixed, here's what version 2.5 has got. +\par +\par \plain\f4\fs28\b \{bmc nightsec.bmp \} New Features +\par \pard\li720\fi-360{\*\pn\pnlvlblt\pnf1\pnindent360{\pntxtb\'b7}}\plain\f3\fs18 {\pntext\f1\'b7\tab}There's an all new Encryption feature. There were too many problems and crashes with the old one. Now Encryption is built in. It'll even encrypt read-only files if you want it to. Or ignore certain file types. ({\uldb more}{\v Topic7}) +\par \pard\li360\plain\f3\fs18 +\par \pard\li720\fi-360{\*\pn\pnlvlblt\pnf1\pnindent360{\pntxtb\'b7}}\plain\f3\fs18 {\pntext\f1\'b7\tab}If you need to backup data, you can use the new built in Backup feature. It'll do a backup by last modified date, or by archive setting whatever you prefer. It can also ignore certain types of files. +\par \pard\li360\plain\f3\fs18 +\par \pard\li720\fi-360{\*\pn\pnlvlblt\pnf1\pnindent360{\pntxtb\'b7}}\plain\f3\fs18 {\pntext\f1\'b7\tab}All errors go to log window and don't hold up your Secure Shutdown. Have you ever walked away (read: went to a meeting) while your computer was shutting down, expecting it to be all done after you came back? But instead there was this prompt on your screen! Well, no more! +\par \pard\li360\plain\f3\fs18 +\par \pard\li720\fi-360{\*\pn\pnlvlblt\pnf1\pnindent360{\pntxtb\'b7}}\plain\f3\fs18 {\pntext\f1\'b7\tab}The Wipe Free Space feature now supports more than 2 GB of free space. Previously when you had this much free space it wouldn't get wiped properly. However if you have this much free space it'll take quite a while to wipe. Check out the {\uldb Troubleshooting}{\v Topic3} page for a tip on this. +\par \pard\plain\f3\fs18 +\par \plain\f3\fs18\cf0 \{button , ALink(Items)\} \plain\f3\fs18\cf0\b Checklist Items\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic17} +${\footnote The Log Window} +K{\footnote log window;errors;} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} The Log Window\plain\f3\fs18\cf0 \par\pard +\par If something wierd happens while your Secure Shutdown is, well, 'shutting-down' then a note if it will get sent to the log window. From there you can try and see what went wrong and fix the problem. +\par +\par First try letting it fix it self by right clicking on the problem, and selecting 'Fix'. If that doesn't work, or if 'Fix' just plain isn't available. Then use the 'Retry' option. +\par +\par If that still doesn't fix it, take a look at {\uldb this list}{\v Topic18} and see if you can figure out what went wrong. +\par +\par You can save the list of errors by clicking the 'Save' button at the top of the window. Actually this happens automatically if something goes wrong and you're not at your computer while your computer is doing a Secure Shutdown. +\par +\par +\par \plain\lang1024\f3\fs18\b \{button , JumpContext(1000)\} Troubleshooting\plain\f0\fs20 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Topic18} +${\footnote Log Window Errors} +K{\footnote access denied;read-only files;errors} +\deflang1033\pard\plain\f2\fs36\cf2 \keepn \{bmc heading.bmp \} Log Window Errors\plain\f3\fs18\cf0 \par\pard \plain\f4\fs22\b +\par \plain\f3\fs18\cf0 For your reference, here are some common errors that can occur while your shutdown is taking place.\plain\f4\fs22\b +\par +\par \plain\lang1024\f4\fs22\b \{bmct open.bmp\}\plain\f4\fs22\b \plain\f4\fs22\b Access is denied\plain\f0\fs20 +\par \pard\li360\plain\f3\fs18\cf0 This error means that either the file is read-only and it can't be overwritten, or on a network you don't have the permission to change this file. In a backup, it's probably referring to the destination file.\plain\f0\fs20 +\par \pard\plain\f0\fs20 +\par \plain\lang1024\f4\fs22\b \{bmct open.bmp\}\plain\f4\fs22\b \plain\f4\fs22\b The process cannot access the file because it is being used by another process.\plain\f0\fs22\b +\par \pard\li360\plain\f3\fs18\cf0 A program has this file open and it can't be changed at the same time. Close all other programs on your computer and try again.\plain\f0\fs20 +\par \pard\plain\f0\fs20 +\par \plain\lang1024\f4\fs22\b \{bmct open.bmp\}\plain\f4\fs22\b \plain\f4\fs22\b The file is a read-only, system, hidden or invalid file.\plain\f0\fs20 +\par \pard\li360\plain\f3\fs18\cf0 As a safety precaution XPY Encryption won't encrypt read-only or system files. When it encounters one of these it spews up this error. If you'd like to override this and let XPY encrypt read-only files, go to the advanced wizard and choose that {\uldb option}{\v Topic7}. +\par +\par +\par \pard\plain\lang1024\f3\fs18\b \{button , JumpContext(1000)\} Troubleshooting +\par \plain\f3\fs18\cf0 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup19} +\deflang1033\pard\plain\f0\fs16 Lets you change more options and get at the advanced settings. +\par +\par \plain\f0\fs16\cf0 \{button , JumpContext(1003)\} \plain\f0\fs16\cf0\b Advanced Checklist\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup20} +\deflang1033\pard\plain\f0\fs16\cf0 List of items you'd like to use during your Secure Shutdown. Put a check next to the items you want to use.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup21} +\deflang1033\pard\plain\f0\fs16\cf0 Start the Secure Shutdown now.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup22} +\deflang1033\pard\plain\f0\fs16\cf0 List of items that will run before going into MS-DOS mode. Drag an item to change the order.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup23} +\deflang1033\pard\plain\f0\fs16\cf0 List of items that happen after going into MS-DOS mode. To change the order drag an item. Make sure to keep 'Wipe Free Space' last, though.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup24} +\deflang1033\pard\plain\f0\fs16\cf0 List of files and folders to encrypt. To add files you can drag files from Explorer, or press the 'Add' button.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup25} +\deflang1033\pard\plain\f0\fs16\cf0 Adds a folder to the list of folders to be encrypted. You can also drag files or folders from Explorer.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup26} +\deflang1033\pard\plain\f0\fs16\cf0 Removes a folder from the list of folders to encrypt.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup27} +\deflang1033\pard\plain\f0\fs16\cf0 Disables your XPY/HomeARC password after the Secure Shutdown is complete. \plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup28} +\deflang1033\pard\li425\fi-425\tx567\plain\f0\fs16\cf0 Allow XPY Encryption to encrypt read-only and system files. (Normally not recommended)\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup29} +\deflang1033\pard\plain\f0\fs16\cf0 Ignore files with these extensions when encrypting. (eg: If you wanted to ignore MP3 files make a new item with 'mp3' in it).\plain\f0\fs20 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup30} +\deflang1033\pard\plain\f0\fs16\cf0 Add an item to the list.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup31} +\deflang1033\pard\plain\f0\fs16\cf0 Remove an item from the list.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup32} +\deflang1033\pard\plain\f0\fs16\cf0 List of files and folders to backup. You can drag and drop files here from explorer, or use the 'Add' button.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup33} +\deflang1033\pard\plain\f0\fs16 Adds a folder to the backup list. You can also drag files or folders from Explorer.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup34} +\deflang1033\pard\plain\f0\fs16\cf0 Removes a folder from the list of folders to backup.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup35} +\deflang1033\pard\plain\f0\fs16\cf0 The destination for the backup (use the 'Browse' button, that's easier). You could choose either a Zip Drive or a network location for example.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup36} +\deflang1033\pard\plain\f0\fs16\cf0 Sets the destination for the backup. You could choose either a Zip Drive or a network location for example.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup37} +\deflang1033\pard\plain\f0\fs16 Choose the appropriate method for backups: +\par +\par \plain\f0\fs16\b Archive Backup\plain\f0\fs16 : Faster, and generally recommended. But won't copy all files if backing up to a new location. +\par +\par \plain\f0\fs16\b Date Backup\plain\f0\fs16 : Checks each file for the date it was last modified, slower, but more reliable.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup38} +\deflang1033\pard\plain\f0\fs16\cf0 Ignore files with these extensions when backing up. (eg: If you wanted to ignore MP3 files make a new item with 'mp3' in it).\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup39} +\deflang1033\pard\plain\f0\fs16\cf0 List of servers you'd like to remove cached internet data for.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup40} +\deflang1033\pard\plain\f0\fs16\cf0 In addition, clear cookies from this computer.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup41} +\deflang1033\pard\plain\f0\fs16\cf0 Clear all cached Internet data from the computer.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup42} +\deflang1033\pard\plain\f0\fs16\cf0 Empties the Recycle Bin during the Secure Shutdown.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup43} +\deflang1033\pard\plain\f0\fs16\cf0 Empties the Norton Protected files from the computer if this is installed.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup44} +\deflang1033\pard\plain\f0\fs16\cf0 Drives to wipe the free space on.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup45} +\deflang1033\pard\plain\f0\fs16\cf0 Automatically checks for lost clusters, without prompts or summaries.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup46} +\deflang1033\pard\plain\f0\fs16\cf0 Convert any lost clusters found into files.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup47} +\deflang1033\pard\plain\f0\fs16\cf0 Delete any lost clusters found.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup48} +\deflang1033\pard\plain\f0\fs16\cf0 Go to the next page of the wizard.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup49} +\deflang1033\pard\plain\f0\fs16 Go to the previous page of the wizard.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup50} +\deflang1033\pard\plain\f0\fs16\cf0 Save all my choices and exit.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup51} +\deflang1033\pard\plain\f0\fs16 Saves the error list in a file on your desktop.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup52} +\deflang1033\pard\plain\f0\fs16\cf0 Hides or closes this log window.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +#{\footnote Popup53} +\deflang1033\pard\plain\f0\fs16\cf0 A list of all the errors that occured during the Secure Shutdown.\plain\f4\fs24 +\par \pard\par\plain\qc\cf1\fs22 This help file has been produced using \b helpMATIC Pro V1.22 Shareware\b0\par{\uldb http://members.aol.com/harbsg/}{\v *!ExecFile(http://members.aol.com/harbsg/)} \cf0\plain\par\pard\qc\cf1\fs18\par The above message will not appear in the registered version\cf0\plain\par\pard +\pard\page +} diff --git a/Help/crack.rpl b/Help/crack.rpl new file mode 100644 index 0000000..18b0693 Binary files /dev/null and b/Help/crack.rpl differ diff --git a/Help/crack.xpl b/Help/crack.xpl new file mode 100644 index 0000000..dd03a76 Binary files /dev/null and b/Help/crack.xpl differ diff --git a/Help/del.bmp b/Help/del.bmp new file mode 100644 index 0000000..ac9999e Binary files /dev/null and b/Help/del.bmp differ diff --git a/Help/inetfiles.bmp b/Help/inetfiles.bmp new file mode 100644 index 0000000..b53806d Binary files /dev/null and b/Help/inetfiles.bmp differ diff --git a/Help/ins.bmp b/Help/ins.bmp new file mode 100644 index 0000000..3e5b05d Binary files /dev/null and b/Help/ins.bmp differ diff --git a/Help/nightsec.bmp b/Help/nightsec.bmp new file mode 100644 index 0000000..b488565 Binary files /dev/null and b/Help/nightsec.bmp differ diff --git a/Help/nightsectrans.bmp b/Help/nightsectrans.bmp new file mode 100644 index 0000000..b488565 Binary files /dev/null and b/Help/nightsectrans.bmp differ diff --git a/Help/note.bmp b/Help/note.bmp new file mode 100644 index 0000000..f877724 Binary files /dev/null and b/Help/note.bmp differ diff --git a/Help/recycle.bmp b/Help/recycle.bmp new file mode 100644 index 0000000..c17008e Binary files /dev/null and b/Help/recycle.bmp differ diff --git a/Help/scandisk.bmp b/Help/scandisk.bmp new file mode 100644 index 0000000..b7c4ffc Binary files /dev/null and b/Help/scandisk.bmp differ diff --git a/Help/swapfile.bmp b/Help/swapfile.bmp new file mode 100644 index 0000000..8d16048 Binary files /dev/null and b/Help/swapfile.bmp differ diff --git a/Installshield/Component Definitions/Default.cdf b/Installshield/Component Definitions/Default.cdf new file mode 100644 index 0000000..44fd072 --- /dev/null +++ b/Installshield/Component Definitions/Default.cdf @@ -0,0 +1,238 @@ +[Components] +component0=Help Files +component1=XPY Ex +component2=Program Files +component3=Shared DLLs +component4=Extra (Windows Folder) +component5=Support Files +component6=Network Components + +[Help Files] +SELECTED=Yes +FILENEED=STANDARD +HTTPLOCATION= +STATUS=Copying Help Files... +UNINSTALLABLE=Yes +TARGET= +FTPLOCATION= +VISIBLE=No +DESCRIPTION=Help Files +DISPLAYTEXT=Help Files +IMAGE= +DEFSELECTION=Yes +filegroup0=Help Files +COMMENT= +INCLUDEINBUILD=Yes +INSTALLATION=SAMEORNEWERDATE +COMPRESSIFSEPARATE=No +MISC= +ENCRYPT=No +DISK=ANYDISK +TARGETDIRCDROM= +PASSWORD= +TARGETHIDDEN=General Application Destination + +[TopComponents] +component0=Shared DLLs +component1=Support Files +component2=Help Files +component3=Program Files +component4=Extra (Windows Folder) +component5=Network Components +component6=XPY Ex + +[XPY Ex] +required0=Support Files +SELECTED=Yes +FILENEED=HIGHLYRECOMMENDED +HTTPLOCATION= +STATUS=Copying XPY COM Extension... +UNINSTALLABLE=Yes +TARGET= +FTPLOCATION= +VISIBLE=No +DESCRIPTION=Xpy COM Extension +DISPLAYTEXT=XPY COM Extension +IMAGE= +DEFSELECTION=Yes +filegroup0=XPY DLL +COMMENT= +INCLUDEINBUILD=Yes +INSTALLATION=SAMEORNEWERVERSION\NEWERDATE +COMPRESSIFSEPARATE=No +MISC= +ENCRYPT=No +DISK=ANYDISK +TARGETDIRCDROM= +PASSWORD= +TARGETHIDDEN=Script-defined Folders\ + +[SetupType] +setuptype0=Compact +setuptype1=Typical +setuptype2=Network + +[SetupTypeItem-Compact] +Comment= +item0=Help Files +item1=Program Files +item2=Extra (Windows Folder) +item3=Shared DLLs +Descrip= +item4=Support Files +DisplayText= + +[Program Files] +SELECTED=Yes +FILENEED=CRITICAL +HTTPLOCATION= +STATUS=Copying Program Files... +UNINSTALLABLE=Yes +TARGET= +FTPLOCATION= +VISIBLE=Yes +DESCRIPTION=The main Night Security program files +DISPLAYTEXT=Program Files +IMAGE= +DEFSELECTION=Yes +filegroup0=Program DLLs +COMMENT= +INCLUDEINBUILD=Yes +filegroup1=Program Executable Files +INSTALLATION=SAMEORNEWERVERSION\NEWERDATE +COMPRESSIFSEPARATE=No +MISC= +ENCRYPT=No +DISK=ANYDISK +TARGETDIRCDROM= +PASSWORD= +TARGETHIDDEN=General Application Destination + +[Extra (Windows Folder)] +SELECTED=Yes +FILENEED=HIGHLYRECOMMENDED +HTTPLOCATION= +STATUS=Copying Program files... +UNINSTALLABLE=Yes +TARGET= +FTPLOCATION= +VISIBLE=No +DESCRIPTION=Includes Wiper and other files +DISPLAYTEXT= +IMAGE= +DEFSELECTION=Yes +filegroup0=Windows Folder +COMMENT= +INCLUDEINBUILD=Yes +INSTALLATION=SAMEORNEWERDATE +COMPRESSIFSEPARATE=No +MISC= +ENCRYPT=No +DISK=ANYDISK +TARGETDIRCDROM= +PASSWORD= +TARGETHIDDEN=Windows Operating System + +[Shared DLLs] +SELECTED=Yes +FILENEED=CRITICAL +HTTPLOCATION= +STATUS=Copying Shared DLLs... +UNINSTALLABLE=Yes +TARGET= +FTPLOCATION= +VISIBLE=No +DESCRIPTION=DLLs needed for program +DISPLAYTEXT=Shared DLLs +IMAGE= +DEFSELECTION=Yes +filegroup0=Shared DLLs NoReg +COMMENT= +INCLUDEINBUILD=Yes +filegroup1=Shared DLLs Reg +INSTALLATION=NEWERVERSION +COMPRESSIFSEPARATE=No +MISC= +ENCRYPT=No +DISK=ANYDISK +TARGETDIRCDROM= +PASSWORD= +TARGETHIDDEN=Windows Operating System\Windows System Folder + +[Support Files] +SELECTED=Yes +FILENEED=CRITICAL +HTTPLOCATION= +STATUS=Copying Support Files... +UNINSTALLABLE=Yes +TARGET= +FTPLOCATION= +VISIBLE=No +DESCRIPTION=Additional files needed for the program to run +DISPLAYTEXT= +IMAGE= +DEFSELECTION=Yes +filegroup0=Support Files +requiredby0=XPY Ex +COMMENT= +INCLUDEINBUILD=Yes +INSTALLATION=NEVEROVERWRITE +COMPRESSIFSEPARATE=No +MISC= +ENCRYPT=No +DISK=ANYDISK +TARGETDIRCDROM= +PASSWORD= +TARGETHIDDEN=General Application Destination + +[Network Components] +SELECTED=Yes +FILENEED=STANDARD +HTTPLOCATION= +STATUS=Copying Network Components... +UNINSTALLABLE=Yes +TARGET= +FTPLOCATION= +VISIBLE=Yes +DESCRIPTION=Includes items useful for Intranets and Networks (You must have Internet Explorer for this to install) +DISPLAYTEXT=Network Components +IMAGE= +DEFSELECTION=Yes +filegroup0=Network Components +COMMENT= +INCLUDEINBUILD=Yes +INSTALLATION=SAMEORNEWERVERSION\NEWERDATE +COMPRESSIFSEPARATE=No +MISC= +ENCRYPT=No +DISK=ANYDISK +TARGETDIRCDROM= +PASSWORD= +TARGETHIDDEN=General Application Destination + +[Info] +Type=CompDef +Version=1.00.000 +Name= + +[SetupTypeItem-Network] +item5=Network Components +Comment= +item0=Help Files +item1=Program Files +item2=Extra (Windows Folder) +item3=Shared DLLs +Descrip=Includes Components useful for Intranets and Networks. You must have Internet Explorer (3.0 or higher). If you don't the setup will fail. +item4=Support Files +DisplayText=Network + +[SetupTypeItem-Typical] +Comment= +item0=Help Files +item1=Program Files +item2=Extra (Windows Folder) +item3=Shared DLLs +Descrip=In general you should choose this option unless you're on a network. +item4=Support Files +DisplayText=Typical + diff --git a/Installshield/Component Definitions/Default.fgl b/Installshield/Component Definitions/Default.fgl new file mode 100644 index 0000000..db02071 --- /dev/null +++ b/Installshield/Component Definitions/Default.fgl @@ -0,0 +1,48 @@ +[\] +DISPLAYTEXT=Common Files Folder +TYPE=TEXTSUBFIXED +fulldirectory= + +[\] +DISPLAYTEXT=Windows System Folder +TYPE=TEXTSUBFIXED +fulldirectory= + +[USERDEFINED] +DISPLAYTEXT=Script-defined Folders +SubDir0=USERDEFINED\ +TYPE=USERSTART +fulldirectory= + +[] +DISPLAYTEXT=Program Files Folder +SubDir0=\ +TYPE=TEXTSUBFIXED +fulldirectory= + +[] +DISPLAYTEXT=General Application Destination +TYPE=TEXTSUBFIXED +fulldirectory= + +[] +DISPLAYTEXT=Windows Operating System +SubDir0=\ +TYPE=TEXTSUBFIXED +fulldirectory= + +[TopDir] +SubDir0= +SubDir1= +SubDir2= +SubDir3=USERDEFINED + +[USERDEFINED\] +DISPLAYTEXT= +TYPE=TEXTSUB +fulldirectory= + +[General] +Type=FILELIST +Version=1.10.000 + diff --git a/Installshield/Copy of Night Security.ipr b/Installshield/Copy of Night Security.ipr new file mode 100644 index 0000000..30429b5 --- /dev/null +++ b/Installshield/Copy of Night Security.ipr @@ -0,0 +1,47 @@ +[Language] +LanguageSupport0=0009 +[OperatingSystem] +OSSupport=0000000000010010 +[Data] +CurrentMedia=Disk +CurrentComponentDef=Default.cdf +ProductName=Night Security +set_mifserial= +DevEnvironment=Microsoft Visual C++ +AppExe=C:\Stuff\Projects\Night Security\Release\SecSetup.exe +set_dlldebug=No +EmailAddresss= +Instructions=Instructions.txt +set_testmode=No +set_mif=No +SummaryText= +Department= +HomeURL= +Author= +Type=Generic Application +InstallRoot=E:\Projects\Night Security\Installshield +Version=2.00.100 +InstallationGUID=8ae77320-1fed-11d2-b2d4-0020182b97fc +set_level=Level 3 +CurrentFileGroupDef=Default.fdf +Notes=Notes.txt +set_maxerr=50 +set_args= +set_miffile=Status.mif +set_dllcmdline= +Copyright= +set_warnaserr=No +CurrentPlatform= +Category= +set_preproc= +CurrentLanguage=English +CompanyName= +Description=Description.txt +set_maxwarn=50 +set_crc=Yes +[MediaInfo] +mediadata0=Default/Media\Default +mediadata1=Disk/Media\Disk +[General] +Type=INSTALLMAIN +Version=1.00.000 diff --git a/Installshield/Description.txt b/Installshield/Description.txt new file mode 100644 index 0000000..e69de29 diff --git a/Installshield/File Groups/Default.fdf b/Installshield/File Groups/Default.fdf new file mode 100644 index 0000000..5489879 --- /dev/null +++ b/Installshield/File Groups/Default.fdf @@ -0,0 +1,151 @@ +[FileGroups] +group0=Shared DLLs NoReg +group1=Shared DLLs Reg +group2=Help Files +group3=Windows Folder +group4=Program Executable Files +group5=Program DLLs +group6=XPY DLL +group7=Support Files +group8=Network Components + +[Help Files] +SELFREGISTERING=No +HTTPLOCATION= +LANGUAGE= +OPERATINGSYSTEM= +FTPLOCATION= +FILETYPE=No +INFOTYPE=Standard +COMMENT= +COMPRESS=Yes +COMPRESSDLL= +LINKTYPE=Static Link +POTENTIALLY=No +MISC= + +[Shared DLLs Reg] +SELFREGISTERING=No +HTTPLOCATION= +LANGUAGE= +OPERATINGSYSTEM=0000000000010010 +FTPLOCATION= +FILETYPE=Yes +INFOTYPE=Standard +COMMENT=I'm registering these from script +COMPRESS=Yes +COMPRESSDLL= +LINKTYPE=Static Link +POTENTIALLY=Yes +MISC= + +[Shared DLLs NoReg] +SELFREGISTERING=No +HTTPLOCATION= +LANGUAGE= +OPERATINGSYSTEM=0000000000010010 +FTPLOCATION= +FILETYPE=Yes +INFOTYPE=Standard +COMMENT= +COMPRESS=Yes +COMPRESSDLL= +LINKTYPE=Static Link +POTENTIALLY=Yes +MISC= + +[Program DLLs] +SELFREGISTERING=No +HTTPLOCATION= +LANGUAGE= +OPERATINGSYSTEM=0000000000010010 +FTPLOCATION= +FILETYPE=No +INFOTYPE=Standard +COMMENT=Registered from the script +COMPRESS=Yes +COMPRESSDLL= +LINKTYPE=Static Link +POTENTIALLY=No +MISC= + +[Program Executable Files] +SELFREGISTERING=No +HTTPLOCATION= +LANGUAGE= +OPERATINGSYSTEM=0000000000010010 +FTPLOCATION= +FILETYPE=No +INFOTYPE=Standard +COMMENT= +COMPRESS=Yes +COMPRESSDLL= +LINKTYPE=Static Link +POTENTIALLY=No +MISC= + +[Windows Folder] +SELFREGISTERING=No +HTTPLOCATION= +LANGUAGE= +OPERATINGSYSTEM= +FTPLOCATION= +FILETYPE=No +INFOTYPE=Standard +COMMENT= +COMPRESS=Yes +COMPRESSDLL= +LINKTYPE=Static Link +POTENTIALLY=No +MISC= + +[XPY DLL] +SELFREGISTERING=No +HTTPLOCATION= +LANGUAGE= +OPERATINGSYSTEM=0000000000011050 +FTPLOCATION= +FILETYPE=Yes +INFOTYPE=Standard +COMMENT=I'm registering these from script +COMPRESS=Yes +COMPRESSDLL= +LINKTYPE=Static Link +POTENTIALLY=Yes +MISC= + +[Support Files] +SELFREGISTERING=No +HTTPLOCATION= +LANGUAGE= +OPERATINGSYSTEM= +FTPLOCATION= +FILETYPE=No +INFOTYPE=Standard +COMMENT= +COMPRESS=Yes +COMPRESSDLL= +LINKTYPE=Static Link +POTENTIALLY=No +MISC= + +[Network Components] +SELFREGISTERING=No +HTTPLOCATION= +LANGUAGE= +OPERATINGSYSTEM=0000000000010010 +FTPLOCATION= +FILETYPE=No +INFOTYPE=Standard +COMMENT=Registered from the script +COMPRESS=Yes +COMPRESSDLL= +LINKTYPE=Static Link +POTENTIALLY=No +MISC= + +[Info] +Type=FileGrp +Version=1.00.000 +Name= + diff --git a/Installshield/File Groups/Help Files.fgl b/Installshield/File Groups/Help Files.fgl new file mode 100644 index 0000000..ef16a75 --- /dev/null +++ b/Installshield/File Groups/Help Files.fgl @@ -0,0 +1,9 @@ +[TopDir] +file0=E:\Projects\NightSec\Release\NightSec.cnt +file1=E:\Projects\NightSec\Release\NIGHTSEC.HLP +file2=E:\Projects\NightSec\Release\advanced.txt + +[General] +Type=FILELIST +Version=1.10.000 + diff --git a/Installshield/File Groups/Network Components.fgl b/Installshield/File Groups/Network Components.fgl new file mode 100644 index 0000000..ced7e29 --- /dev/null +++ b/Installshield/File Groups/Network Components.fgl @@ -0,0 +1,7 @@ +[TopDir] +file0=E:\Projects\NightSec\Release\NetCmpts.dll + +[General] +Type=FILELIST +Version=1.10.000 + diff --git a/Installshield/File Groups/Program DLLs.fgl b/Installshield/File Groups/Program DLLs.fgl new file mode 100644 index 0000000..750eb7a --- /dev/null +++ b/Installshield/File Groups/Program DLLs.fgl @@ -0,0 +1,7 @@ +[TopDir] +file0=E:\Projects\NightSec\Release\NSCmpts.dll + +[General] +Type=FILELIST +Version=1.10.000 + diff --git a/Installshield/File Groups/Program Executable Files.fgl b/Installshield/File Groups/Program Executable Files.fgl new file mode 100644 index 0000000..f3417c5 --- /dev/null +++ b/Installshield/File Groups/Program Executable Files.fgl @@ -0,0 +1,9 @@ +[TopDir] +file0=E:\Projects\NightSec\Release\Shutdown.exe +file1=E:\Projects\NightSec\Release\Checklist.exe +file2=E:\Projects\NightSec\Release\CmdLine.exe + +[General] +Type=FILELIST +Version=1.10.000 + diff --git a/Installshield/File Groups/Shared DLLs NoReg.fgl b/Installshield/File Groups/Shared DLLs NoReg.fgl new file mode 100644 index 0000000..025eb11 --- /dev/null +++ b/Installshield/File Groups/Shared DLLs NoReg.fgl @@ -0,0 +1,7 @@ +[TopDir] +file0=E:\Projects\Night Security\Togo\OLEAUT32.DLL + +[General] +Type=FILELIST +Version=1.10.000 + diff --git a/Installshield/File Groups/Shared DLLs Reg.fgl b/Installshield/File Groups/Shared DLLs Reg.fgl new file mode 100644 index 0000000..3ab49fe --- /dev/null +++ b/Installshield/File Groups/Shared DLLs Reg.fgl @@ -0,0 +1,7 @@ +[TopDir] +file0=E:\Projects\NightSec\Release\ATL.DLL + +[General] +Type=FILELIST +Version=1.10.000 + diff --git a/Installshield/File Groups/Support Files.fgl b/Installshield/File Groups/Support Files.fgl new file mode 100644 index 0000000..e62548b --- /dev/null +++ b/Installshield/File Groups/Support Files.fgl @@ -0,0 +1,8 @@ +[TopDir] +file0=E:\Projects\NightSec\Release\DOSMODE.PIF +file1=E:\Projects\NightSec\Release\DOSmode.bat + +[General] +Type=FILELIST +Version=1.10.000 + diff --git a/Installshield/File Groups/Windows Folder.fgl b/Installshield/File Groups/Windows Folder.fgl new file mode 100644 index 0000000..65ba8bf --- /dev/null +++ b/Installshield/File Groups/Windows Folder.fgl @@ -0,0 +1,7 @@ +[TopDir] +file0=E:\Projects\NightSec\Release\NSWIPE.EXE + +[General] +Type=FILELIST +Version=1.10.000 + diff --git a/Installshield/File Groups/XPY DLL.fgl b/Installshield/File Groups/XPY DLL.fgl new file mode 100644 index 0000000..fe48bdf --- /dev/null +++ b/Installshield/File Groups/XPY DLL.fgl @@ -0,0 +1,7 @@ +[TopDir] +file0=E:\Projects\NightSec\Release\XpyEx.dll + +[General] +Type=FILELIST +Version=1.10.000 + diff --git a/Installshield/Media/Default/default.mda b/Installshield/Media/Default/default.mda new file mode 100644 index 0000000..41cf3d4 --- /dev/null +++ b/Installshield/Media/Default/default.mda @@ -0,0 +1,42 @@ +[Platforms] +key0=0000000000000010 +key1=0000000000010000 +count=2 +[Filter] +LANGUAGEDEFAULT=0009 +[GeneralInfo] +MEDIATYPE=144M +DATAASFILES=No +BUILDTYPE=Full +BuildLocation=E:\Projects\Night Security\Installshield\Media\Default +BREAKBYTOPCOMPONENT=No +REFRESH_DATAFILES=Yes +REFRESH_SPLASH=Yes +BUILDSIZE= +Name=Default +REVIEWREPORT=No +REFRESH_IFILES=Yes +PASSWORD= +[SetupInfo] +ENABLELANGDLG=No +ALTERNATEISDELETENAME= +APPLICATIONNAME=Night Security +HIDESTATUSBAR=No +WIN32SENABLE=No +[InstallDateInfo] +TYPE=BUILDTIME +TIME=02:02:40 +DATE=02/09/1999 +[FileInstallDateInfo] +TYPE=ORIGINAL +TIME= +DATE= +[Languages] +key0=0009 +count=1 +[TagFileInfo] +PRODUCTCATEGORY=System Tool +APPLICATIONNAME=Night Security +COMPANYNAME= +VERSION=2.02.400 +INFO= diff --git a/Installshield/Media/Disk/default.mda b/Installshield/Media/Disk/default.mda new file mode 100644 index 0000000..99e9245 --- /dev/null +++ b/Installshield/Media/Disk/default.mda @@ -0,0 +1,61 @@ +[Platforms] +key0=0000000000000010 +key1=0000000000010000 +count=2 + +[Filter] +LANGUAGEDEFAULT=0009 + +[GeneralInfo] +MEDIATYPE=144M +DATAASFILES=No +BUILDTYPE=Full +BuildLocation=E:\Projects\NightSec\Installshield\Media\Disk +BREAKBYTOPCOMPONENT=No +REFRESH_DATAFILES=Yes +REFRESH_SPLASH=Yes +OS_DEPENDENT_SETUPEXE=Yes +GUID=ee2722f2-fd54-11d2-a5b0-0020182b97fc +BUILDSIZE=1430 +Name=Disk +REVIEWREPORT=No +REFRESH_IFILES=Yes +PASSWORD= + +[SetupInfo] +ENABLELANGDLG=No +ALTERNATEISDELETENAME= +APPLICATIONNAME=Night Security +HIDESTATUSBAR=No +WIN32SENABLE=No + +[DataAsFilesComponents] +Help Files=No +XPY Ex=No +Program Files=No +Extra (Windows Folder)=No +Shared DLLs=No +Support Files=No +Network Components=No + +[InstallDateInfo] +TYPE=BUILDTIME +TIME=02:50:03 +DATE=03/25/2000 + +[FileInstallDateInfo] +TYPE=ORIGINAL +TIME=02:50:03 +DATE=03/25/2000 + +[Languages] +key0=0009 +count=1 + +[TagFileInfo] +PRODUCTCATEGORY=System Tool +APPLICATIONNAME=Night Security +COMPANYNAME= +VERSION=2.50.004 +INFO= + diff --git a/Installshield/Night Security.ipr b/Installshield/Night Security.ipr new file mode 100644 index 0000000..90f8938 --- /dev/null +++ b/Installshield/Night Security.ipr @@ -0,0 +1,58 @@ +[Language] +LanguageSupport0=0009 + +[OperatingSystem] +OSSupport=0000000000010010 + +[Data] +CurrentMedia=Disk +set_mifserial= +ProductName=Night Security +CurrentComponentDef=Default.cdf +set_dlldebug=No +AppExe=C:\Stuff\Projects\Night Security\Release\SecSetup.exe +DevEnvironment=Microsoft Visual C++ +FreshBits=FALSE +set_mif=No +set_testmode=No +Instructions=Instructions.txt +EmailAddresss= +SummaryText= +Department= +Type=Generic Application +Author= +HomeURL= +InstallRoot=E:\Projects\NightSec\Installshield +UpdateURL=http:// +set_level=Level 3 +InstallationGUID=8ae77320-1fed-11d2-b2d4-0020182b97fc +Version=2.50.000 +set_miffile=Status.mif +set_args= +set_maxerr=50 +Notes=Notes.txt +CurrentFileGroupDef=Default.fdf +set_dllcmdline= +set_warnaserr=No +Copyright= +set_preproc= +Category=System Tool +CurrentPlatform= +set_compileb4build=Yes +set_crc=Yes +set_maxwarn=50 +Description=Description.txt +CompanyName= +CurrentLanguage=English + +[MediaInfo] +mediadata0=Default/Media\Default +mediadata1=Disk/Media\Disk + +[General] +PassData= +ReadOnly=N +Type=INSTALLMAIN +Version=1.20.000 +PassOn=N + diff --git a/Installshield/Notes.txt b/Installshield/Notes.txt new file mode 100644 index 0000000..e69de29 diff --git a/Installshield/Registry Entries/Default.rge b/Installshield/Registry Entries/Default.rge new file mode 100644 index 0000000..7b63ed1 --- /dev/null +++ b/Installshield/Registry Entries/Default.rge @@ -0,0 +1,4 @@ +[General] +Type=REGISTRYDATA +Version=1.00.000 + diff --git a/Installshield/Script Files/SETUP.dbg b/Installshield/Script Files/SETUP.dbg new file mode 100644 index 0000000..7d395a2 Binary files /dev/null and b/Installshield/Script Files/SETUP.dbg differ diff --git a/Installshield/Script Files/SETUP.ino b/Installshield/Script Files/SETUP.ino new file mode 100644 index 0000000..c654f41 Binary files /dev/null and b/Installshield/Script Files/SETUP.ino differ diff --git a/Installshield/Script Files/SETUP.ins b/Installshield/Script Files/SETUP.ins new file mode 100644 index 0000000..e74384a Binary files /dev/null and b/Installshield/Script Files/SETUP.ins differ diff --git a/Installshield/Script Files/Setup.obs b/Installshield/Script Files/Setup.obs new file mode 100644 index 0000000..776d49e Binary files /dev/null and b/Installshield/Script Files/Setup.obs differ diff --git a/Installshield/Script Files/setup.rul b/Installshield/Script Files/setup.rul new file mode 100644 index 0000000..207d6f6 --- /dev/null +++ b/Installshield/Script Files/setup.rul @@ -0,0 +1,798 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// IIIIIII SSSSSS +// II SS InstallShield (R) +// II SSSSSS (c) 1996-1997, InstallShield Software Corporation +// II SS (c) 1990-1996, InstallShield Corporation +// IIIIIII SSSSSS All Rights Reserved. +// +// +// This code is generated as a starting setup template. You should +// modify it to provide all necessary steps for your setup. +// +// +// File Name: Setup.rul +// +// Description: InstallShield script +// +// Comments: This template script performs a basic setup on a +// Windows 95 or Windows NT 4.0 platform. With minor +// modifications, this template can be adapted to create +// new, customized setups. +// +//////////////////////////////////////////////////////////////////////////////// + + + // Include header file +#include "sdlang.h" +#include "sddialog.h" + +////////////////////// string defines //////////////////////////// + +#define UNINST_LOGFILE_NAME "Uninst.isu" + +//////////////////// installation declarations /////////////////// + + // ----- DLL prototypes ----- + + prototype nscmpts.DllRegisterServer(); + prototype netcmpts.DllRegisterServer(); + prototype nscmpts.DllUnregisterServer(); + prototype netcmpts.DllUnregisterServer(); + prototype atl.DllRegisterServer(); + prototype xpyex.DllRegisterServer(); + + + // ---- script prototypes ----- + + // generated + prototype ShowDialogs(); + prototype MoveFileData(); + prototype HandleMoveDataError( NUMBER ); + prototype ProcessBeforeDataMove(); + prototype ProcessAfterDataMove(); + prototype SetupRegistry(); + prototype SetupFolders(); + prototype CleanUpInstall(); + prototype SetupInstall(); + prototype SetupScreen(); + prototype CheckRequirements(); + prototype DialogShowSdAskDestPath(); + prototype DialogShowSdSetupType(); + prototype DialogShowSdComponentDialog2(); + prototype DialogShowSdSelectFolder(); + prototype DialogShowSdFinishReboot(); + prototype UninstallPrevious(); + + // your prototypes + + + + // ----- global variables ------ + + // generated + BOOL bWinNT, bIsShellExplorer, bInstallAborted, bIs32BitSetup; + STRING svDir; + STRING szXpyExDir; + STRING svName, svCompany, svSerial; + STRING svDefGroup; + STRING szAppPath; + STRING svSetupType; + + + // your global variables + + +/////////////////////////////////////////////////////////////////////////////// +// +// MAIN PROGRAM +// +// The setup begins here by hiding the visible setup +// window. This is done to allow all the titles, images, etc. to +// be established before showing the main window. The following +// logic then performs the setup in a series of steps. +// +/////////////////////////////////////////////////////////////////////////////// +program + Disable( BACKGROUND ); + SetColor( BACKGROUND, BK_BLUE | BK_SMOOTH); + + CheckRequirements(); + + SetupInstall(); + + SetupScreen(); + + if (ShowDialogs()<0) goto end_install; + + if (UninstallPrevious() <0) goto end_install; + + if (ProcessBeforeDataMove()<0) goto end_install; + + if (MoveFileData()<0) goto end_install; + + if (ProcessAfterDataMove()<0) goto end_install; + + if (SetupRegistry()<0) goto end_install; + + if (SetupFolders()<0) goto end_install; + + + end_install: + + CleanUpInstall(); + + // If an unrecoverable error occurred, clean up the partial installation. + // Otherwise, exit normally. + + if (bInstallAborted) then + abort; + endif; + +endprogram + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: ShowDialogs // +// // +// Purpose: This function manages the display and navigation // +// the standard dialogs that exist in a setup. // +// // +/////////////////////////////////////////////////////////////////////////////// +function ShowDialogs() + NUMBER nResult; + begin + + Dlg_Start: + // beginning of dialogs label + + Dlg_SdAskDestPath: + nResult = DialogShowSdAskDestPath(); + if (nResult = BACK) goto Dlg_Start; + + //Dlg_SdSetupType: + // nResult = DialogShowSdSetupType(); + // if (nResult = BACK) goto Dlg_SdAskDestPath; + + Dlg_SdComponentDialog2: + nResult = DialogShowSdComponentDialog2(); + if (nResult = BACK) goto Dlg_SdAskDestPath; +// +// Dlg_SdSelectFolder: +// nResult = DialogShowSdSelectFolder(); +// if (nResult = BACK) goto Dlg_SdSetupType; + + return 0; + + end; + +/////////////////////////////////////////////////////////////////////////////// +// +// UninstallPrevious +// +// Does a quick uninstall of the previous version +// +/////////////////////////////////////////////////////////////////////////////// +function UninstallPrevious() + STRING szTemp; + begin + + szTemp = TARGETDIR ^ "nscmpts.dll"; + + if(Is(FILE_EXISTS, szTemp)) then + UseDLL(szTemp); + nscmpts.DllUnregisterServer(); + UnUseDLL(szTemp); + endif; + + szTemp = TARGETDIR ^ "netcmpts.dll"; + + if(Is(FILE_EXISTS, szTemp)) then + UseDLL(szTemp); + netcmpts.DllUnregisterServer(); + UnUseDLL(szTemp); + endif; + + // Remove old stuff... + RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE ); + RegDBDeleteKey ( "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\SecSetup.exe" ); + RegDBDeleteKey ( "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\NightSec.exe" ); + + DeleteFile("SecSetup.exe"); + DeleteFile("NightSec.exe"); + DeleteFile("ntmode.pif"); + DeleteFile("nightsec.gid"); + +end; + + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: ProcessBeforeDataMove // +// // +// Purpose: This function performs any necessary operations prior to the // +// actual data move operation. // +// // +/////////////////////////////////////////////////////////////////////////////// +function ProcessBeforeDataMove() + STRING svLogFile; + NUMBER nResult; + begin + + nResult = InstallationInfo( "Heavenly Helpers", @PRODUCT_NAME, @PRODUCT_VERSION, @PRODUCT_KEY ); + + svLogFile = UNINST_LOGFILE_NAME; + + DeinstallStart( TARGETDIR, svLogFile, @UNINST_KEY, 0 ); + if (nResult < 0) then + MessageBox( @ERROR_UNINSTSETUP, WARNING ); + endif; + + szAppPath = TARGETDIR; // TODO : if your application .exe is in a subdir of TARGETDIR then add subdir + + if ((bIs32BitSetup) && (bIsShellExplorer)) then + RegDBSetItem( REGDB_APPPATH, szAppPath ); + RegDBSetItem( REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY ); + RegDBSetItem( REGDB_UNINSTALL_NAME, @UNINST_DISPLAY_NAME ); + endif; + + // TODO : update any items you want to process before moving the data + // + + return 0; + end; + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: MoveFileData // +// // +// Purpose: This function handles the data movement for // +// the setup. // +// // +/////////////////////////////////////////////////////////////////////////////// +function MoveFileData() + NUMBER nResult, nDisk; + begin + + nDisk = 1; + SetStatusWindow( 0, "" ); + Disable( DIALOGCACHE ); + Enable( STATUS ); + StatusUpdate( ON, 100 ); + nResult = ComponentMoveData( MEDIA, nDisk, 0 ); + + HandleMoveDataError( nResult ); + + Disable( STATUS ); + + return nResult; + + end; + + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: HandleMoveDataError // +// // +// Purpose: This function handles the error (if any) during the move data // +// operation. // +// // +/////////////////////////////////////////////////////////////////////////////// +function HandleMoveDataError( nResult ) + begin + + switch (nResult) + case 0: + return 0; + default: + SprintfBox( SEVERE, @TITLE_CAPTIONBAR, @ERROR_MOVEDATA, nResult ); + bInstallAborted = TRUE; + return nResult; + endswitch; + + end; + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: ProcessAfterDataMove // +// // +// Purpose: This function performs any necessary operations needed after // +// all data has been moved. // +// // +/////////////////////////////////////////////////////////////////////////////// +function ProcessAfterDataMove() + STRING szReferenceFile; + NUMBER nResult; + BOOL bAllSuccess; + STRING szTemp; +begin + + // We do self registration here and incase of errors + + bAllSuccess = TRUE; + + szTemp = WINSYSDIR ^ "atl.dll"; + + if(Is(FILE_EXISTS, szTemp)) then + nResult = UseDLL(szTemp); + nResult = atl.DllRegisterServer(); + UnUseDLL(szTemp); + + if (nResult < 0) then + bAllSuccess = FALSE; + endif; + endif; + + szTemp = TARGETDIR ^ "nscmpts.dll"; + + if(Is(FILE_EXISTS, szTemp)) then + nResult = UseDLL(szTemp); + nResult = nscmpts.DllRegisterServer(); + UnUseDLL(szTemp); + + if (nResult < 0) then + bAllSuccess = FALSE; + endif; + endif; + + szTemp = TARGETDIR ^ "netcmpts.dll"; + + if(Is(FILE_EXISTS, szTemp)) then + nResult = UseDLL(szTemp); + nResult = netcmpts.DllRegisterServer(); + UnUseDLL(szTemp); + + if (nResult < 0) then + bAllSuccess = FALSE; + endif; + endif; + + szTemp = szXpyExDir ^ "xpyex.dll"; + + if(Is(FILE_EXISTS, szTemp)) then + nResult = UseDLL(szTemp); + nResult = xpyex.DllRegisterServer(); + UnUseDLL(szTemp); + + if (nResult < 0) then + bAllSuccess = FALSE; + endif; + endif; + + + if(!bAllSuccess) then + // If we fail in the Registration then setup for registration + // on reboot + endif; + + + + // DeinstallSetReference specifies a file to be checked before + // uninstallation. If the file is in use, uninstallation will not proceed. + + szReferenceFile = TARGETDIR ^ "nscmpts.dll"; // TODO : If your file is in a subdir of svDir add that here + DeinstallSetReference( szReferenceFile ); + + + return 0; + end; + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: SetupRegistry // +// // +// Purpose: This function makes the registry entries for this setup. // +// // +/////////////////////////////////////////////////////////////////////////////// +function SetupRegistry() + STRING szValue; + NUMBER nType; + NUMBER nSize; + begin + + // TODO : Add all your registry entry keys here + // + // + // RegDBCreateKeyEx, RegDBSetKeyValueEx.... + // + + // Also create all folders that we want to remove on uninstall + + // App Paths + RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE ); + RegDBCreateKeyEx ( "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Shutdown.exe" , "" ); + RegDBCreateKeyEx ( "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Checklist.exe" , "" ); + RegDBCreateKeyEx ( "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\CmdLine.exe" , "" ); + + RegDBSetKeyValueEx ( "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Shutdown.exe" , "" , REGDB_STRING, TARGETDIR ^ "Shutdown.exe" , -1 ); + RegDBSetKeyValueEx ( "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Shutdown.exe" , "Path" , REGDB_STRING, TARGETDIR, -1 ); + RegDBSetKeyValueEx ( "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Checklist.exe" , "" , REGDB_STRING, TARGETDIR ^ "Checklist.exe" , -1 ); + RegDBSetKeyValueEx ( "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Checklist.exe" , "Path" , REGDB_STRING, TARGETDIR, -1 ); + RegDBSetKeyValueEx ( "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\CmdLine.exe" , "" , REGDB_STRING, TARGETDIR ^ "CmdLine.exe" , -1 ); + RegDBSetKeyValueEx ( "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\CmdLine.exe" , "Path" , REGDB_STRING, TARGETDIR, -1 ); + + + // Path for later setups + RegDBCreateKeyEx ( "Software\\Heavenly Helpers\\Night Security" , "" ); + RegDBSetKeyValueEx ( "Software\\Heavenly Helpers\\Night Security", "Path", REGDB_STRING, TARGETDIR, -1); + + // Run Checklist after Reboot and + // Register Components after reboot + RegDBSetKeyValueEx ( "Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce", "NightSec_Checklist", REGDB_STRING, TARGETDIR ^ "Checklist.exe /regserver", -1); + + // Important Component Positions + RegDBSetDefaultRoot ( HKEY_CURRENT_USER ); + RegDBCreateKeyEx ( "Software\\Heavenly Helpers\\Night Security" , "" ); + RegDBCreateKeyEx ( "Software\\Heavenly Helpers\\Night Security\\Components" , "" ); + + // Important Initial Positions of Components + RegDBSetKeyValueEx ( "Software\\Heavenly Helpers\\Night Security\\Components\\NightSecurity.WipefreeSpace" , "Position" , REGDB_NUMBER , "10" , -1 ); + RegDBSetKeyValueEx ( "Software\\Heavenly Helpers\\Night Security\\Components\\NightSecurity.Encrypt" , "Position" , REGDB_NUMBER , "0" , -1 ); + + + if( RegDBGetKeyValueEx ( "Software\\Heavenly Helpers\\Night Security\\Components\\NightSecurity.Encrypt" , "Ignore0000" , nType , szValue , nSize ) < 0) then + RegDBSetKeyValueEx ( "Software\\Heavenly Helpers\\Night Security\\Components\\NightSecurity.Encrypt" , "Ignore0000" , REGDB_STRING , "lnk" , -1 ); + endif; + + return 0; + end; + +/////////////////////////////////////////////////////////////////////////////// +// +// Function: SetupFolders +// +// Purpose: This function creates all the folders and shortcuts for the +// setup. This includes program groups and items for Windows 3.1. +// +/////////////////////////////////////////////////////////////////////////////// +function SetupFolders() +STRING svPath, svShutdownPath; + begin + + + // TODO : Add all your folder (program group) along with shortcuts (program items) + // + // + // CreateProgramFolder, AddFolderIcon.... + // + // Note : for 16-bit setups you should add an uninstaller icon pointing to + // your log file. Under 32-bit this is automatically done by Windows. + svPath = TARGETDIR ^ "Checklist.exe"; + svShutdownPath = TARGETDIR ^ "Shutdown.exe"; + LongPathToQuote ( svPath , TRUE ); + LongPathToQuote ( svShutdownPath , TRUE ); + AddFolderIcon ( "Night Security" , "Night Security Checklist" , svPath , "" , "" , 0 , "" , REPLACE ); + AddFolderIcon ( "Night Security" , "Secure Shutdown" , svShutdownPath , "" , "" , 0 , "" , REPLACE ); + AddFolderIcon ( FOLDER_STARTMENU , "Secure Shutdown" , svShutdownPath , "" , "" , 0 , "" , REPLACE ); + return 0; + end; + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: CleanUpInstall // +// // +// Purpose: This cleans up the setup. Anything that should // +// be released or deleted at the end of the setup should // +// be done here. // +// // +/////////////////////////////////////////////////////////////////////////////// +function CleanUpInstall() + NUMBER nResult; + begin + + + if (bInstallAborted) then + return 0; + endif; + + nResult = DialogShowSdFinishReboot(); + + if (BATCH_INSTALL) then // ensure locked files are properly written + CommitSharedFiles(0); + endif; + + if(nResult == 0 || nResult == NEXT) then + // Remove Checklist after reboot key + RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE ); + RegDBDeleteValue ( "Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce", "NightSec_Checklist"); + + // Only have Register Key + RegDBSetKeyValueEx ( "Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce", "NightSec_Reg", REGDB_STRING, TARGETDIR ^ "Checklist.exe /regserver /close", -1); + endif; + + return 0; + end; + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: SetupInstall // +// // +// Purpose: This will setup the installation. Any general initialization // +// needed for the installation should be performed here. // +// // +/////////////////////////////////////////////////////////////////////////////// +function SetupInstall() + begin + + Enable( CORECOMPONENTHANDLING ); +// Enable( SELFREGISTERBATCH ); + + bInstallAborted = FALSE; + + if (bIs32BitSetup) then + svDir = PROGRAMFILES ^ @COMPANY_NAME ^ @PRODUCT_NAME; + else + svDir = PROGRAMFILES ^ @COMPANY_NAME16 ^ @PRODUCT_NAME16; // use shorten names + endif; + + TARGETDIR = svDir; + + SdProductName( @PRODUCT_NAME ); + + Enable( DIALOGCACHE ); + + return 0; + end; + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: SetupScreen // +// // +// Purpose: This function establishes the screen look. This includes // +// colors, fonts, and text to be displayed. // +// // +/////////////////////////////////////////////////////////////////////////////// +function SetupScreen() + begin + + Enable( FULLWINDOWMODE ); + + PlaceBitmap ( SRCDIR ^ "setup.bmp" , 123 , 10 , 10 , UPPER_LEFT ); + + SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); // Caption bar text. + + Enable( BACKGROUND ); + + Delay( 1 ); + end; + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: CheckRequirements // +// // +// Purpose: This function checks all minimum requirements for the // +// application being installed. If any fail, then the user // +// is informed and the setup is terminated. // +// // +/////////////////////////////////////////////////////////////////////////////// +function CheckRequirements() + NUMBER nvDx, nvDy, nvResult; + STRING svResult; + +begin + + bWinNT = FALSE; + bIsShellExplorer = FALSE; + + // Check screen resolution. + GetExtents( nvDx, nvDy ); + + if (nvDy < 480) then + MessageBox( @ERROR_VGARESOLUTION, WARNING ); + abort; + endif; + + // set 'setup' operation mode + bIs32BitSetup = TRUE; + GetSystemInfo( ISTYPE, nvResult, svResult ); + if (nvResult = 16) then + bIs32BitSetup = FALSE; // running 16-bit setup + return 0; // no additional information required + endif; + + // --- 32-bit testing after this point --- + + // Determine the target system's operating system. + GetSystemInfo( OS, nvResult, svResult ); + + if (nvResult = IS_WINDOWSNT) then + // Running Windows NT. + bWinNT = TRUE; + + // Check to see if the shell being used is EXPLORER shell. + if (GetSystemInfo( OSMAJOR, nvResult, svResult ) = 0) then + if (nvResult >= 4) then + bIsShellExplorer = TRUE; + endif; + endif; + + elseif (nvResult = IS_WINDOWS95 ) then + bIsShellExplorer = TRUE; + + endif; + +end; + + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: DialogShowSdAskDestPath // +// // +// Purpose: This function asks the user for the destination directory. // +// // +/////////////////////////////////////////////////////////////////////////////// +function DialogShowSdAskDestPath() + NUMBER nResult, nvSize, nvType; + STRING szTitle, szMsg, szTemp; + begin + + // If it was installed before we should have path + RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE ); + RegDBGetKeyValueEx ( "Software\\Heavenly Helpers\\Night Security", "Path", nvType, svDir, nvSize); + + + szTitle = ""; + szMsg = ""; + nResult = SdAskDestPath( szTitle, szMsg, svDir, 0 ); + + TARGETDIR = svDir; + szXpyExDir = COMMONFILES ^ "Xpy Ex"; + CreateDir(szXpyExDir); + ComponentSetTarget(MEDIA, "", szXpyExDir); + + return nResult; + end; + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: DialogShowSdSetupType // +// // +// Purpose: This function displays the standard setup type dialog. // +// // +/////////////////////////////////////////////////////////////////////////////// +function DialogShowSdSetupType() + NUMBER nResult, nType; + STRING szTitle, szMsg; + begin + + switch (svSetupType) + case "Typical": + nType = TYPICAL; + case "Custom": + nType = CUSTOM; + case "Compact": + nType = COMPACT; + case "": + svSetupType = "Typical"; + nType = TYPICAL; + endswitch; + + szTitle = ""; + szMsg = ""; + nResult = SetupType( szTitle, szMsg, "", nType, 0 ); + + switch (nResult) + case COMPACT: + svSetupType = "Compact"; + case TYPICAL: + svSetupType = "Typical"; + case CUSTOM: + svSetupType = "Custom"; + endswitch; + + return nResult; + end; + + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: DialogShowSdComponentDialog2 // +// // +// Purpose: This function displays the custom component dialog. // +// // +// // +/////////////////////////////////////////////////////////////////////////////// +function DialogShowSdComponentDialog2() + NUMBER nResult; + STRING szTitle, szMsg; + begin + + if ((svSetupType != "Custom") && (svSetupType != "")) then + return 0; + endif; + + ComponentSelectItem( MEDIA, "Network Components", FALSE ); + + szTitle = ""; + szMsg = "Usually you wouldn't need to change any of these settings. Just click the next button."; + + nResult = SdComponentDialog2( szTitle, szMsg, svDir, "" ); + + return nResult; + end; + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: DialogShowSdSelectFolder // +// // +// Purpose: This function displays the standard folder selection dialog. // +// // +// // +/////////////////////////////////////////////////////////////////////////////// +function DialogShowSdSelectFolder() + NUMBER nResult; + STRING szTitle, szMsg; + begin + + if (svDefGroup = "") then + svDefGroup = @FOLDER_NAME; + endif; + + szTitle = ""; + szMsg = ""; + nResult = SdSelectFolder( szTitle, szMsg, svDefGroup ); + + + + return nResult; + end; + + +/////////////////////////////////////////////////////////////////////////////// +// // +// Function: DialogShowSdFinishReboot // +// // +// Purpose: This function will show the last dialog of the product. // +// It will allow the user to reboot and/or show some readme text. // +// // +/////////////////////////////////////////////////////////////////////////////// +function DialogShowSdFinishReboot() + NUMBER nResult, nDefOptions; + STRING szTitle, szMsg1, szMsg2, szOption1, szOption2, szCommand; + NUMBER bOpt1, bOpt2; + begin + + if (!BATCH_INSTALL) then + bOpt1 = TRUE; + bOpt2 = FALSE; + szMsg1 = ""; + szMsg2 = ""; + szOption1 = "Run Night Security checklist now"; + szOption2 = ""; + nResult = SdFinish( szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2 ); + + if (bOpt1) then + szCommand = TARGETDIR ^ "Checklist.exe"; + LaunchApp ( szCommand , "" ); + endif; + return 0; + endif; + + nDefOptions = SYS_BOOTMACHINE; + szTitle = ""; + szMsg1 = ""; + szMsg2 = ""; + nResult = SdFinishReboot( szTitle, szMsg1, nDefOptions, szMsg2, 0 ); + + return nResult; + end; + + // --- include script file section --- + +#include "sddialog.rul" + + + + + + + + + + + + + + + + diff --git a/Installshield/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp b/Installshield/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp new file mode 100644 index 0000000..29df013 Binary files /dev/null and b/Installshield/Setup Files/Uncompressed Files/Language Independent/OS Independent/setup.bmp differ diff --git a/Installshield/Shell Objects/Default.shl b/Installshield/Shell Objects/Default.shl new file mode 100644 index 0000000..27d9071 --- /dev/null +++ b/Installshield/Shell Objects/Default.shl @@ -0,0 +1,12 @@ +[Data] +Folder3= +Group0=Main +Group1=Startup +Folder0= +Folder1= +Folder2= + +[Info] +Type=ShellObject +Version=1.00.000 + diff --git a/Installshield/String Tables/0009-English/value.shl b/Installshield/String Tables/0009-English/value.shl new file mode 100644 index 0000000..79c08b3 --- /dev/null +++ b/Installshield/String Tables/0009-English/value.shl @@ -0,0 +1,21 @@ +[Data] +TITLE_MAIN=Night Security +COMPANY_NAME= +COMPANY_NAME16= +PRODUCT_VERSION=2.50.004 +ERROR_MOVEDATA=An error occurred during the move data process : %d +UNINST_KEY=Night Security +TITLE_CAPTIONBAR=Night Security Setup +PRODUCT_NAME16=Product +ERROR_VGARESOLUTION=This program requires VGA or better resolution. +FOLDER_NAME=Night Security +UNINST_DISPLAY_NAME=Night Security 2.5 +PRODUCT_KEY=Checklist +PRODUCT_NAME=Night Security +ERROR_UNINSTSETUP=unInstaller setup failed to initialize. You may not be able to uninstall this product. + +[General] +Language=0009 +Type=STRINGTABLESPECIFIC +Version=1.00.000 + diff --git a/Installshield/String Tables/Default.shl b/Installshield/String Tables/Default.shl new file mode 100644 index 0000000..7888a8d --- /dev/null +++ b/Installshield/String Tables/Default.shl @@ -0,0 +1,66 @@ +[TITLE_MAIN] +Comment= + +[COMPANY_NAME] +Comment= + +[COMPANY_NAME16] +Comment= + +[PRODUCT_VERSION] +Comment= + +[ERROR_MOVEDATA] +Comment= + +[Language] +Lang0=0009 +CurrentLang=0 + +[UNINST_KEY] +Comment= + +[TITLE_CAPTIONBAR] +Comment= + +[Data] +Entry0=ERROR_VGARESOLUTION +Entry1=TITLE_MAIN +Entry2=TITLE_CAPTIONBAR +Entry3=UNINST_KEY +Entry4=UNINST_DISPLAY_NAME +Entry5=COMPANY_NAME +Entry6=PRODUCT_NAME +Entry7=PRODUCT_VERSION +Entry8=PRODUCT_KEY +Entry9=ERROR_MOVEDATA +Entry10=ERROR_UNINSTSETUP +Entry11=COMPANY_NAME16 +Entry12=PRODUCT_NAME16 +Entry13=FOLDER_NAME + +[PRODUCT_NAME16] +Comment= + +[ERROR_VGARESOLUTION] +Comment= + +[FOLDER_NAME] +Comment= + +[General] +Type=STRINGTABLE +Version=1.00.000 + +[UNINST_DISPLAY_NAME] +Comment= + +[PRODUCT_KEY] +Comment= + +[PRODUCT_NAME] +Comment= + +[ERROR_UNINSTSETUP] +Comment= + diff --git a/Installshield/Text Substitutions/Build.tsb b/Installshield/Text Substitutions/Build.tsb new file mode 100644 index 0000000..bd0fd2e --- /dev/null +++ b/Installshield/Text Substitutions/Build.tsb @@ -0,0 +1,60 @@ +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[Data] +Key0= +Key1= +Key2= +Key3= +Key4= +Key5= +Key6= +Key7= +Key8= +Key9= + +[General] +Type=TEXTSUB +Version=1.20.000 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + diff --git a/Installshield/Text Substitutions/Setup.tsb b/Installshield/Text Substitutions/Setup.tsb new file mode 100644 index 0000000..a74c370 --- /dev/null +++ b/Installshield/Text Substitutions/Setup.tsb @@ -0,0 +1,86 @@ +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +KeyType=3 +Value= + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[Data] +Key0= +Key1= +Key2= +Key3= +Key4= +Key5= +Key10= +Key6= +Key11= +Key7= +Key12= +Key8= +Key13= +Key9= +Key14= +Key15= + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[General] +Type=TEXTSUB +Version=1.10.000 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + +[] +Value= +KeyType=4 + diff --git a/Interfaces/CmptIfaces.h b/Interfaces/CmptIfaces.h new file mode 100644 index 0000000..9d62116 --- /dev/null +++ b/Interfaces/CmptIfaces.h @@ -0,0 +1,780 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Sat Mar 04 13:33:24 2000 + */ +/* Compiler settings for E:\Projects\NightSec\Interfaces\CmptIfaces.idl: + Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __CmptIfaces_h__ +#define __CmptIfaces_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __ISecureShutdownWin_FWD_DEFINED__ +#define __ISecureShutdownWin_FWD_DEFINED__ +typedef interface ISecureShutdownWin ISecureShutdownWin; +#endif /* __ISecureShutdownWin_FWD_DEFINED__ */ + + +#ifndef __ISecureShutdownDOS_FWD_DEFINED__ +#define __ISecureShutdownDOS_FWD_DEFINED__ +typedef interface ISecureShutdownDOS ISecureShutdownDOS; +#endif /* __ISecureShutdownDOS_FWD_DEFINED__ */ + + +#ifndef __INightSecError_FWD_DEFINED__ +#define __INightSecError_FWD_DEFINED__ +typedef interface INightSecError INightSecError; +#endif /* __INightSecError_FWD_DEFINED__ */ + + +#ifndef __INightSecErrorFix_FWD_DEFINED__ +#define __INightSecErrorFix_FWD_DEFINED__ +typedef interface INightSecErrorFix INightSecErrorFix; +#endif /* __INightSecErrorFix_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +/* interface __MIDL_itf_CmptIfaces_0000 */ +/* [local] */ + +typedef /* [helpstring][uuid][v1_enum] */ +enum NightSecInfo + { nsName = 0, + nsCmdLine = nsName + 1, + nsHelpText = nsCmdLine + 1, + nsForceShow = nsHelpText + 1, + nsHideNormal = nsForceShow + 1, + nsCopyAble = nsHideNormal + 1, + nsHelpFile = nsCopyAble + 1, + nsHelpTopic = nsHelpFile + 1 + } NightSecInfo; + +/* [helpstring] */ #define nsNoPrompt ( 0x2 ) + +/* [helpstring] */ #define nsQuiet ( 0x4 ) + + + +extern RPC_IF_HANDLE __MIDL_itf_CmptIfaces_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_CmptIfaces_0000_v0_0_s_ifspec; + +#ifndef __ISecureShutdownWin_INTERFACE_DEFINED__ +#define __ISecureShutdownWin_INTERFACE_DEFINED__ + +/* interface ISecureShutdownWin */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISecureShutdownWin; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("34F11691-F275-11d2-A589-0020182B97FC") + ISecureShutdownWin : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE DoShutdown( + /* [in] */ long hParent, + /* [in] */ long Mode) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetData( + /* [in] */ IUnknown __RPC_FAR *pUnk) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Info( + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISecureShutdownWinVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + ISecureShutdownWin __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + ISecureShutdownWin __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + ISecureShutdownWin __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *DoShutdown )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ long hParent, + /* [in] */ long Mode); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SetData )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Info )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + END_INTERFACE + } ISecureShutdownWinVtbl; + + interface ISecureShutdownWin + { + CONST_VTBL struct ISecureShutdownWinVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISecureShutdownWin_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISecureShutdownWin_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISecureShutdownWin_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISecureShutdownWin_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISecureShutdownWin_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISecureShutdownWin_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISecureShutdownWin_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISecureShutdownWin_DoShutdown(This,hParent,Mode) \ + (This)->lpVtbl -> DoShutdown(This,hParent,Mode) + +#define ISecureShutdownWin_SetData(This,pUnk) \ + (This)->lpVtbl -> SetData(This,pUnk) + +#define ISecureShutdownWin_get_Info(This,nsItem,pvVal) \ + (This)->lpVtbl -> get_Info(This,nsItem,pvVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownWin_DoShutdown_Proxy( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ long hParent, + /* [in] */ long Mode); + + +void __RPC_STUB ISecureShutdownWin_DoShutdown_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownWin_SetData_Proxy( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + +void __RPC_STUB ISecureShutdownWin_SetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ISecureShutdownWin_get_Info_Proxy( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + +void __RPC_STUB ISecureShutdownWin_get_Info_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISecureShutdownWin_INTERFACE_DEFINED__ */ + + +#ifndef __ISecureShutdownDOS_INTERFACE_DEFINED__ +#define __ISecureShutdownDOS_INTERFACE_DEFINED__ + +/* interface ISecureShutdownDOS */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISecureShutdownDOS; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("34F11692-F275-11d2-A589-0020182B97FC") + ISecureShutdownDOS : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetBatchText( + /* [retval][out] */ BSTR __RPC_FAR *psText) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetData( + /* [in] */ IUnknown __RPC_FAR *pUnk) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Info( + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISecureShutdownDOSVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + ISecureShutdownDOS __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + ISecureShutdownDOS __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + ISecureShutdownDOS __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetBatchText )( + ISecureShutdownDOS __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *psText); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SetData )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Info )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + END_INTERFACE + } ISecureShutdownDOSVtbl; + + interface ISecureShutdownDOS + { + CONST_VTBL struct ISecureShutdownDOSVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISecureShutdownDOS_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISecureShutdownDOS_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISecureShutdownDOS_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISecureShutdownDOS_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISecureShutdownDOS_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISecureShutdownDOS_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISecureShutdownDOS_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISecureShutdownDOS_GetBatchText(This,psText) \ + (This)->lpVtbl -> GetBatchText(This,psText) + +#define ISecureShutdownDOS_SetData(This,pUnk) \ + (This)->lpVtbl -> SetData(This,pUnk) + +#define ISecureShutdownDOS_get_Info(This,nsItem,pvVal) \ + (This)->lpVtbl -> get_Info(This,nsItem,pvVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownDOS_GetBatchText_Proxy( + ISecureShutdownDOS __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *psText); + + +void __RPC_STUB ISecureShutdownDOS_GetBatchText_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownDOS_SetData_Proxy( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + +void __RPC_STUB ISecureShutdownDOS_SetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ISecureShutdownDOS_get_Info_Proxy( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + +void __RPC_STUB ISecureShutdownDOS_get_Info_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISecureShutdownDOS_INTERFACE_DEFINED__ */ + + +#ifndef __INightSecError_INTERFACE_DEFINED__ +#define __INightSecError_INTERFACE_DEFINED__ + +/* interface INightSecError */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_INightSecError; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("409C4B09-9310-11d3-BFC1-0020182B97FC") + INightSecError : public IUnknown + { + public: + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Err( + /* [retval][out] */ HRESULT __RPC_FAR *pbsRet) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Description( + /* [retval][out] */ BSTR __RPC_FAR *pbsRet) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_HelpFile( + /* [retval][out] */ BSTR __RPC_FAR *pbsRet) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_HelpContext( + /* [retval][out] */ long __RPC_FAR *plRet) = 0; + + }; + +#else /* C style interface */ + + typedef struct INightSecErrorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + INightSecError __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + INightSecError __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + INightSecError __RPC_FAR * This); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Err )( + INightSecError __RPC_FAR * This, + /* [retval][out] */ HRESULT __RPC_FAR *pbsRet); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Description )( + INightSecError __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pbsRet); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_HelpFile )( + INightSecError __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pbsRet); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_HelpContext )( + INightSecError __RPC_FAR * This, + /* [retval][out] */ long __RPC_FAR *plRet); + + END_INTERFACE + } INightSecErrorVtbl; + + interface INightSecError + { + CONST_VTBL struct INightSecErrorVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define INightSecError_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define INightSecError_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define INightSecError_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define INightSecError_get_Err(This,pbsRet) \ + (This)->lpVtbl -> get_Err(This,pbsRet) + +#define INightSecError_get_Description(This,pbsRet) \ + (This)->lpVtbl -> get_Description(This,pbsRet) + +#define INightSecError_get_HelpFile(This,pbsRet) \ + (This)->lpVtbl -> get_HelpFile(This,pbsRet) + +#define INightSecError_get_HelpContext(This,plRet) \ + (This)->lpVtbl -> get_HelpContext(This,plRet) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecError_get_Err_Proxy( + INightSecError __RPC_FAR * This, + /* [retval][out] */ HRESULT __RPC_FAR *pbsRet); + + +void __RPC_STUB INightSecError_get_Err_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecError_get_Description_Proxy( + INightSecError __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pbsRet); + + +void __RPC_STUB INightSecError_get_Description_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecError_get_HelpFile_Proxy( + INightSecError __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pbsRet); + + +void __RPC_STUB INightSecError_get_HelpFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecError_get_HelpContext_Proxy( + INightSecError __RPC_FAR * This, + /* [retval][out] */ long __RPC_FAR *plRet); + + +void __RPC_STUB INightSecError_get_HelpContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __INightSecError_INTERFACE_DEFINED__ */ + + +#ifndef __INightSecErrorFix_INTERFACE_DEFINED__ +#define __INightSecErrorFix_INTERFACE_DEFINED__ + +/* interface INightSecErrorFix */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_INightSecErrorFix; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("409C4B04-9310-11d3-BFC1-0020182B97FC") + INightSecErrorFix : public IUnknown + { + public: + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Fixable( + /* [retval][out] */ BOOL __RPC_FAR *pbRet) = 0; + + virtual /* [id] */ HRESULT STDMETHODCALLTYPE Fix( void) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Retryable( + /* [retval][out] */ BOOL __RPC_FAR *pbRet) = 0; + + virtual /* [id] */ HRESULT STDMETHODCALLTYPE Retry( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct INightSecErrorFixVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + INightSecErrorFix __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + INightSecErrorFix __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + INightSecErrorFix __RPC_FAR * This); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Fixable )( + INightSecErrorFix __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + /* [id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Fix )( + INightSecErrorFix __RPC_FAR * This); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Retryable )( + INightSecErrorFix __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + /* [id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Retry )( + INightSecErrorFix __RPC_FAR * This); + + END_INTERFACE + } INightSecErrorFixVtbl; + + interface INightSecErrorFix + { + CONST_VTBL struct INightSecErrorFixVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define INightSecErrorFix_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define INightSecErrorFix_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define INightSecErrorFix_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define INightSecErrorFix_get_Fixable(This,pbRet) \ + (This)->lpVtbl -> get_Fixable(This,pbRet) + +#define INightSecErrorFix_Fix(This) \ + (This)->lpVtbl -> Fix(This) + +#define INightSecErrorFix_get_Retryable(This,pbRet) \ + (This)->lpVtbl -> get_Retryable(This,pbRet) + +#define INightSecErrorFix_Retry(This) \ + (This)->lpVtbl -> Retry(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecErrorFix_get_Fixable_Proxy( + INightSecErrorFix __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + +void __RPC_STUB INightSecErrorFix_get_Fixable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id] */ HRESULT STDMETHODCALLTYPE INightSecErrorFix_Fix_Proxy( + INightSecErrorFix __RPC_FAR * This); + + +void __RPC_STUB INightSecErrorFix_Fix_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecErrorFix_get_Retryable_Proxy( + INightSecErrorFix __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + +void __RPC_STUB INightSecErrorFix_get_Retryable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id] */ HRESULT STDMETHODCALLTYPE INightSecErrorFix_Retry_Proxy( + INightSecErrorFix __RPC_FAR * This); + + +void __RPC_STUB INightSecErrorFix_Retry_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __INightSecErrorFix_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( unsigned long __RPC_FAR *, unsigned long , BSTR __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER BSTR_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER BSTR_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * ); +void __RPC_USER BSTR_UserFree( unsigned long __RPC_FAR *, BSTR __RPC_FAR * ); + +unsigned long __RPC_USER VARIANT_UserSize( unsigned long __RPC_FAR *, unsigned long , VARIANT __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER VARIANT_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER VARIANT_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * ); +void __RPC_USER VARIANT_UserFree( unsigned long __RPC_FAR *, VARIANT __RPC_FAR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Interfaces/CmptIfaces.idl b/Interfaces/CmptIfaces.idl new file mode 100644 index 0000000..c6170f7 --- /dev/null +++ b/Interfaces/CmptIfaces.idl @@ -0,0 +1,107 @@ +// NightSec Worker.idl : IDL source for NightSec Worker.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (NightSec Worker.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + + [ + uuid(34F11690-F275-11d2-A589-0020182B97FC), + helpstring("Info Types"), + ] + typedef [v1_enum] enum NightSecInfo + { + [ helpstring("Component Name (String)") ] nsName, + [ helpstring("Command Line Parameter (String)") ] nsCmdLine, + [ helpstring("Help Text (String)") ] nsHelpText, + [ helpstring("Component Needs to be Setup ie: Defaults not enough (Bool)") ] nsForceShow, + [ helpstring("If Disabled Only show in advanced setup (Bool)") ] nsHideNormal, + [ helpstring("Can make a second copy of component (Bool)") ] nsCopyAble, + [ helpstring("Component HelpFile (String)") ] nsHelpFile, + [ helpstring("Component Help Topic Number (Int)") ] nsHelpTopic + + } NightSecInfo; + + /*[ + uuid(34F11689-F275-11d2-A589-0020182B97FC), + helpstring("Options for Shutdown"), + ] + typedef [v1_enum] enum NightSecOptions + { + [ helpstring("Don't display Prompts") ] nsNoPrompt = 0x00000002, + [ helpstring("Don't display any UI") ] nsQuiet = 0x00000004 + + } NightSecOptions; */ + + [ helpstring("Don't display Prompts") ] const long nsNoPrompt = 0x00000002; + [ helpstring("Don't display any UI") ] const long nsQuiet = 0x00000004; + + [ + object, + uuid(34F11691-F275-11d2-A589-0020182B97FC), + dual, + helpstring("Interface for performing Secure Shutdown Functions Before Exiting to DOS"), + pointer_default(unique) + ] + interface ISecureShutdownWin : IDispatch + { + [id(1), helpstring("Runs this component's shutdown")] + HRESULT DoShutdown([in] long hParent, [in] long Mode); + + [id(2), helpstring("Gives the component an IPropertyBag to store it's properties in")] + HRESULT SetData([in] IUnknown* pUnk); + + [propget, id(3), helpstring("Get's a comonents properties and options")] + HRESULT Info([in] NightSecInfo nsItem, [out, retval] VARIANT* pvVal); + }; + + [ + object, + uuid(34F11692-F275-11d2-A589-0020182B97FC), + dual, + helpstring("Interface for retrieving Batch File Text to be run in a Secure Shutdown going into MS-DOS Mode"), + pointer_default(unique) + ] + interface ISecureShutdownDOS : IDispatch + { + [id(1), helpstring("Gets the components batch file text")] + HRESULT GetBatchText([out, retval] BSTR* psText); + + [id(2), helpstring("Gives the component an IPropertyBag to store it's properties in")] + HRESULT SetData([in] IUnknown* pUnk); + + [propget, id(3), helpstring("Get's a comonents properties and options")] + HRESULT Info([in] NightSecInfo nsItem, [out, retval] VARIANT* pvVal); + }; + + [ + object, + uuid(409C4B09-9310-11d3-BFC1-0020182B97FC), + dual, + helpstring("Interface for retrieving misc information from a Night Security Container"), + pointer_default(unique) + ] + interface INightSecError : IUnknown + { + [propget, id(1)] HRESULT Err([out, retval] HRESULT* pbsRet); + [propget, id(2)] HRESULT Description([out, retval] BSTR* pbsRet); + [propget, id(3)] HRESULT HelpFile([out, retval] BSTR* pbsRet); + [propget, id(4)] HRESULT HelpContext([out, retval] long* plRet); + }; + + [ + object, + uuid(409C4B04-9310-11d3-BFC1-0020182B97FC), + dual, + helpstring("Interface for retrieving misc information from a Night Security Container"), + pointer_default(unique) + ] + interface INightSecErrorFix : IUnknown + { + [propget, id(1)] HRESULT Fixable([out, retval] BOOL* pbRet); + [id(2)] HRESULT Fix(); + [propget, id(3)] HRESULT Retryable([out, retval] BOOL* pbRet); + [id(4)] HRESULT Retry(); + }; \ No newline at end of file diff --git a/Interfaces/Interfaces.dsp b/Interfaces/Interfaces.dsp new file mode 100644 index 0000000..96d17de --- /dev/null +++ b/Interfaces/Interfaces.dsp @@ -0,0 +1,73 @@ +# Microsoft Developer Studio Project File - Name="Interfaces" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Generic Project" 0x010a + +CFG=Interfaces - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Interfaces.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Interfaces.mak" CFG="Interfaces - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Interfaces - Win32 Release" (based on "Win32 (x86) Generic Project") +!MESSAGE "Interfaces - Win32 Debug" (based on "Win32 (x86) Generic Project") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +MTL=midl.exe + +!IF "$(CFG)" == "Interfaces - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "Interfaces - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" + +!ENDIF + +# Begin Target + +# Name "Interfaces - Win32 Release" +# Name "Interfaces - Win32 Debug" +# Begin Source File + +SOURCE=.\CmptIfaces.idl +# ADD MTL /tlb "CmptIfaces.tlb" +# End Source File +# Begin Source File + +SOURCE=.\SiteIfaces.idl +# ADD MTL /tlb "SiteIfaces.tlb" +# End Source File +# End Target +# End Project diff --git a/Interfaces/Interfaces.dsw b/Interfaces/Interfaces.dsw new file mode 100644 index 0000000..c4a8188 --- /dev/null +++ b/Interfaces/Interfaces.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Interfaces"=.\Interfaces.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/Interfaces/SiteIfaces.h b/Interfaces/SiteIfaces.h new file mode 100644 index 0000000..2715d57 --- /dev/null +++ b/Interfaces/SiteIfaces.h @@ -0,0 +1,332 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Thu Apr 20 11:06:45 2000 + */ +/* Compiler settings for E:\Projects\NightSec\Interfaces\SiteIfaces.idl: + Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __SiteIfaces_h__ +#define __SiteIfaces_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __INightSecSiteInfo_FWD_DEFINED__ +#define __INightSecSiteInfo_FWD_DEFINED__ +typedef interface INightSecSiteInfo INightSecSiteInfo; +#endif /* __INightSecSiteInfo_FWD_DEFINED__ */ + + +#ifndef __INightSecErrorLog_FWD_DEFINED__ +#define __INightSecErrorLog_FWD_DEFINED__ +typedef interface INightSecErrorLog INightSecErrorLog; +#endif /* __INightSecErrorLog_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +/* interface __MIDL_itf_SiteIfaces_0000 */ +/* [local] */ + +typedef /* [helpstring][uuid][v1_enum] */ +enum NightSecSiteInfo + { nsAdvanced = 0 + } NightSecSiteInfo; + + + +extern RPC_IF_HANDLE __MIDL_itf_SiteIfaces_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_SiteIfaces_0000_v0_0_s_ifspec; + +#ifndef __INightSecSiteInfo_INTERFACE_DEFINED__ +#define __INightSecSiteInfo_INTERFACE_DEFINED__ + +/* interface INightSecSiteInfo */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_INightSecSiteInfo; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("409C4B01-9310-11d3-BFC1-0020182B97FC") + INightSecSiteInfo : public IDispatch + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Info( + /* [in] */ NightSecSiteInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct INightSecSiteInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + INightSecSiteInfo __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + INightSecSiteInfo __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + INightSecSiteInfo __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + INightSecSiteInfo __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + INightSecSiteInfo __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + INightSecSiteInfo __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + INightSecSiteInfo __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Info )( + INightSecSiteInfo __RPC_FAR * This, + /* [in] */ NightSecSiteInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + END_INTERFACE + } INightSecSiteInfoVtbl; + + interface INightSecSiteInfo + { + CONST_VTBL struct INightSecSiteInfoVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define INightSecSiteInfo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define INightSecSiteInfo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define INightSecSiteInfo_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define INightSecSiteInfo_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define INightSecSiteInfo_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define INightSecSiteInfo_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define INightSecSiteInfo_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define INightSecSiteInfo_get_Info(This,nsItem,pvVal) \ + (This)->lpVtbl -> get_Info(This,nsItem,pvVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE INightSecSiteInfo_get_Info_Proxy( + INightSecSiteInfo __RPC_FAR * This, + /* [in] */ NightSecSiteInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + +void __RPC_STUB INightSecSiteInfo_get_Info_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __INightSecSiteInfo_INTERFACE_DEFINED__ */ + + +#ifndef __INightSecErrorLog_INTERFACE_DEFINED__ +#define __INightSecErrorLog_INTERFACE_DEFINED__ + +/* interface INightSecErrorLog */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_INightSecErrorLog; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("409C4B03-9310-11d3-BFC1-0020182B97FC") + INightSecErrorLog : public IUnknown + { + public: + virtual /* [id] */ HRESULT STDMETHODCALLTYPE AddError( + /* [in] */ IUnknown __RPC_FAR *pUnk) = 0; + + virtual /* [id] */ HRESULT STDMETHODCALLTYPE HasErrors( + /* [retval][out] */ BOOL __RPC_FAR *pbRet) = 0; + + }; + +#else /* C style interface */ + + typedef struct INightSecErrorLogVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + INightSecErrorLog __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + INightSecErrorLog __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + INightSecErrorLog __RPC_FAR * This); + + /* [id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *AddError )( + INightSecErrorLog __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + /* [id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *HasErrors )( + INightSecErrorLog __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + END_INTERFACE + } INightSecErrorLogVtbl; + + interface INightSecErrorLog + { + CONST_VTBL struct INightSecErrorLogVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define INightSecErrorLog_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define INightSecErrorLog_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define INightSecErrorLog_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define INightSecErrorLog_AddError(This,pUnk) \ + (This)->lpVtbl -> AddError(This,pUnk) + +#define INightSecErrorLog_HasErrors(This,pbRet) \ + (This)->lpVtbl -> HasErrors(This,pbRet) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id] */ HRESULT STDMETHODCALLTYPE INightSecErrorLog_AddError_Proxy( + INightSecErrorLog __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + +void __RPC_STUB INightSecErrorLog_AddError_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id] */ HRESULT STDMETHODCALLTYPE INightSecErrorLog_HasErrors_Proxy( + INightSecErrorLog __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + +void __RPC_STUB INightSecErrorLog_HasErrors_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __INightSecErrorLog_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER VARIANT_UserSize( unsigned long __RPC_FAR *, unsigned long , VARIANT __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER VARIANT_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER VARIANT_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * ); +void __RPC_USER VARIANT_UserFree( unsigned long __RPC_FAR *, VARIANT __RPC_FAR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Interfaces/SiteIfaces.idl b/Interfaces/SiteIfaces.idl new file mode 100644 index 0000000..b93abf5 --- /dev/null +++ b/Interfaces/SiteIfaces.idl @@ -0,0 +1,44 @@ +// Checklist.idl : IDL source for Checklist.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (Checklist.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + + [ + uuid(409C4B00-9310-11d3-BFC1-0020182B97FC), + helpstring("Info Types"), + ] + typedef [v1_enum] enum NightSecSiteInfo + { + [ helpstring("Advanced Wizard (Bool)") ] nsAdvanced + + } NightSecSiteInfo; + + [ + object, + uuid(409C4B01-9310-11d3-BFC1-0020182B97FC), + dual, + helpstring("Interface for retrieving misc information from a Night Security Container"), + pointer_default(unique) + ] + interface INightSecSiteInfo : IDispatch + { + [propget, id(1), helpstring("Get's a containers properties and options")] + HRESULT Info([in] NightSecSiteInfo nsItem, [out, retval] VARIANT* pvVal); + }; + + [ + object, + uuid(409C4B03-9310-11d3-BFC1-0020182B97FC), + helpstring("Interface for retrieving misc information from a Night Security Container"), + pointer_default(unique) + ] + interface INightSecErrorLog : IUnknown + { + [id(1)] HRESULT AddError([in] IUnknown* pUnk); + [id(2)] HRESULT HasErrors([out, retval] BOOL* pbRet); + }; + diff --git a/Interfaces/dlldata.c b/Interfaces/dlldata.c new file mode 100644 index 0000000..d1e15e7 --- /dev/null +++ b/Interfaces/dlldata.c @@ -0,0 +1,40 @@ +/********************************************************* + DllData file -- generated by MIDL compiler + + DO NOT ALTER THIS FILE + + This file is regenerated by MIDL on every IDL file compile. + + To completely reconstruct this file, delete it and rerun MIDL + on all the IDL files in this DLL, specifying this file for the + /dlldata command line option + +*********************************************************/ + +#define PROXY_DELEGATION + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_PROXY_FILE( CmptIfaces ) +EXTERN_PROXY_FILE( SiteIfaces ) + + +PROXYFILE_LIST_START +/* Start of list */ + REFERENCE_PROXY_FILE( CmptIfaces ), + REFERENCE_PROXY_FILE( SiteIfaces ), +/* End of list */ +PROXYFILE_LIST_END + + +DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID ) + +#ifdef __cplusplus +} /*extern "C" */ +#endif + +/* end of generated dlldata file */ diff --git a/NSCmpts/ActionEngine.cpp b/NSCmpts/ActionEngine.cpp new file mode 100644 index 0000000..59673b1 --- /dev/null +++ b/NSCmpts/ActionEngine.cpp @@ -0,0 +1,276 @@ +// ActionEngine.cpp: implementation of the CActionEngine class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "ActionEngine.h" + +#include "NSMessages.h" +#include + +////////////////////////////////////////////////////////////////////// +// CActionEngine + +// Starts with only this action +HRESULT CActionEngine::Start(CAction* pFirstAction) +{ + ASSERT(pFirstAction); + clear(); + pFirstAction->addref(); + push_back(pFirstAction); + return Start(); +} + +/////////////////////////////////////////////////////////////////////// +// Starts the Actual Processing + +HRESULT CActionEngine::Start() +{ + HRESULT hr = S_OK; + CAction* pAction = NULL; + UINT nDone = 0; + + // Keep going while there are actions to process + while(size()) + { + // Get current action + pAction = at(0); + ASSERT(pAction); + + try + { + // Do Action + pAction->Do(this, m_hwndUpdates); + + } + catch(CActionError& e) + { + if(m_hwndErrors) + { + // Send Error to Window + NS_ERROR_DATA nsErr; + nsErr.hRes = e.m_hRes; + nsErr.szDesc = e.m_sDesc; + nsErr.lParam = (LPARAM)pAction; + + ::SendMessage(m_hwndErrors, NSM_ERROR, NULL, (LPARAM)&nsErr); + } + + hr = E_FAIL; + } + + // Update the Window + nDone++; + + if(m_hwndUpdates) + { + // Send Update Message + NS_UPDATE_DATA nsUpd; + nsUpd.lCur = nDone; + nsUpd.lTot = nDone + size(); + nsUpd.szMessage1 = NULL; + nsUpd.szMessage2 = NULL; + + // If message returns false then cancel + if(!::SendMessage(m_hwndUpdates, NSM_UPDATE, NULL, (LPARAM)&nsUpd)) + { + hr = E_ABORT; + break; + } + } + + // Remove action from array and release it + erase(begin()); + pAction->release(); + } + + return hr; +} + +///////////////////////////////////////////////////////////////////// +// Starts the Engine in another thread +HANDLE CActionEngine::StartThread() +{ + DWORD dwThreadID = NULL; + return (HANDLE)CreateThread(NULL, 0, ThreadProc, + (LPVOID)this, 0, &dwThreadID); +} + +DWORD CALLBACK CActionEngine::ThreadProc(LPVOID lpParam) +{ + // Need to Initialize for this thread + // BUG: This didn't work in Win95 (non-OSR2) because + // only have CoInitialize + // HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + HRESULT hr = CoInitialize(NULL); + + ASSERT(lpParam); + + CActionEngine* pEngine = (CActionEngine*)lpParam; + HRESULT hRet = pEngine->Start(); + + if(SUCCEEDED(hr)) + CoUninitialize(); + + // Return the result of the engine + // as our thread exit code + return hRet; +} + +// Sets the pointers for the update windows +void CActionEngine::SetUpdates(HWND hwndUpdates /*= NULL*/, + HWND hwndErrors /*= NULL*/) +{ + m_hwndUpdates = hwndUpdates; + m_hwndErrors = hwndErrors; +} + + +/////////////////////////////////////////////////////////////// +// Array Management Stuff + +UINT CActionEngine::Add(CAction* pAction) +{ + ASSERT(pAction); + pAction->addref(); + push_back(pAction); + return size(); +} + +UINT CActionEngine::Insert(CAction* pAction, UINT nIndex) +{ + ASSERT(pAction); + ASSERT(nIndex < size()); + pAction->addref(); + insert(begin() + nIndex, pAction); + return nIndex; +} + +void CActionEngine::Remove(UINT nIndex) +{ + ASSERT(nIndex < size()); + CAction* pAction = at(nIndex); + erase(begin() + nIndex); + pAction->release(); +} + +void CActionEngine::RemoveAll(CAction* pKeep /*= NULL*/) +{ + if(pKeep) + pKeep->addref(); + + while(size()) + { + CAction* pAction = at(0); + pAction->release(); + erase(begin()); + } + + if(pKeep) + { + Add(pKeep); + pKeep->release(); + } +} + +CAction* CActionEngine::At(UINT nIndex) +{ + ASSERT(nIndex < size()); + return at(nIndex); +} + + + + + +//////////////////////////////////////////////////////////////////////// +// CAction Helper Function +//////////////////////////////////////////////////////////////////////// + +void CAction::Update(HWND hwndUpdates, LPCTSTR szDesc) +{ + // Send a message with only the string valid + NS_UPDATE_DATA nsUpd; + nsUpd.lCur = -1; + nsUpd.lTot = -1; + nsUpd.szMessage1 = NULL; + nsUpd.szMessage2 = szDesc; + + ::SendMessage(hwndUpdates, NSM_UPDATE, NULL, (LPARAM)&nsUpd); +} + +void CAction::Update(HWND hwndUpdates, LPCTSTR szStatus, LPCTSTR szDesc) +{ + // Send a message with only the string valid + NS_UPDATE_DATA nsUpd; + nsUpd.lCur = -1; + nsUpd.lTot = -1; + nsUpd.szMessage1 = szStatus; + nsUpd.szMessage2 = szDesc; + + ::SendMessage(hwndUpdates, NSM_UPDATE, NULL, (LPARAM)&nsUpd); +} + + + +////////////////////////////////////////////////////////////////////// +// CActionError Construction Helper Functions + +inline CActionError::CActionError(HRESULT hr, const string& sMessage, + const file_path& path /*= file_path()*/) +{ + Construct(hr, sMessage, path); +} + +CActionError::CActionError(HRESULT hr, UINT nID, + const file_path& path /*= file_path()*/) +{ + string sTemp; + sTemp.load_string(nID); + Construct(hr, sTemp, path); +} + +CActionError::CActionError(const string& sError, HRESULT hr, UINT nID, + const file_path& path /*= file_path()*/) +{ + string sTemp; + sTemp.load_string(nID); + Construct(sError, hr, sTemp, path); +} + +inline CActionError::CActionError(const string& sError, HRESULT hr, const string& sMessage, + const file_path& path /*= file_path()*/) +{ + Construct(sError, hr, sMessage, path); +} + + +void CActionError::Construct(const string& sError, HRESULT hr, string sMessage, const file_path& path) +{ + // Replace with custom message before passing on + sMessage.replace(_T("%e"), sError); + Construct(hr, sMessage, path); +} + +void CActionError::Construct(HRESULT hr, string sMessage, const file_path& path) +{ + m_hRes = hr; + + // If there's a need then replace + if(sMessage.find(_T("%e")) != string::npos) + sMessage.replace(_T("%e"), FormatHR(m_hRes)); + + // Same here + if(path.valid()) + { + sMessage.replace(_T("%f"), path.file()); + sMessage.replace(_T("%F"), path); + } + + m_sDesc = sMessage; +} + +void Lower(string& s) +{ + s.make_lower(); +} diff --git a/NSCmpts/ActionEngine.h b/NSCmpts/ActionEngine.h new file mode 100644 index 0000000..301ed81 --- /dev/null +++ b/NSCmpts/ActionEngine.h @@ -0,0 +1,157 @@ +// ActionEngine.h: interface for the CActionEngine class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_ACTIONENGINE_H__00EC1855_A1A5_11D3_82DB_0020182B97FC__INCLUDED_) +#define AFX_ACTIONENGINE_H__00EC1855_A1A5_11D3_82DB_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include +#include "NSMessages.h" + +//////////////////////////////////////////////////////////////////////// +// Hooks onto any object to provide reference count services + +template +class counted_obj +{ +public: + counted_obj() + { m_lCount = 0; } + long addref() + { return ++m_lCount; } + long release() + { + long lCount = --m_lCount; + + if(lCount <= 0) + delete (TBase*)this; + + return lCount; + } +protected: + long m_lCount; +}; + +//////////////////////////////////////////////////////////////////////// +// Forward Declarations + +class CAction; // Action processed by the Action Engine +class CActionError; // Error thrown by an Action +class CActionEngine; // The Engine + +///////////////////////////////////////////////////////////////////////// +// Abstract class: An Action for the Action Engine + +class CAction + : public counted_obj +{ +public: + CAction() {}; + virtual ~CAction() {}; + + // Does the actual action + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates) + throw(CActionError) = 0; + // Retry after an error + virtual bool IsRetryable() const throw() = 0; + + // Try and fix after there's an error + virtual void Fix(HRESULT hr) throw(CActionError) = 0; + virtual bool IsFixable(HRESULT hr) const throw() = 0; + +protected: + // Helper function for implementations + // Updates the dialog + void Update(HWND hwndUpdates, LPCTSTR szDesc); + void Update(HWND hwndUpdates, LPCTSTR szStatus, LPCTSTR szDesc); +}; + + + +////////////////////////////////////////////////////////////////////// +// An Error thrown by an Action Object and caught by Action Engine +// With built in formatting +// +// %e Error Text +// %f File Name +// %F Full File Path + +class CActionError +{ +// Constructors +public: + // These two get the error message from the HRESULT + CActionError(HRESULT hr, const string& sMessage, + const file_path& path = file_path()); + CActionError(HRESULT hr, UINT nID, + const file_path& path = file_path()); + + // These two ask you to supply the error message + CActionError(const string& sError, HRESULT hr, UINT nID, + const file_path& path = file_path()); + CActionError(const string& sError, HRESULT hr, const string& sMessage, + const file_path& path = file_path()); + + string m_sDesc; // Formatted Error Text + HRESULT m_hRes; // Original HRESULT + +// Helper Functions +protected: + void Construct(HRESULT hr, string sMessage, const file_path& path); + void Construct(const string& sError, HRESULT hr, string sMessage, + const file_path& path); +}; + +///////////////////////////////////////////////////////////////////////// +// The Engine that processes CAction objects +// Derives from a vector of Action pointers + +typedef std::vector action_array; + +class CActionEngine + : protected action_array +{ +// Construction +public: + CActionEngine() {}; + CActionEngine(CAction* pFirstAction) + { push_back(pFirstAction); } + virtual ~CActionEngine() + { RemoveAll(); }; + +// Actions +public: + // These start engine in current thread + HRESULT Start(CAction* pFirstAction); + HRESULT Start(); + + // Start engine in another thread and return immediately + HANDLE StartThread(); + +// Set Properties +public: + void SetUpdates(HWND hwndUpdates = NULL, HWND hwndErrors = NULL); + +// A few array management functions for the outside world +public: + UINT Add(CAction* pAction); + UINT Insert(CAction* pAction, UINT nIndex); + void Remove(UINT nIndex); + void RemoveAll(CAction* pKeep = NULL); + CAction* At(UINT nIndex); + +protected: + HWND m_hwndUpdates; // Window to Send Updates to + HWND m_hwndErrors; // Window to Send Errors to + + // Used to start in a separate thread + static DWORD CALLBACK ThreadProc(LPVOID lpParam); +}; + +void Lower(string& s); +#endif // !defined(AFX_ACTIONENGINE_H__00EC1855_A1A5_11D3_82DB_0020182B97FC__INCLUDED_) + diff --git a/NSCmpts/Backup.cpp b/NSCmpts/Backup.cpp new file mode 100644 index 0000000..5f108bd --- /dev/null +++ b/NSCmpts/Backup.cpp @@ -0,0 +1,177 @@ +// Backup.cpp : Implementation of CBackup + +#include "stdafx.h" +#include "NSCmpts.h" +#include "Backup.h" +#include "ProgressDlg.h" +#include + +///////////////////////////////////////////////////////////////////////////// +// CBackup + +STDMETHODIMP CBackup::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_ISecureShutdownWin + }; + for (int i=0;iget_Info(nsAdvanced, &var); + + if(var.vt == VT_BOOL && var.bVal == TRUE) + return pAdvancedPropMap; + } + + return pNormalPropMap; +} + +/*static DWORD CALLBACK BackupProc(LPVOID lpParam) +{ + CActionEngine* pEngine = (CActionEngine*)lpParam; + return pEngine->Start(); +} +*/ + +STDMETHODIMP CBackup::DoShutdown(long hParent, long lMode) +{ + // Whether or not to show prompts + bool bPrompt = lMode & nsNoPrompt ? false : true; + + // We don't support this option yet + // bool bSilent = lMode & nsQuiet ? true : false; + + // Create the dialog + CActionProgressDlg dlgProgress(m_spUnkSite, IDD_PROGRESSBACKUP); + dlgProgress.Create((HWND)hParent); + dlgProgress.PlayAmination(IDR_AVIBACKUP); + + // Create the first Action + string sTemp = m_Data.GetString(NS_BACKUP_REG_ENGINE, _T("Archive")); + + HRESULT hr = S_OK; + + // Date based backup + if(sTemp == _T("Date")) + { + CBackupActions::DatePrepare* pAction = new CBackupActions::DatePrepare; + hr = pAction->Initialize(m_Data); + m_Engine.Add(pAction); + } + // Archive Based Backup + else + { + CBackupActions::ArchivePrepare* pAction = new CBackupActions::ArchivePrepare; + hr = pAction->Initialize(m_Data); + m_Engine.Add(pAction); + } + + if(FAILED(hr)) + { + if(bPrompt) + MessageBoxTimeout((HWND)hParent, _T("The backup options aren't set up correctly. \n\nRun Night Security Checklist to set the options."), _T("Night Security Backup"), MB_OK | MB_ICONWARNING, 15000, 5000); + + dlgProgress.DestroyWindow(); + return E_INVALIDARG; + } + + // Init the update_monitor + m_Engine.SetUpdates(dlgProgress, dlgProgress); + + // start the backup + HANDLE hThread = m_Engine.StartThread(); + + // Wait for the Thread + WaitForAndIdle(1, &hThread, INFINITE); + + // Get the HRESULT from the Thread + GetExitCodeThread(hThread, (LPDWORD)&hr); + + // Close Dialog + dlgProgress.DestroyWindow(); + + return hr; +} + +// Gets Miscellaneous Info about the Object +STDMETHODIMP CBackup::get_Info(NightSecInfo nsItem, VARIANT* pvVal) +{ + ::VariantClear(pvVal); + + CComBSTR bsRetVal; + + switch(nsItem) + { + case nsName: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_BACKUPNAME); + pvVal->bstrVal = bsRetVal; + return S_OK; + case nsHelpText: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_BACKUPDESC); + pvVal->bstrVal = bsRetVal; + return S_OK; + case nsCmdLine: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_BACKUPPARAM); + pvVal->bstrVal = bsRetVal; + return S_OK; + case nsForceShow: // We have to have our pages shown + pvVal->vt = VT_BOOL; + pvVal->bVal = TRUE; + return S_OK; + case nsCopyAble: + pvVal->vt = VT_BOOL; + pvVal->bVal = TRUE; + return S_OK; + } + + return S_FALSE; +} + +STDMETHODIMP CBackup::SetData(IUnknown* pUnk) +{ + return m_Data.Initialize(pUnk); +} + +/*UINT CBackup::LoadPaths() +{ + m_destPath = m_Data.GetString(NS_BACKUP_REG_DEST, _T("")); + return m_Data.GetStringSet(NS_BACKUP_REG_SOURCE, m_srcPaths); +} +*/ diff --git a/NSCmpts/Backup.h b/NSCmpts/Backup.h new file mode 100644 index 0000000..8cc0c3e --- /dev/null +++ b/NSCmpts/Backup.h @@ -0,0 +1,64 @@ +// Backup.h : Declaration of the CBackup + +#ifndef __BACKUP_H_ +#define __BACKUP_H_ + +#include "resource.h" // main symbols + +#include "ActionEngine.h" +#include "BackupActions.h" + +#include "../common/interfaces.h" +#include + +///////////////////////////////////////////////////////////////////////////// +// CBackup +class ATL_NO_VTABLE CBackup : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl, + public IObjectWithSiteImpl, + public ISpecifyPropertyPagesImplEx +{ +public: + CBackup() + { } + ~CBackup() + { ATLTRACE(_T("Destroying Backup\n")); } + +DECLARE_REGISTRY_RESOURCEID(IDR_BACKUP) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CBackup) + COM_INTERFACE_ENTRY(ISecureShutdownWin) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) + COM_INTERFACE_ENTRY(IObjectWithSite) + COM_INTERFACE_ENTRY(ISpecifyPropertyPages) +END_COM_MAP() + + // Custom version of normal property Map Mechanism (atlextra.h) + virtual ATL_PROPMAP_ENTRY* GetPropertyMap(); + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// ISecureShutdownWin +public: + STDMETHOD(get_Info)(/*[in]*/ NightSecInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + STDMETHOD(DoShutdown)(/*[in]*/ long hParent, /*[in]*/ long lMode); + STDMETHOD(SetData)(/*[in]*/ IUnknown* pUnk); + +protected: + + CActionEngine m_Engine; // The Engine + CPropertyBag m_Data; // Standard Data Object + +// UINT LoadPaths(); +// string_array m_srcPaths; +// file_path m_destPath; +}; + +#endif //__BACKUP_H_ diff --git a/NSCmpts/Backup.rgs b/NSCmpts/Backup.rgs new file mode 100644 index 0000000..de94758 --- /dev/null +++ b/NSCmpts/Backup.rgs @@ -0,0 +1,42 @@ +HKCR +{ + NightSecurity.Backup.25 = s 'Backup Class' + { + CLSID = s '{2E47D920-3D64-11D3-BF0A-0020182B97FC}' + } + NightSecurity.Backup = s 'Backup Class' + { + CurVer = s 'NightSecurity.Backup.25' + CLSID = s '{2E47D920-3D64-11D3-BF0A-0020182B97FC}' + } + NoRemove CLSID + { + ForceRemove {2E47D920-3D64-11D3-BF0A-0020182B97FC} = s 'Backup Class' + { + ProgID = s 'NightSecurity.Backup.25' + VersionIndependentProgID = s 'NightSecurity.Backup' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} + +HKEY_LOCAL_MACHINE +{ + NoRemove 'Software' + { + NoRemove 'Heavenly Helpers' + { + NoRemove 'Night Security' + { + NoRemove 'Installed Components' + { + ForceRemove 'NightSecurity.Backup' + } + } + } + } +} \ No newline at end of file diff --git a/NSCmpts/BackupActions.cpp b/NSCmpts/BackupActions.cpp new file mode 100644 index 0000000..0dff71e --- /dev/null +++ b/NSCmpts/BackupActions.cpp @@ -0,0 +1,293 @@ +// BackupActions.cpp: implementation of the CBackupActions class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "BackupActions.h" + +#include "resource.h" +#include + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +bool CBackupActions::ArchivePrepare::Do(CActionEngine* pEngine, + HWND hwndUpdates) +{ + // Some Checks + ASSERT(pEngine != NULL); + + if(!m_dest.valid()) + throw CActionError(E_INVALIDARG, IDS_BACKUP_ERR_DEST, m_dest); + + // Create destination folder + HRESULT hr = m_dest.create(); + if(FAILED(hr)) + throw CActionError(hr, IDS_BACKUP_ERR_CREATE_DEST, m_dest); + + // This could take a while so message + Update(hwndUpdates, _T("Listing files to backup..."), NULL); + + // Iterate through source folders + string_array::const_iterator iterSrc; + for(iterSrc = m_src.begin(); iterSrc != m_src.end(); iterSrc++) + { + Update(hwndUpdates, NULL, (LPCTSTR)*iterSrc); + + // Variables Used below + file_path srcPath = *iterSrc; + file_path srcFile; + file_path destFile; + + file_iterator fileIter(srcPath.files_begin(file_iterator::sub_folders)); + file_iterator end; + + for( ; fileIter != end; fileIter++) + { + // Check if it has the ARCHIVE attribute set + if(!(fileIter->dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE)) + continue; + + if(fileIter->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + continue; + + // Make File Paths + srcFile = *iterSrc; + + // Destination is root destination + same folder structure as + // original folder + destFile = m_dest; + + if(srcFile.attributes() & FILE_ATTRIBUTE_DIRECTORY) + destFile += *(srcFile.end(false) - 1); + + destFile += fileIter->cFileName; + + srcFile = srcFile.folder() + fileIter->cFileName; + + + // Make sure extension is not in list + if(m_asIgnore.find(srcFile.ext().make_lower()) == m_asIgnore.end()) + { + // Add the file + ArchiveCopy* pCopy = new ArchiveCopy(srcFile, destFile); + pEngine->Add(pCopy); + } + } + + // Error from file_iterator (listing folders) + if(fileIter.state() != ERROR_SUCCESS) + throw CActionError(HRESULT_FROM_WIN32(fileIter.state()), IDS_BACKUP_ERR_LIST, (file_path)*iterSrc); + } + + return false; +} + +HRESULT CBackupActions::BasePrepare::Initialize(const CPropertyBag& data) +{ + m_dest = data.GetString(NS_BACKUP_REG_DEST, _T("")); + data.GetStringSet(NS_BACKUP_REG_SOURCE, m_src); + + string_array asTemp; + data.GetStringSet(NS_IGNORE_REG_EXT, asTemp); + + // Make them all lower + for_each(asTemp.begin(), asTemp.end(), Lower); + + // And copy them to the set (removes doubles) + copy(asTemp.begin(), asTemp.end(), inserter(m_asIgnore, m_asIgnore.begin())); + + // Remove any blanks from ignore + m_asIgnore.erase(_T("")); + + if(!m_dest.valid()) + return E_INVALIDARG; + + return S_OK; +} + +#define FILETIME_TO_64(ft) \ + ((__int64) (ft.dwLowDateTime | ((__int64)(ft.dwHighDateTime << 32)))) + + +bool CBackupActions::DatePrepare::Do(CActionEngine* pEngine, + HWND hwndUpdates) +{ + // Some Checks + ASSERT(pEngine != NULL); + + if(!m_dest.valid()) + throw CActionError(E_INVALIDARG, IDS_BACKUP_ERR_DEST, m_dest); + + // Create destination folder + HRESULT hr = m_dest.create(); + if(FAILED(hr)) + throw CActionError(hr, IDS_BACKUP_ERR_CREATE_DEST, m_dest); + + // This could take a while so message + Update(hwndUpdates, _T("Comparing dates on backup files..."), NULL); + + HANDLE hFile; + FILETIME ftModify; + + // Iterate through source folders + string_array::const_iterator iterSrc; + for(iterSrc = m_src.begin(); iterSrc != m_src.end(); iterSrc++) + { + Update(hwndUpdates, NULL, (LPCTSTR)*iterSrc); + + // Variables Used below + file_path srcPath = *iterSrc; + file_path srcFile; + file_path destFile; + + file_iterator fileIter(srcPath.files_begin(file_iterator::sub_folders)); + file_iterator end; + + for( ; fileIter != end; fileIter++) + { + if(fileIter->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + continue; + + // Make File Paths + srcFile = *iterSrc; + + // Destination is root destination + same folder structure as + // original folder + destFile = m_dest; + + if(srcFile.attributes() & FILE_ATTRIBUTE_DIRECTORY) + destFile += *(srcFile.end(false) - 1); + + destFile += fileIter->cFileName; + + srcFile = srcFile.folder() + fileIter->cFileName; + + + // Make sure extension is not in list + if(m_asIgnore.find(srcFile.ext().make_lower()) != m_asIgnore.end()) + continue; + + // Open the file + hFile = CreateFile(destFile, GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, 0, NULL); + + // Check return Value + if(hFile == INVALID_HANDLE_VALUE) + { + // If no file then Backup + switch(::GetLastError()) + { + case ERROR_FILE_NOT_FOUND: + case ERROR_PATH_NOT_FOUND: + break; + default: + throw CActionError(HRESULT_FROM_WIN32(::GetLastError()), IDS_BACKUP_ERR_FILE, m_dest); + } + } + else + { + // Get the filetime + ftModify.dwHighDateTime = 0; + ftModify.dwLowDateTime = 0; + + if(!GetFileTime(hFile, NULL, NULL, &ftModify)) + throw CActionError(HRESULT_FROM_WIN32(::GetLastError()), IDS_BACKUP_ERR_FILE, destFile); + + CloseHandle(hFile); + + // Are we newer? + if(FILETIME_TO_64(fileIter->ftLastWriteTime) <= FILETIME_TO_64(ftModify)) + continue; + } + + // Add the file + ArchiveCopy* pCopy = new ArchiveCopy(srcFile, destFile); + pEngine->Add(pCopy); + + } + + // Error from file_iterator (listing folders) + if(fileIter.state() != ERROR_SUCCESS) + throw CActionError(HRESULT_FROM_WIN32(fileIter.state()), IDS_BACKUP_ERR_LIST, (file_path)*iterSrc); + } + + return false; +} + +bool CBackupActions::ArchiveCopy::Do(CActionEngine* pEngine, + HWND hwndUpdates) +{ +start: + try + { + // Update any monitors + Update(hwndUpdates, _T("Copying..."), m_src); + + // Create the folder this file is in + HRESULT hr = m_dest.folder().create(); + if(FAILED(hr)) + throw CActionError(hr, IDS_BACKUP_ERR_CREATE_DEST, m_dest.folder()); + + // SetAttributes of the file to make sure it's not read-only + // when read-only CopyFile fails (CopyFile copies attributes) + ::SetFileAttributes(m_dest, FILE_ATTRIBUTE_NORMAL); + + // Copy. Don't worry about overwriting old files + if(!CopyFile(m_src, m_dest, FALSE)) + throw CActionError(HRESULT_FROM_WIN32(::GetLastError()), IDS_BACKUP_ERR_COPY, m_src); + + // Remove the Archive Attribute of the file + SetFileAttributes(m_src, m_src.attributes() ^ FILE_ATTRIBUTE_ARCHIVE); + + return false; + } + catch(CActionError& err) + { + switch(err.m_hRes) + { + case ERROR_HANDLE_DISK_FULL: + case ERROR_DISK_FULL: + case ERROR_DESTINATION_ELEMENT_FULL: + case STG_E_MEDIUMFULL: + { + string sTemp; + sTemp.format(IDS_BACKUP_ERR_DISKFULL, (LPCTSTR)m_src.root()); + + if(IDYES == MessageBoxTimeout(hwndUpdates, sTemp, _T("Secure Shutdown"), MB_OKCANCEL | MB_ICONQUESTION, 15000, 5000)) + break; + } + default: + throw; + } + + } + + goto start; +} + +bool CBackupActions::DateCopy::Do(CActionEngine* pEngine, + HWND hwndUpdates) +{ + // Update any monitors + Update(hwndUpdates, _T("Copying..."), m_src); + + // Create the folder this file is in + HRESULT hr = m_dest.folder().create(); + if(FAILED(hr)) + throw CActionError(hr, IDS_BACKUP_ERR_CREATE_DEST, m_dest.folder()); + + // SetAttributes of the file to make sure it's not read-only + // when read-only CopyFile fails (CopyFile copies attributes) + ::SetFileAttributes(m_dest, FILE_ATTRIBUTE_NORMAL); + + // Copy. Don't worry about overwriting old files + if(!CopyFile(m_src, m_dest, FALSE)) + throw CActionError(HRESULT_FROM_WIN32(::GetLastError()), IDS_BACKUP_ERR_COPY, m_src); + + return false; + + // We don't try to catch disk full errors (and prompt for another disk) + // because that doesn't make any sense in a date based backup +} diff --git a/NSCmpts/BackupActions.h b/NSCmpts/BackupActions.h new file mode 100644 index 0000000..ae1a977 --- /dev/null +++ b/NSCmpts/BackupActions.h @@ -0,0 +1,113 @@ +// BackupActions.h: interface for the CBackupActions class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_BACKUPACTIONS_H__75916453_A62F_11D3_82DF_0020182B97FC__INCLUDED_) +#define AFX_BACKUPACTIONS_H__75916453_A62F_11D3_82DF_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "ActionEngine.h" +#include +#include + +#include "../common/cmptdata.h" + +class CBackupActions +{ +public: + /////////////////////////////////////////////////////// + // Holds the data read functionality for all the + // Different types of backups + class BasePrepare : public CAction + { + public: + BasePrepare() {}; + + // Read Our own Data here + HRESULT Initialize(const CPropertyBag& data); + + protected: + file_path m_dest; + string_array m_src; + string_set m_asIgnore; + }; + + //////////////////////////////////////////////////// + // This action is the first action to go into + // the engine. It adds all the other actions + class ArchivePrepare : public BasePrepare + { + public: + ArchivePrepare() {}; + + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates); + virtual void Fix(HRESULT) { } + virtual bool IsFixable(HRESULT) const + { return false; } + virtual bool IsRetryable() const + { return false; } + }; + + //////////////////////////////////////////////////// + // This action is the first action to go into + // the engine. It adds all the other actions + class DatePrepare : public BasePrepare + { + public: + DatePrepare() {}; + + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates); + virtual void Fix(HRESULT) { } + virtual bool IsFixable(HRESULT) const + { return false; } + virtual bool IsRetryable() const + { return false; } + }; + + ////////////////////////////////////////////////////// + // Standard Archive Backup File + class ArchiveCopy : public CAction + { + public: + ArchiveCopy(const file_path& src, const file_path& dest) + : m_src(src), m_dest(dest) + { } + + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates); + virtual void Fix(HRESULT) { } + virtual bool IsFixable(HRESULT) const + { return false; } + virtual bool IsRetryable() const + { return true; } + + protected: + file_path m_dest; + file_path m_src; + }; + + ////////////////////////////////////////////////////// + // Standard Date Backup File + class DateCopy : public CAction + { + public: + DateCopy(const file_path& src, const file_path& dest) + : m_src(src), m_dest(dest) + { } + + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates); + virtual void Fix(HRESULT/* hr*/) { } + virtual bool IsFixable(HRESULT/* hr*/) const + { return false; } + virtual bool IsRetryable() const + { return true; } + + protected: + file_path m_dest; + file_path m_src; + }; +}; + +#endif // !defined(AFX_BACKUPACTIONS_H__75916453_A62F_11D3_82DF_0020182B97FC__INCLUDED_) diff --git a/NSCmpts/BackupAdvancedProp.cpp b/NSCmpts/BackupAdvancedProp.cpp new file mode 100644 index 0000000..d1c03d9 --- /dev/null +++ b/NSCmpts/BackupAdvancedProp.cpp @@ -0,0 +1,56 @@ +// BackupAdvancedProp.cpp : Implementation of CBackupAdvancedProp +#include "stdafx.h" +#include "NSCmpts.h" +#include "BackupAdvancedProp.h" + +///////////////////////////////////////////////////////////////////////////// +// CBackupAdvancedProp Property Sheet Stuff + +LRESULT CBackupAdvancedProp::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Let it choose an object to get data from + m_Data.Initialize(m_nObjects, m_ppUnk); + + // Set this for CIgnoreProp + m_hwndIgnore = m_hWnd; + + // Let the Ignore stuff initialize + CIgnoreProp::OnInitDialog(uMsg, wParam, lParam, bHandled); + + // Setup the Combo box + m_sEngineType = m_Data.GetString(NS_BACKUP_REG_ENGINE, _T("Archive")); + + m_ctlEngine = GetDlgItem(IDC_ENGINE_TYPE); + m_ctlEngine.AddString(_T("Archive")); + m_ctlEngine.AddString(_T("Date")); + + UpdateData(false); + + bHandled = true; + return TRUE; +} + +LRESULT CBackupAdvancedProp::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Just in case, before going out + UpdateData(true); + return 0; +} + +void CBackupAdvancedProp::UpdateData(bool bSave) +{ + // Let it save/load first + CIgnoreProp::UpdateData(bSave); + + if(bSave) + { + // Get Selected Text + int nSel = m_ctlEngine.GetCurSel(); + m_ctlEngine.GetLBText(nSel, m_sEngineType.get_buffer(m_ctlEngine.GetLBTextLen(nSel))); + } + else + { + // Just Select the Appropriate One + m_ctlEngine.SelectString(-1, m_sEngineType); + } +} diff --git a/NSCmpts/BackupAdvancedProp.h b/NSCmpts/BackupAdvancedProp.h new file mode 100644 index 0000000..5f1fa49 --- /dev/null +++ b/NSCmpts/BackupAdvancedProp.h @@ -0,0 +1,100 @@ +// BackupAdvancedProp.h : Declaration of the CBackupAdvancedProp + +#ifndef __BACKUPADVANCEDPROP_H_ +#define __BACKUPADVANCEDPROP_H_ + +#include "resource.h" // main symbols +#include +#include "../common/CmptData.h" +#include "IgnoreProp.h" +#include +#include + +EXTERN_C const CLSID CLSID_BackupAdvancedProp; + +///////////////////////////////////////////////////////////////////////////// +// CBackupAdvancedProp +class ATL_NO_VTABLE CBackupAdvancedProp : + public CComObjectRootEx, + public CComCoClass, + public IPropertyPageImpl, + public CDialogImplEx, + public CIgnoreProp, + public CContextHelp +{ +// Construction +public: + CBackupAdvancedProp() : CIgnoreProp(m_Data), CDialogImplEx(IDD) + { + m_dwTitleID = IDS_TITLEBackupAdvancedProp; + m_dwHelpFileID = IDS_NSHELPFILE; + m_dwDocStringID = IDS_DOCSTRINGBackupAdvancedProp; + } + ~CBackupAdvancedProp() + { ATLTRACE(_T("Destroying BackupAdvancedProp\n")); } + + enum {IDD = IDD_BACKUPADVANCED}; + +DECLARE_REGISTRY_RESOURCEID(IDR_BACKUPADVANCEDPROP) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CBackupAdvancedProp) + COM_INTERFACE_ENTRY(IPropertyPage) +END_COM_MAP() + +BEGIN_MSG_MAP(CBackupAdvancedProp) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + NOTIFY_HANDLER(IDC_IGNORE_LIST, LVN_ENDLABELEDIT, OnEndLabelEdit) + NOTIFY_HANDLER(IDC_IGNORE_LIST, NM_SETFOCUS, OnListSetFocus) + NOTIFY_HANDLER(IDC_IGNORE_LIST, LVN_KEYDOWN, OnKeyDown) + COMMAND_ID_HANDLER(IDC_NEW, OnAdd) + COMMAND_ID_HANDLER(IDC_DEL, OnRemove) + CHAIN_MSG_MAP(IPropertyPageImpl) + CHAIN_MSG_MAP(CContextHelp) +END_MSG_MAP() + +BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(IDC_ENGINE_TYPE, 4002) + HELP_ID(IDC_IGNORE_LIST, 4005) + HELP_ID(IDC_NEW, 4018) + HELP_ID(IDC_DEL, 4017) +END_HELP_MAP + +// Handler prototypes: +// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); +// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); +// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + + STDMETHOD(Apply)(void) + { + ATLTRACE(_T("CBackupAdvancedProp::Apply\n")); + m_Data.Initialize(m_nObjects, m_ppUnk); + + if(!m_Data.IsInitialized()) + E_FAIL; + + UpdateData(true); + + m_Data.WriteStringSet(NS_IGNORE_REG_EXT, m_asExtensions); + m_Data.WriteString(NS_BACKUP_REG_ENGINE, m_sEngineType); + + m_bDirty = FALSE; + return S_OK; + } + +protected: + // Controls for Dialog + CComboBox m_ctlEngine; + + // Data Stuff + CPropertyBag m_Data; + string m_sEngineType; + void UpdateData(bool bSave = true); +}; + +#endif //__BACKUPADVANCEDPROP_H_ diff --git a/NSCmpts/BackupAdvancedProp.rgs b/NSCmpts/BackupAdvancedProp.rgs new file mode 100644 index 0000000..6a0546a --- /dev/null +++ b/NSCmpts/BackupAdvancedProp.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {E85A26C3-946D-11D3-BFC4-0020182B97FC} = s 'Backup Advanced Properties' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/NSCmpts/BackupData.cpp b/NSCmpts/BackupData.cpp new file mode 100644 index 0000000..5459f2a --- /dev/null +++ b/NSCmpts/BackupData.cpp @@ -0,0 +1,105 @@ +// BackupData.cpp: implementation of the CBackupData class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "BackupData.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +UINT CBackupData::m_nExtensions = 0; +UINT CBackupData::m_nSources = 0; + + +UINT CBackupData::LoadExtensions(string_array& asExt, const CPropertyBag& settings) +{ + int nCnt = 0; // Number of URLs from Registry + string sExt; + string sKeyName; + + // Format Key Name + sKeyName.format(NS_BACKUP_REG_EXT, nCnt++); + + while((sExt = settings.GetString(sKeyName, NS_NO_KEY)) != NS_NO_KEY) + { + asExt.push_back(sExt); + sKeyName.format(NS_BACKUP_REG_EXT, nCnt++); + } + + m_nExtensions = max(m_nExtensions, --nCnt); + return nCnt; +} + +UINT CBackupData::SaveExtensions(const string_array& asExt, CPropertyBag& settings) +{ + UINT nCnt = 0; // Number of URLs from Registry + string sKeyName = _T(""); + + string_array::const_iterator iter = asExt.begin(); + for(; iter != asExt.end(); iter++) + { + sKeyName.format(NS_BACKUP_REG_EXT, nCnt++); + settings.WriteString(sKeyName, *iter); + } + + UINT nRet = nCnt - 1; + + for(; nCnt < m_nExtensions; nCnt++) + { + // Format Registry Key + sKeyName.format(NS_BACKUP_REG_EXT, nCnt); + settings.DeleteProperty(sKeyName); + } + + m_nExtensions = 0; + + return nRet; +} + +UINT CBackupData::LoadSources(file_array& aSources, const CPropertyBag& settings) +{ + int nCnt = 0; + string sPath; + string sKeyName; + + // Format Key Name + sKeyName.format(NS_BACKUP_REG_SOURCE, nCnt++); + + // Add URLs to List Box + while((sPath = settings.GetString(sKeyName, NS_NO_KEY)) != NS_NO_KEY) + { + aSources.push_back(sPath); + + // Format Key Name + sKeyName.format(NS_BACKUP_REG_SOURCE, nCnt++); + } + + return m_nSources = --nCnt; + +} + +UINT CBackupData::SaveSources(const file_array& aSources, CPropertyBag& settings) +{ + UINT nCnt = 0; // Number of URLs from Registry + string sKeyName; + + file_array::const_iterator iter = aSources.begin(); + for(; iter != aSources.end(); iter++) + { + sKeyName.format(NS_BACKUP_REG_SOURCE, nCnt++); + settings.WriteString(sKeyName, *iter); + } + + UINT nRet = nCnt - 1; + + for(; nCnt < m_nSources; nCnt++) + { + // Format Registry Key + sKeyName.format(NS_BACKUP_REG_SOURCE, nCnt); + settings.DeleteProperty(sKeyName); + } + + return nRet; +} diff --git a/NSCmpts/BackupData.h b/NSCmpts/BackupData.h new file mode 100644 index 0000000..a424d40 --- /dev/null +++ b/NSCmpts/BackupData.h @@ -0,0 +1,47 @@ +// BackupData.h: interface for the CBackupData class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_BACKUPDATA_H__00EC1850_A1A5_11D3_82DB_0020182B97FC__INCLUDED_) +#define AFX_BACKUPDATA_H__00EC1850_A1A5_11D3_82DB_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include +#include + +#include +typedef std::vector string_array; + +#include +typedef std::vector file_array; + +#include "../common/cmptdata.h" + +#define NS_NO_KEY _T("No Key") +#define NS_BACKUP_REG_EXT _T("Ignore%.4d") +#define NS_BACKUP_REG_SOURCE _T("Source%.4d") +#define NS_BACKUP_REG_DEST _T("Destination") +#define NS_BACKUP_REG_ENGINE _T("Engine") + +class CBackupData +{ +public: + CBackupData() { }; + + // For Filtering and Advanced Property Sheet + static UINT LoadExtensions(string_array& asExt, const CPropertyBag& settings); + static UINT SaveExtensions(const string_array& asExt, CPropertyBag& settings); + + // For Backup and Source Property Sheet + static UINT LoadSources(file_array& aSources, const CPropertyBag& settings); + static UINT SaveSources(const file_array& aSources, CPropertyBag& settings); + +protected: + static UINT m_nExtensions; + static UINT m_nSources; +}; + +#endif // !defined(AFX_BACKUPDATA_H__00EC1850_A1A5_11D3_82DB_0020182B97FC__INCLUDED_) diff --git a/NSCmpts/BackupDestProp.cpp b/NSCmpts/BackupDestProp.cpp new file mode 100644 index 0000000..6153945 --- /dev/null +++ b/NSCmpts/BackupDestProp.cpp @@ -0,0 +1,67 @@ +// BackupDestProp.cpp : Implementation of CBackupDestProp +#include "stdafx.h" +#include "NSCmpts.h" +#include "BackupDestProp.h" + +#include +#include + +///////////////////////////////////////////////////////////////////////////// +// CBackupDestProp + +LRESULT CBackupDestProp::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Let it choose an object to get data from + m_Data.Initialize(m_nObjects, m_ppUnk); + + // Set Control Text + m_sPath = m_Data.GetString(NS_BACKUP_REG_DEST, _T("")); + SetDlgItemText(IDC_DEST, m_sPath); + + return TRUE; // Let the system set the focus +} + +LRESULT CBackupDestProp::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Last resort. Save text in case of Destroy somewhere + GetDlgItemText(IDC_DEST, m_sPath.get_buffer(MAX_PATH), MAX_PATH); + m_sPath.release_buffer(); + + return 0; +} + +LRESULT CBackupDestProp::OnBrowse(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + // Show a Browse for Folder Dialog + + LPMALLOC pMalloc; + if(FAILED(::SHGetMalloc(&pMalloc))) + return 0; + + BROWSEINFO bi; + bi.hwndOwner = m_hWnd; + bi.pidlRoot = NULL; + bi.pszDisplayName = m_sPath.get_buffer(MAX_PATH); + bi.lpszTitle = _T("Choose folder to backup to:"); + bi.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS; + bi.lpfn = NULL; + bi.lParam = 0; + + LPITEMIDLIST pidl = SHBrowseForFolder(&bi); + + if(pidl == NULL) + return 0; + + m_sPath.release_buffer(); + + if(::SHGetPathFromIDList(pidl, m_sPath.get_buffer(MAX_PATH))) + ::SetWindowText(GetDlgItem(IDC_DEST), m_sPath); + + m_sPath.release_buffer(); + + pMalloc->Free(pidl); + pMalloc->Release(); + + bHandled = true; + return 0; +} diff --git a/NSCmpts/BackupDestProp.h b/NSCmpts/BackupDestProp.h new file mode 100644 index 0000000..0c7e1ee --- /dev/null +++ b/NSCmpts/BackupDestProp.h @@ -0,0 +1,89 @@ +// BackupDestProp.h : Declaration of the CBackupDestProp + +#ifndef __BACKUPDESTPROP_H_ +#define __BACKUPDESTPROP_H_ + +#include "resource.h" // main symbols +#include "../common/cmptdata.h" +#include + +EXTERN_C const CLSID CLSID_BackupDestProp; + +///////////////////////////////////////////////////////////////////////////// +// CBackupDestProp +class ATL_NO_VTABLE CBackupDestProp : + public CComObjectRootEx, + public CComCoClass, + public IPropertyPageImpl, + public CDialogImplEx, + public CContextHelp +{ +// Construction +public: + CBackupDestProp() : CDialogImplEx(IDD) + { + m_dwTitleID = IDS_TITLEBackupDestProp; + m_dwHelpFileID = IDS_NSHELPFILE; + m_dwDocStringID = IDS_DOCSTRINGBackupDestProp; + } + ~CBackupDestProp() + { ATLTRACE(_T("Destroying BackupDestProp\n")); } + + enum {IDD = IDD_BACKUPDEST}; + +DECLARE_REGISTRY_RESOURCEID(IDR_BACKUPDESTPROP) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CBackupDestProp) + COM_INTERFACE_ENTRY(IPropertyPage) +END_COM_MAP() + +BEGIN_MSG_MAP(CBackupDestProp) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + COMMAND_ID_HANDLER(IDC_BROWSE, OnBrowse) + CHAIN_MSG_MAP(IPropertyPageImpl) + CHAIN_MSG_MAP(CContextHelp) +END_MSG_MAP() + +BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(IDC_DEST, 4004) + HELP_ID(IDC_BROWSE, 4003) +END_HELP_MAP + +// Handler prototypes: +// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); +// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); +// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnBrowse(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + + STDMETHOD(Apply)(void) + { + // Get text from Control first if poss + if(IsWindow()) + { + GetDlgItemText(IDC_DEST, m_sPath.get_buffer(MAX_PATH), MAX_PATH); + m_sPath.release_buffer(); + } + + if(!m_Data.IsInitialized()) + m_Data.Initialize(m_nObjects, m_ppUnk); + + if(!m_Data.IsInitialized()) + return E_FAIL; + + m_Data.WriteString(NS_BACKUP_REG_DEST, m_sPath); + m_bDirty = FALSE; + return S_OK; + } + +protected: + CPropertyBag m_Data; + string m_sPath; +}; + +#endif //__BACKUPDESTPROP_H_ diff --git a/NSCmpts/BackupDestProp.rgs b/NSCmpts/BackupDestProp.rgs new file mode 100644 index 0000000..54bec7e --- /dev/null +++ b/NSCmpts/BackupDestProp.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {E85A26C2-946D-11D3-BFC4-0020182B97FC} = s 'Backup Destination Properties' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/NSCmpts/BackupProgress.cpp b/NSCmpts/BackupProgress.cpp new file mode 100644 index 0000000..4f0a062 --- /dev/null +++ b/NSCmpts/BackupProgress.cpp @@ -0,0 +1,20 @@ +// BackupProgress.cpp: implementation of the CBackupProgress class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "BackupProgress.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CBackupProgress::CBackupProgress() +{ + +} + +CBackupProgress::~CBackupProgress() +{ + +} diff --git a/NSCmpts/BackupSourceProp.cpp b/NSCmpts/BackupSourceProp.cpp new file mode 100644 index 0000000..a311ffb --- /dev/null +++ b/NSCmpts/BackupSourceProp.cpp @@ -0,0 +1,27 @@ +// BackupSourceProp.cpp : Implementation of CBackupSourceProp +#include "stdafx.h" +#include "NSCmpts.h" +#include "BackupSourceProp.h" + +///////////////////////////////////////////////////////////////////////////// +// CBackupSourceProp + +LRESULT CBackupSourceProp::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + CSourceProp::OnInitDialog(uMsg, wParam, lParam, bHandled); + + // Let it choose an object for data + m_Data.Initialize(m_nObjects, m_ppUnk); + + // Load the File List + if(m_Data.IsInitialized()) + m_Data.GetStringSet(NS_BACKUP_REG_SOURCE, m_aPaths); + + UpdateData(false); + + // Change Caption Text + SetDlgItemText(IDC_MESSAGE, _T("Backup these files or folders: ")); + + return TRUE; +} + diff --git a/NSCmpts/BackupSourceProp.h b/NSCmpts/BackupSourceProp.h new file mode 100644 index 0000000..8d258be --- /dev/null +++ b/NSCmpts/BackupSourceProp.h @@ -0,0 +1,91 @@ +// BackupSourceProp.h : Declaration of the CBackupSourceProp + +#ifndef __BACKUPSOURCEPROP_H_ +#define __BACKUPSOURCEPROP_H_ + +#include "resource.h" // main symbols + +#include "../common/cmptdata.h" +#include + +#include "sourceprop.h" + + +EXTERN_C const CLSID CLSID_BackupSourceProp; + +///////////////////////////////////////////////////////////////////////////// +// CBackupSourceProp +class ATL_NO_VTABLE CBackupSourceProp : + public CComObjectRootEx, + public CComCoClass, + public IPropertyPageImpl, + + // Get's most of functionality from here + public CSourceProp, + public CContextHelp +{ + +// Construction +public: + CBackupSourceProp() + { + m_dwTitleID = IDS_TITLEBackupSourceProp; + m_dwHelpFileID = IDS_NSHELPFILE; + m_dwDocStringID = IDS_DOCSTRINGBackupSourceProp; + } + ~CBackupSourceProp() + { ATLTRACE(_T("Destroying BackupSourceProp\n")); } + + +DECLARE_REGISTRY_RESOURCEID(IDR_BACKUPSOURCEPROP) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CBackupSourceProp) + COM_INTERFACE_ENTRY(IPropertyPage) + COM_INTERFACE_ENTRY(IDropTarget) +END_COM_MAP() + +BEGIN_MSG_MAP(CBackupSourceProp) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + CHAIN_MSG_MAP(CSourceProp) + CHAIN_MSG_MAP(IPropertyPageImpl) + CHAIN_MSG_MAP(CContextHelp) +END_MSG_MAP() + +BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(IDC_SOURCE_LIST, 4007) + HELP_ID(IDC_ADD, 4001) + HELP_ID(IDC_REMOVE, 4006) +END_HELP_MAP + +// Handler prototypes: +// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); +// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); +// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + + STDMETHOD(Apply)(void) + { + ATLTRACE(_T("CBackupSourceProp::Apply\n")); + + m_Data.Initialize(m_nObjects, m_ppUnk); + + if(!m_Data.IsInitialized()) + return E_FAIL; + + UpdateData(true); + + m_Data.WriteStringSet(NS_BACKUP_REG_SOURCE, m_aPaths); + + m_bDirty = FALSE; + return S_OK; + } + +protected: + CPropertyBag m_Data; + +}; + +#endif //__BACKUPSOURCEPROP_H_ diff --git a/NSCmpts/BackupSourceProp.rgs b/NSCmpts/BackupSourceProp.rgs new file mode 100644 index 0000000..eac62e0 --- /dev/null +++ b/NSCmpts/BackupSourceProp.rgs @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {E85A26C1-946D-11D3-BFC4-0020182B97FC} = s 'Backup Source Properties' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/NSCmpts/CmptIfaces.h b/NSCmpts/CmptIfaces.h new file mode 100644 index 0000000..56c30a8 --- /dev/null +++ b/NSCmpts/CmptIfaces.h @@ -0,0 +1,780 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Sat Mar 04 13:53:21 2000 + */ +/* Compiler settings for E:\Projects\NightSec\Interfaces\CmptIfaces.idl: + Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __CmptIfaces_h__ +#define __CmptIfaces_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __ISecureShutdownWin_FWD_DEFINED__ +#define __ISecureShutdownWin_FWD_DEFINED__ +typedef interface ISecureShutdownWin ISecureShutdownWin; +#endif /* __ISecureShutdownWin_FWD_DEFINED__ */ + + +#ifndef __ISecureShutdownDOS_FWD_DEFINED__ +#define __ISecureShutdownDOS_FWD_DEFINED__ +typedef interface ISecureShutdownDOS ISecureShutdownDOS; +#endif /* __ISecureShutdownDOS_FWD_DEFINED__ */ + + +#ifndef __INightSecError_FWD_DEFINED__ +#define __INightSecError_FWD_DEFINED__ +typedef interface INightSecError INightSecError; +#endif /* __INightSecError_FWD_DEFINED__ */ + + +#ifndef __INightSecErrorFix_FWD_DEFINED__ +#define __INightSecErrorFix_FWD_DEFINED__ +typedef interface INightSecErrorFix INightSecErrorFix; +#endif /* __INightSecErrorFix_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +/* interface __MIDL_itf_CmptIfaces_0000 */ +/* [local] */ + +typedef /* [helpstring][uuid][v1_enum] */ +enum NightSecInfo + { nsName = 0, + nsCmdLine = nsName + 1, + nsHelpText = nsCmdLine + 1, + nsForceShow = nsHelpText + 1, + nsHideNormal = nsForceShow + 1, + nsCopyAble = nsHideNormal + 1, + nsHelpFile = nsCopyAble + 1, + nsHelpTopic = nsHelpFile + 1 + } NightSecInfo; + +/* [helpstring] */ #define nsNoPrompt ( 0x2 ) + +/* [helpstring] */ #define nsQuiet ( 0x4 ) + + + +extern RPC_IF_HANDLE __MIDL_itf_CmptIfaces_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_CmptIfaces_0000_v0_0_s_ifspec; + +#ifndef __ISecureShutdownWin_INTERFACE_DEFINED__ +#define __ISecureShutdownWin_INTERFACE_DEFINED__ + +/* interface ISecureShutdownWin */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISecureShutdownWin; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("34F11691-F275-11d2-A589-0020182B97FC") + ISecureShutdownWin : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE DoShutdown( + /* [in] */ long hParent, + /* [in] */ long Mode) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetData( + /* [in] */ IUnknown __RPC_FAR *pUnk) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Info( + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISecureShutdownWinVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + ISecureShutdownWin __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + ISecureShutdownWin __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + ISecureShutdownWin __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *DoShutdown )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ long hParent, + /* [in] */ long Mode); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SetData )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Info )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + END_INTERFACE + } ISecureShutdownWinVtbl; + + interface ISecureShutdownWin + { + CONST_VTBL struct ISecureShutdownWinVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISecureShutdownWin_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISecureShutdownWin_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISecureShutdownWin_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISecureShutdownWin_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISecureShutdownWin_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISecureShutdownWin_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISecureShutdownWin_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISecureShutdownWin_DoShutdown(This,hParent,Mode) \ + (This)->lpVtbl -> DoShutdown(This,hParent,Mode) + +#define ISecureShutdownWin_SetData(This,pUnk) \ + (This)->lpVtbl -> SetData(This,pUnk) + +#define ISecureShutdownWin_get_Info(This,nsItem,pvVal) \ + (This)->lpVtbl -> get_Info(This,nsItem,pvVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownWin_DoShutdown_Proxy( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ long hParent, + /* [in] */ long Mode); + + +void __RPC_STUB ISecureShutdownWin_DoShutdown_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownWin_SetData_Proxy( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + +void __RPC_STUB ISecureShutdownWin_SetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ISecureShutdownWin_get_Info_Proxy( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + +void __RPC_STUB ISecureShutdownWin_get_Info_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISecureShutdownWin_INTERFACE_DEFINED__ */ + + +#ifndef __ISecureShutdownDOS_INTERFACE_DEFINED__ +#define __ISecureShutdownDOS_INTERFACE_DEFINED__ + +/* interface ISecureShutdownDOS */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISecureShutdownDOS; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("34F11692-F275-11d2-A589-0020182B97FC") + ISecureShutdownDOS : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetBatchText( + /* [retval][out] */ BSTR __RPC_FAR *psText) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetData( + /* [in] */ IUnknown __RPC_FAR *pUnk) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Info( + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISecureShutdownDOSVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + ISecureShutdownDOS __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + ISecureShutdownDOS __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + ISecureShutdownDOS __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetBatchText )( + ISecureShutdownDOS __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *psText); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SetData )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Info )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + END_INTERFACE + } ISecureShutdownDOSVtbl; + + interface ISecureShutdownDOS + { + CONST_VTBL struct ISecureShutdownDOSVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISecureShutdownDOS_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISecureShutdownDOS_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISecureShutdownDOS_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISecureShutdownDOS_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISecureShutdownDOS_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISecureShutdownDOS_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISecureShutdownDOS_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISecureShutdownDOS_GetBatchText(This,psText) \ + (This)->lpVtbl -> GetBatchText(This,psText) + +#define ISecureShutdownDOS_SetData(This,pUnk) \ + (This)->lpVtbl -> SetData(This,pUnk) + +#define ISecureShutdownDOS_get_Info(This,nsItem,pvVal) \ + (This)->lpVtbl -> get_Info(This,nsItem,pvVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownDOS_GetBatchText_Proxy( + ISecureShutdownDOS __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *psText); + + +void __RPC_STUB ISecureShutdownDOS_GetBatchText_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownDOS_SetData_Proxy( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + +void __RPC_STUB ISecureShutdownDOS_SetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ISecureShutdownDOS_get_Info_Proxy( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + +void __RPC_STUB ISecureShutdownDOS_get_Info_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISecureShutdownDOS_INTERFACE_DEFINED__ */ + + +#ifndef __INightSecError_INTERFACE_DEFINED__ +#define __INightSecError_INTERFACE_DEFINED__ + +/* interface INightSecError */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_INightSecError; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("409C4B09-9310-11d3-BFC1-0020182B97FC") + INightSecError : public IUnknown + { + public: + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Err( + /* [retval][out] */ HRESULT __RPC_FAR *pbsRet) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Description( + /* [retval][out] */ BSTR __RPC_FAR *pbsRet) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_HelpFile( + /* [retval][out] */ BSTR __RPC_FAR *pbsRet) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_HelpContext( + /* [retval][out] */ long __RPC_FAR *plRet) = 0; + + }; + +#else /* C style interface */ + + typedef struct INightSecErrorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + INightSecError __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + INightSecError __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + INightSecError __RPC_FAR * This); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Err )( + INightSecError __RPC_FAR * This, + /* [retval][out] */ HRESULT __RPC_FAR *pbsRet); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Description )( + INightSecError __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pbsRet); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_HelpFile )( + INightSecError __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pbsRet); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_HelpContext )( + INightSecError __RPC_FAR * This, + /* [retval][out] */ long __RPC_FAR *plRet); + + END_INTERFACE + } INightSecErrorVtbl; + + interface INightSecError + { + CONST_VTBL struct INightSecErrorVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define INightSecError_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define INightSecError_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define INightSecError_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define INightSecError_get_Err(This,pbsRet) \ + (This)->lpVtbl -> get_Err(This,pbsRet) + +#define INightSecError_get_Description(This,pbsRet) \ + (This)->lpVtbl -> get_Description(This,pbsRet) + +#define INightSecError_get_HelpFile(This,pbsRet) \ + (This)->lpVtbl -> get_HelpFile(This,pbsRet) + +#define INightSecError_get_HelpContext(This,plRet) \ + (This)->lpVtbl -> get_HelpContext(This,plRet) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecError_get_Err_Proxy( + INightSecError __RPC_FAR * This, + /* [retval][out] */ HRESULT __RPC_FAR *pbsRet); + + +void __RPC_STUB INightSecError_get_Err_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecError_get_Description_Proxy( + INightSecError __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pbsRet); + + +void __RPC_STUB INightSecError_get_Description_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecError_get_HelpFile_Proxy( + INightSecError __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pbsRet); + + +void __RPC_STUB INightSecError_get_HelpFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecError_get_HelpContext_Proxy( + INightSecError __RPC_FAR * This, + /* [retval][out] */ long __RPC_FAR *plRet); + + +void __RPC_STUB INightSecError_get_HelpContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __INightSecError_INTERFACE_DEFINED__ */ + + +#ifndef __INightSecErrorFix_INTERFACE_DEFINED__ +#define __INightSecErrorFix_INTERFACE_DEFINED__ + +/* interface INightSecErrorFix */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_INightSecErrorFix; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("409C4B04-9310-11d3-BFC1-0020182B97FC") + INightSecErrorFix : public IUnknown + { + public: + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Fixable( + /* [retval][out] */ BOOL __RPC_FAR *pbRet) = 0; + + virtual /* [id] */ HRESULT STDMETHODCALLTYPE Fix( void) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Retryable( + /* [retval][out] */ BOOL __RPC_FAR *pbRet) = 0; + + virtual /* [id] */ HRESULT STDMETHODCALLTYPE Retry( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct INightSecErrorFixVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + INightSecErrorFix __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + INightSecErrorFix __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + INightSecErrorFix __RPC_FAR * This); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Fixable )( + INightSecErrorFix __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + /* [id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Fix )( + INightSecErrorFix __RPC_FAR * This); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Retryable )( + INightSecErrorFix __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + /* [id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Retry )( + INightSecErrorFix __RPC_FAR * This); + + END_INTERFACE + } INightSecErrorFixVtbl; + + interface INightSecErrorFix + { + CONST_VTBL struct INightSecErrorFixVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define INightSecErrorFix_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define INightSecErrorFix_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define INightSecErrorFix_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define INightSecErrorFix_get_Fixable(This,pbRet) \ + (This)->lpVtbl -> get_Fixable(This,pbRet) + +#define INightSecErrorFix_Fix(This) \ + (This)->lpVtbl -> Fix(This) + +#define INightSecErrorFix_get_Retryable(This,pbRet) \ + (This)->lpVtbl -> get_Retryable(This,pbRet) + +#define INightSecErrorFix_Retry(This) \ + (This)->lpVtbl -> Retry(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecErrorFix_get_Fixable_Proxy( + INightSecErrorFix __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + +void __RPC_STUB INightSecErrorFix_get_Fixable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id] */ HRESULT STDMETHODCALLTYPE INightSecErrorFix_Fix_Proxy( + INightSecErrorFix __RPC_FAR * This); + + +void __RPC_STUB INightSecErrorFix_Fix_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecErrorFix_get_Retryable_Proxy( + INightSecErrorFix __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + +void __RPC_STUB INightSecErrorFix_get_Retryable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id] */ HRESULT STDMETHODCALLTYPE INightSecErrorFix_Retry_Proxy( + INightSecErrorFix __RPC_FAR * This); + + +void __RPC_STUB INightSecErrorFix_Retry_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __INightSecErrorFix_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( unsigned long __RPC_FAR *, unsigned long , BSTR __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER BSTR_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER BSTR_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * ); +void __RPC_USER BSTR_UserFree( unsigned long __RPC_FAR *, BSTR __RPC_FAR * ); + +unsigned long __RPC_USER VARIANT_UserSize( unsigned long __RPC_FAR *, unsigned long , VARIANT __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER VARIANT_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER VARIANT_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * ); +void __RPC_USER VARIANT_UserFree( unsigned long __RPC_FAR *, VARIANT __RPC_FAR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/NSCmpts/DeleteSwapFile.cpp b/NSCmpts/DeleteSwapFile.cpp new file mode 100644 index 0000000..5e89f44 --- /dev/null +++ b/NSCmpts/DeleteSwapFile.cpp @@ -0,0 +1,95 @@ +// DeleteSwapFile.cpp : Implementation of CDeleteSwapFile +#include "stdafx.h" +#include "NSCmpts.h" +#include "DeleteSwapFile.h" +#include "../Common/Defines.h" +#include +#include + +///////////////////////////////////////////////////////////////////////////// +// CDeleteSwapFile + +STDMETHODIMP CDeleteSwapFile::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_ISecureShutdownDOS, + }; + for (int i=0;i= 0x80000000); + + // Format and return string + string sRetVal; + string sWinFolder; + + if(!GetWindowsDirectory(sWinFolder.get_buffer(MAX_PATH), MAX_PATH)) + sWinFolder = _T("C:\\WINDOWS"); + + sRetVal.format(IDS_DELSWAP_BATCHTEXT, (LPCTSTR)sWinFolder, (LPCTSTR)sWinFolder); + + CComBSTR bsRet(sRetVal); + *psText = bsRet.Detach(); + + return S_OK; +} + +//////////////////////////////////////////////////////// +// Called to initialize our data object + +STDMETHODIMP CDeleteSwapFile::SetData(IUnknown* pUnk) +{ + // Just let CProperty Bag do it + return m_Data.Initialize(pUnk); +} + +//////////////////////////////////////////////////////// +// Returns Info about our object + +STDMETHODIMP CDeleteSwapFile::get_Info(NightSecInfo nsItem, VARIANT* pvVal) +{ + ::VariantClear(pvVal); + + CComBSTR bsRetVal; + switch(nsItem) + { + case nsName: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_DELSWAP_NAME); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + case nsHelpText: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_DELSWAP_DESC); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + } + + ::VariantClear(pvVal); + return S_FALSE; +} diff --git a/NSCmpts/DeleteSwapFile.h b/NSCmpts/DeleteSwapFile.h new file mode 100644 index 0000000..4483466 --- /dev/null +++ b/NSCmpts/DeleteSwapFile.h @@ -0,0 +1,71 @@ +// DeleteSwapFile.h : Declaration of the CDeleteSwapFile + +#ifndef __DELETESWAPFILE_H_ +#define __DELETESWAPFILE_H_ + +#include "resource.h" // main symbols +#include "..\Common\CmptData.h" + +#include "appmisc.h" + +///////////////////////////////////////////////////////////////////////////// +// CDeleteSwapFile +class ATL_NO_VTABLE CDeleteSwapFile : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl +{ +// Construction +public: + CDeleteSwapFile() { } + ~CDeleteSwapFile() + { ATLTRACE(_T("Destroying DeleteSwapFile\n")); } + HRESULT FinalConstruct(); + +DECLARE_REGISTRY_RESOURCEID(IDR_DELETESWAPFILE) + +BEGIN_COM_MAP(CDeleteSwapFile) +// COM_INTERFACE_ENTRY_FUNC(ISecureShutdownDOS, 0, ComMapDOS) +// COM_INTERFACE_ENTRY_FUNC(ISecureShutdownWin, 0, ComMapWin) + COM_INTERFACE_ENTRY(ISecureShutdownDOS) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) +END_COM_MAP() + + /*HRESULT WINAPI ComMapDOS(void* pv, REFIID riid, LPVOID* ppv, DWORD dw) + { + if(::GetPlatform() == VER_PLATFORM_WIN32_NT) + return S_FALSE; + + ASSERT(::IsEqualGUID(riid, IID_ISecureShutdownDOS)); + + *ppv = pv + (DWORD)offsetofclass(ISecureShutdownDOS, _ComMapClass); + } + + HRESULT WINAPI ComMapDOS(void* pv, REFIID riid, LPVOID* ppv, DWORD dw) + { + if(::GetPlatform() == VER_PLATFORM_WIN32_NT) + return S_FALSE; + + ASSERT(::IsEqualGUID(riid, IID_ISecureShutdownDOS)); + + *ppv = pv + (DWORD)offsetofclass(ISecureShutdownDOS, _ComMapClass); + }*/ + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// ISecureShutdownDOS +public: + STDMETHOD(SetData)(/*[in]*/ IUnknown* pUnk); + STDMETHOD(GetBatchText)(/*[out, retval]*/ BSTR* psText); + STDMETHOD(get_Info)(/*[in]*/ NightSecInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + +// Data +protected: + CPropertyBag m_Data; + +}; + +#endif //__DELETESWAPFILE_H_ diff --git a/NSCmpts/EmptyRecycleBin.cpp b/NSCmpts/EmptyRecycleBin.cpp new file mode 100644 index 0000000..8dd09dd --- /dev/null +++ b/NSCmpts/EmptyRecycleBin.cpp @@ -0,0 +1,315 @@ +// EmptyRecycleBin.cpp : Implementation of CEmptyRecycleBin +#include "stdafx.h" +#include "NSCmpts.h" +#include "EmptyRecycleBin.h" +//#include "DummyDlg.h" +#include "..\common\defines.h" +#include + +#include "PromptClose.h" + +///////////////////////////////////////////////////////////////////////////// +// CEmptyRecycleBin + +STDMETHODIMP CEmptyRecycleBin::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_ISecureShutdownWin, + }; + for (int i=0;i psfDesktop; + CComPtr pMalloc; + + + // Get the Malloc Interface for freeing Mem later + HRESULT hr = SHGetMalloc(&pMalloc); + + if(FAILED(hr)) + return hr; + + // Get Desktop Folder. Recylce is always a child of Desktop + hr = ::SHGetDesktopFolder(&psfDesktop); + + if(FAILED(hr)) + return hr; + + + // Get ITEMID of Recycle + hr = ::SHGetSpecialFolderLocation(hwndParent, + CSIDL_BITBUCKET, // Recycle Bin + &ppidl); + if(FAILED(hr)) + return hr; + + // Start Major Stuff + CComPtr pcm; + DWORD dwAttribs = 0; + int idCmd = 0; + HRESULT hRet = S_OK; + HMENU hMenu; + + // Get Context Menu Interface on Recycle ITEM ID + hr = psfDesktop->GetUIObjectOf (hwndParent, + 1, // get attributes for only one object + (const struct _ITEMIDLIST **)&ppidl, + IID_IContextMenu, + 0, + (LPVOID *)&pcm); + + if (SUCCEEDED(hr)) + { + // Even though we won't display it we have to create it + hMenu = CreatePopupMenu(); + + if (hMenu) + { + // Get the context menu items for recycle + hr = pcm->QueryContextMenu (hMenu, 0, 1, 0x7fff, CMF_EXPLORE); + + if(FAILED(hr)) + hRet = hr; + + else + { + + // Did the user want to Recycle? + if(m_Data.GetInt(ER_REG_RECYCLE, true)) + { + hr = InvokeMenuCommand(pcm, hMenu, IDS_EMPTYCOMMAND, hwndParent, true); + + if (FAILED(hr)) + hRet = hr; + } + + // Did the use want to clear Norton? + if(m_Data.GetInt(ER_REG_NORTON, true)) + { + hr = InvokeMenuCommand(pcm, hMenu, IDS_NORTONCOMMAND, hwndParent, true); + + if (FAILED(hr)) + hRet = hr; + } + } + + DestroyMenu (hMenu); + + } + + } + + else + { + hRet = E_FAIL; + } + + // Free Recycle Bin Item ID + pMalloc->Free(ppidl); + + if(hRet != S_OK) + if (!bSilent) + MessageBox(_T("Couldn't Empty Recycle Bin"), _T("Empty Recycle Bin"), MB_OK | MB_ICONEXCLAMATION); + + return hRet; + +} + +STDMETHODIMP CEmptyRecycleBin::get_Info(NightSecInfo nsItem, VARIANT* pvVal) +{ + ::VariantClear(pvVal); + + CComBSTR bsRetVal; + + switch(nsItem) + { + case nsName: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_RECYCLENAME); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + case nsHelpText: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_RECYCLEDESC); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + case nsCmdLine: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_RECYCLEPARAM); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + } + + ::VariantClear(pvVal); + return S_FALSE; +} + + +STDMETHODIMP CEmptyRecycleBin::SetData(IUnknown* pUnk) +{ + return m_Data.Initialize(pUnk); +} + + +HRESULT InvokeMenuCommand(IContextMenu* pcm, HMENU hMenu, UINT nMenuItem, HWND hWndParent, bool bClosePrompt) +{ + HRESULT hRet = S_OK; + int idCmd = 0; + + // Get the ID + idCmd = GetMenuIdFromString(hMenu, nMenuItem); + + // Only Proceed if We Found it + if(!idCmd) + return S_FALSE; + + UINT nMenuState = ::GetMenuState(hMenu, idCmd, MF_BYCOMMAND); + + if(!(nMenuState & MF_GRAYED || nMenuState & MF_DISABLED)) + { + if(bClosePrompt) + { + CPromptClose closer; + closer.CloseNext(IDYES); + } + + // Do the Stuff + hRet = InvokeMenuId(pcm, idCmd, hWndParent); + + return hRet; + } + + return S_FALSE; +} + + +////////////////////////////////////////////////////////////////// +int GetMenuIdFromString(HMENU hMenu, UINT nStrID) +{ + + string sSearch; + if(sSearch.load_string(nStrID)) + return GetMenuIdFromString(hMenu, sSearch); + else + ASSERT(false); // Need a valid Resource ID + + return 0; +} + + +////////////////////////////////////////////////////////////////// +int GetMenuIdFromString(HMENU hMenu, string sSearch) +{ + + string sMenuItem; + sSearch.make_upper(); + + for(int nCnt = 0; nCnt < ::GetMenuItemCount(hMenu); nCnt++) + { + if(::GetMenuString(hMenu, nCnt, + sMenuItem.get_buffer(MAX_PATH), MAX_PATH, + MF_BYPOSITION)) + { + sMenuItem.release_buffer(); + sMenuItem.make_upper(); + + if(sMenuItem.find(sSearch) != string::npos) + return ::GetMenuItemID(hMenu, nCnt); + + } + } + + return 0; +} + + +HRESULT InvokeMenuId(IContextMenu* pcm, int nIDCmd, HWND hWndParent) +{ + CMINVOKECOMMANDINFO cmi; + + // Setup for Invoking. + cmi.cbSize = sizeof (CMINVOKECOMMANDINFO); + + cmi.fMask = CMIC_MASK_FLAG_NO_UI; + + cmi.hwnd = hWndParent; + cmi.lpVerb = MAKEINTRESOURCEA (nIDCmd - 1); + cmi.lpParameters = NULL; + cmi.lpDirectory = NULL; + cmi.nShow = SW_HIDE; + cmi.dwHotKey = 0; + cmi.hIcon = NULL; + + // Do the Stuff + return pcm->InvokeCommand (&cmi); +} + + +////////////////////////////////////////////////////////////////// +// If the user is at the computer switching windows this won't +// work, but that's okay because then the user can close the +// window +/* +static DWORD WINAPI ClosePromptWindow( LPVOID pParam ) +{ + + HWND hwndParent = (HWND)pParam; // The Parent of the Prompt Window + HWND hwndTop = ::GetTopLevel(hwndParent);// The Top Level Parent of the Prompt Window + + HWND hwndDlg = NULL; // Will Hold the Final Prompt Window to Close + DWORD dwStartCount = ::GetTickCount(); + + // Find the Active Popup + // Give it at least 20 seconds to come + while((hwndDlg = ::GetLastActivePopup(hwndTop)) == hwndParent + && ::GetTickCount() < dwStartCount + 20000) + { + } + + // Error: Window Didn't Pop up in 20 seconds + if(hwndDlg == hwndParent) + return 1; + + SetActiveWindow(hwndTop); + + SetWindowPos(hwndDlg, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE); + + keybd_event(VK_RETURN, 0, 0, 0); + + return 0; + +} + +HWND GetTopLevel(HWND hwnd) +{ + while(::GetParent(hwnd)) + hwnd = ::GetParent(hwnd); + + return hwnd; + +} +*/ \ No newline at end of file diff --git a/NSCmpts/EmptyRecycleBin.h b/NSCmpts/EmptyRecycleBin.h new file mode 100644 index 0000000..ab8cf0d --- /dev/null +++ b/NSCmpts/EmptyRecycleBin.h @@ -0,0 +1,110 @@ +// EmptyRecycleBin.h : Declaration of the CEmptyRecycleBin + +#ifndef __EMPTYRECYCLEBIN_H_ +#define __EMPTYRECYCLEBIN_H_ + +#include "resource.h" // main symbols +#include "Shlobj.h" +#include "../Common/CmptData.h" +#include + +HRESULT InvokeMenuCommand(IContextMenu* pcm, HMENU hMenu, UINT nMenuItem, HWND hWndParent, bool bClosePrompt = false); +HRESULT InvokeMenuId(IContextMenu* pcm, int nIDCmd, HWND hWndParent); +int GetMenuIdFromString(HMENU hMenu, string sMenuItem); +int GetMenuIdFromString(HMENU hMenu, UINT nStrID); + +DWORD WINAPI ClosePromptWindow( LPVOID pParam ); +HWND GetTopLevel(HWND hwndChild); + +#define ER_REG_RECYCLE _T("Empty Recycle Bin") +#define ER_REG_NORTON _T("Empty Norton Protected") + +///////////////////////////////////////////////////////////////////////////// +// CEmptyRecycleBin +class ATL_NO_VTABLE CEmptyRecycleBin : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl, + public IPropertyPageImpl, + public CDialogImplEx, + public CContextHelp + +{ +public: + CEmptyRecycleBin() : CDialogImplEx(IDD) + { + m_dwTitleID = IDS_TITLERecycle; + m_dwHelpFileID = IDS_NSHELPFILE; + m_dwDocStringID = IDS_DOCSTRINGRecycle; + } + ~CEmptyRecycleBin() + { ATLTRACE(_T("Destroying EmptyRecycleBin\n")); } + + +DECLARE_REGISTRY_RESOURCEID(IDR_EMPTYRECYCLEBIN) + +BEGIN_COM_MAP(CEmptyRecycleBin) + COM_INTERFACE_ENTRY(ISecureShutdownWin) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) + COM_INTERFACE_ENTRY_IMPL(IPropertyPage) +END_COM_MAP() + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// ISecureShutdownWin +public: + STDMETHOD(get_Info)(/*[in]*/ NightSecInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + STDMETHOD(DoShutdown)(/*[in]*/ long hParent, /*[in]*/ long lMode); + STDMETHOD(SetData)(/*[in]*/ IUnknown* pUnk); + +// Data +protected: + CPropertyBag m_Data; + + /////////////////////////////////////////////////////////////////// +// Property Sheet Stuff + +public: + + enum {IDD = IDD_EMPTYRECYCLE}; + +BEGIN_MSG_MAP(CEmptyRecycleBin) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + CHAIN_MSG_MAP(IPropertyPageImpl) + CHAIN_MSG_MAP(CContextHelp) +END_MSG_MAP() + +BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(IDC_EMPTYRECYCLE, 4020) + HELP_ID(IDC_EMPTYNORTON, 4019) +END_HELP_MAP + +// Property Sheet Messages + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + + STDMETHOD(Apply)(void) + { + ATLTRACE(_T("CEmptyRecycleBun::Apply\n")); + + HRESULT hr; + HRESULT hrRet = S_OK; + + // Save AutoFix State + hr = m_Data.WriteInt(ER_REG_RECYCLE, IsDlgButtonChecked(IDC_EMPTYRECYCLE)); + if(FAILED(hr)) hrRet = hr; + + // Save Cluster State + hr = m_Data.WriteInt(ER_REG_NORTON, IsDlgButtonChecked(IDC_EMPTYNORTON)); + if(FAILED(hr)) hrRet = hr; + + m_bDirty = FALSE; + return hrRet; + + } + +}; + +#endif //__EMPTYRECYCLEBIN_H_ diff --git a/NSCmpts/EmptyRecycleBin.rgs b/NSCmpts/EmptyRecycleBin.rgs new file mode 100644 index 0000000..ef4a2fb --- /dev/null +++ b/NSCmpts/EmptyRecycleBin.rgs @@ -0,0 +1,42 @@ +HKCR +{ + NightSecurity.EmptyRecycleBin.25 = s 'EmptyRecycleBin Class' + { + CLSID = s '{34F11694-F275-11d2-A589-0020182B97FC}' + } + NightSecurity.EmptyRecycleBin = s 'EmptyRecycleBin Class' + { + CurVer = s 'NightSecurity.EmptyRecycleBin.25' + CLSID = s '{34F11694-F275-11d2-A589-0020182B97FC}' + } + NoRemove CLSID + { + ForceRemove {34F11694-F275-11d2-A589-0020182B97FC} = s 'EmptyRecycleBin Class' + { + ProgID = s 'NightSecurity.EmptyRecycleBin.25' + VersionIndependentProgID = s 'NightSecurity.EmptyRecycleBin' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} + +HKEY_LOCAL_MACHINE +{ + NoRemove 'Software' + { + NoRemove 'Heavenly Helpers' + { + NoRemove 'Night Security' + { + NoRemove 'Installed Components' + { + ForceRemove 'NightSecurity.EmptyRecycleBin' + } + } + } + } +} \ No newline at end of file diff --git a/NSCmpts/EmptyTempFolder.cpp b/NSCmpts/EmptyTempFolder.cpp new file mode 100644 index 0000000..cfd0510 --- /dev/null +++ b/NSCmpts/EmptyTempFolder.cpp @@ -0,0 +1,197 @@ +// EmptyTempFolder.cpp : Implementation of CEmptyTempFolder +#include "stdafx.h" +#include "NSCmpts.h" +#include "EmptyTempFolder.h" +#include "..\common\defines.h" +#include "ProgressDlg.h" +#include "TempWarnDlg.h" +#include "TempActions.h" +#include + +///////////////////////////////////////////////////////////////////////////// +// CEmptyTempFolder + +STDMETHODIMP CEmptyTempFolder::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_ISecureShutdownWin, + }; + for (int i=0;iInitialize(sWindowsTempPath); + m_Engine.Add(pAction); + + // Create the update_monitor + m_Engine.SetUpdates(dlgProgress, dlgProgress); + + // start the backup + HANDLE hThread = m_Engine.StartThread(); + + WaitForAndIdle(1, &hThread, INFINITE); + + HRESULT hr = S_OK; + GetExitCodeThread(hThread, (LPDWORD)&hr); + + dlgProgress.DestroyWindow(); + + return hr; +} + +// XError: We should be using file_path here +/*string CEmptyTempFolder::CleanSlashes(const string& sPath) +{ + string sTemp; + if(sPath.at(sPath.length() - 1) == _T('\\')) + sTemp = sPath.substr(0, sPath.length() - 1); + else + sTemp = sPath; + + int nPos; + while((nPos = sTemp.find(_T("\\\\"), 2)) != string::npos) + sTemp.erase(nPos, 1); + + return sTemp; +} +*/ +STDMETHODIMP CEmptyTempFolder::get_Info(NightSecInfo nsItem, VARIANT* pvVal) +{ + ::VariantClear(pvVal); + + CComBSTR bsRetVal; + + switch(nsItem) + { + case nsName: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_TEMPNAME); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + case nsHelpText: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_TEMPDESC); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + case nsCmdLine: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_TEMPPARAM); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + } + + ::VariantClear(pvVal); + return S_FALSE; +} + + +STDMETHODIMP CEmptyTempFolder::SetData(IUnknown* pUnk) +{ + return m_Data.Initialize(pUnk); +} + + + + + diff --git a/NSCmpts/EmptyTempFolder.h b/NSCmpts/EmptyTempFolder.h new file mode 100644 index 0000000..1453b2f --- /dev/null +++ b/NSCmpts/EmptyTempFolder.h @@ -0,0 +1,59 @@ +// EmptyTempFolder.h : Declaration of the CEmptyTempFolder + +#ifndef __EMPTYTEMPFOLDER_H_ +#define __EMPTYTEMPFOLDER_H_ + +#include "resource.h" // main symbols +#include "../Common/CmptData.h" + +#include "ActionEngine.h" + +#include + +///////////////////////////////////////////////////////////////////////////// +// CEmptyTempFolder +class ATL_NO_VTABLE CEmptyTempFolder : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IObjectWithSiteImpl, + public IDispatchImpl +{ +public: + CEmptyTempFolder() + { + } + ~CEmptyTempFolder() + { ATLTRACE(_T("Destroying EmptyTempFolder\n")); } + + +DECLARE_REGISTRY_RESOURCEID(IDR_EMPTYTEMPFOLDER) + +BEGIN_COM_MAP(CEmptyTempFolder) + COM_INTERFACE_ENTRY(ISecureShutdownWin) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(IObjectWithSite) + COM_INTERFACE_ENTRY(ISupportErrorInfo) +END_COM_MAP() + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// ISecureShutdownWin +public: + STDMETHOD(get_Info)(/*[in]*/ NightSecInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + STDMETHOD(DoShutdown)(/*[in]*/ long hParent, /*[in]*/ long lMode); + STDMETHOD(SetData)(/*[in]*/ IUnknown* pUnk); + +// Data +protected: + CPropertyBag m_Data; + CActionEngine m_Engine; + + +// Helpers +private: +// string CleanSlashes(const string& sPath); +}; + +#endif //__EMPTYTEMPFOLDER_H_ diff --git a/NSCmpts/Encrypt.cpp b/NSCmpts/Encrypt.cpp new file mode 100644 index 0000000..617dc69 --- /dev/null +++ b/NSCmpts/Encrypt.cpp @@ -0,0 +1,144 @@ +// Encrypt.cpp : Implementation of CEncrypt +#include "stdafx.h" +#include "NSCmpts.h" +#include "Encrypt.h" +#include "ProgressDlg.h" +#include +#include + +///////////////////////////////////////////////////////////////////////////// +// CEncrypt + +STDMETHODIMP CEncrypt::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_ISecureShutdownWin + }; + for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++) + { + if (InlineIsEqualGUID(*arr[i],riid)) + return S_OK; + } + return S_FALSE; +} + +STDMETHODIMP CEncrypt::DoShutdown(long hParent, long lMode) +{ + bool bPrompt = lMode & nsNoPrompt ? false : true; +// bool bSilent = lMode & nsQuiet ? true : false; + + // Put it out here so it'll stay in scope + m_bDisablePassword = m_Data.GetInt(NS_ENCRYPT_REG_DISABLE, false) ? true : false; + + try + { + // Ask for Password here + if(m_xpyPass == NULL) + try_(m_xpyPass.CreateInstance(__uuidof(XpyEx))); + + VARIANT_BOOL vbEnabled = m_xpyPass->Enabled[xpyMainPass]; + + if(!vbEnabled && bPrompt) + m_xpyPass->Prompt(hParent, xpyuiMainPassword); + + vbEnabled = m_xpyPass->Enabled[xpyMainPass]; + + if(!vbEnabled) + return XPY_E_NO_PASSWORD; + + } + catch(_com_error& e) + { + // These are big errors and means something's not + // set up properly. Make sure it gets user's attention + // can't just go into the log window + + if(bPrompt) + { + string sMessage; + IErrorInfo* pError; + if(pError = e.ErrorInfo()) + { + sMessage.format(IDS_ENCRYPT_ERR_XPY, e.Description()); + pError->Release(); + } + else + sMessage.format(IDS_ENCRYPT_ERR_XPY, e.ErrorMessage()); + + MessageBox((HWND)hParent, sMessage, _T("XPY Encryption Problem"), MB_OK | MB_ICONSTOP); + } + + route_to_atl(e); + } + + // Create the dialog + CActionProgressDlg dlgProgress(m_spUnkSite, IDD_PROGRESSENCRYPT); + dlgProgress.Create((HWND)hParent); + dlgProgress.PlayAmination(IDR_AVIENCRYPT); + + CEncryptActions::EncryptPrepare* pAction = new CEncryptActions::EncryptPrepare; + HRESULT hr = pAction->Initialize(m_Data); + + if(hr != S_OK) + return hr; + + m_Engine.Add(pAction); + + // Create the update_monitor + m_Engine.SetUpdates(dlgProgress, dlgProgress); + + // start the backup + HANDLE hThread = m_Engine.StartThread(); + + WaitForAndIdle(1, &hThread, INFINITE); + + hr = S_OK; + GetExitCodeThread(hThread, (LPDWORD)&hr); + + dlgProgress.DestroyWindow(); + + return hr; + +} + +STDMETHODIMP CEncrypt::get_Info(NightSecInfo nsItem, VARIANT* pvVal) +{ + ::VariantClear(pvVal); + + CComBSTR bsRetVal; + + switch(nsItem) + { + case nsName: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_ENCRYPTNAME); + pvVal->bstrVal = bsRetVal; + return S_OK; + case nsHelpText: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_ENCRYPTDESC); + pvVal->bstrVal = bsRetVal; + return S_OK; + case nsCmdLine: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_ENCRYPTPARAM); + pvVal->bstrVal = bsRetVal; + return S_OK; + case nsForceShow: + pvVal->vt = VT_BOOL; + pvVal->bVal = TRUE; + return S_OK; + case nsCopyAble: + pvVal->vt = VT_BOOL; + pvVal->bVal = TRUE; + return S_OK; + } + + return S_FALSE; +} + +STDMETHODIMP CEncrypt::SetData(IUnknown* pUnk) +{ + return m_Data.Initialize(pUnk); +} \ No newline at end of file diff --git a/NSCmpts/Encrypt.h b/NSCmpts/Encrypt.h new file mode 100644 index 0000000..a7b449f --- /dev/null +++ b/NSCmpts/Encrypt.h @@ -0,0 +1,103 @@ +// Encrypt.h : Declaration of the CEncrypt + +#ifndef __ENCRYPT_H_ +#define __ENCRYPT_H_ + +#include "resource.h" // main symbols +#include + +#include "../common/cmptdata.h" +#include "ActionEngine.h" + +#include "../common/interfaces.h" +#include "EncryptActions.h" + +///////////////////////////////////////////////////////////////////////////// +// CEncrypt +class ATL_NO_VTABLE CEncrypt : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl, + public IObjectWithSiteImpl, + public ISpecifyPropertyPagesImplEx + + +{ +public: + CEncrypt() + { + m_bDisablePassword = false; + } + ~CEncrypt() + { + try + { + if(m_bDisablePassword && (m_xpyPass != NULL)) + m_xpyPass->Disable(); + } + catch(_com_error&) + { } + + ATLTRACE(_T("Destroying Backup\n")); + } + +DECLARE_REGISTRY_RESOURCEID(IDR_ENCRYPT) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CEncrypt) + COM_INTERFACE_ENTRY(ISecureShutdownWin) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) + COM_INTERFACE_ENTRY(IObjectWithSite) + COM_INTERFACE_ENTRY(ISpecifyPropertyPages) +END_COM_MAP() + + virtual ATL_PROPMAP_ENTRY* GetPropertyMap() + { + static ATL_PROPMAP_ENTRY pNormalPropMap[] = + { + PROP_PAGE(CLSID_EncryptSourceProp) + {NULL, 0, NULL, &IID_NULL, 0, 0, 0} + }; + + static ATL_PROPMAP_ENTRY pAdvancedPropMap[] = + { + PROP_PAGE(CLSID_EncryptSourceProp) + PROP_PAGE(CLSID_EncryptAdvancedProp) + {NULL, 0, NULL, &IID_NULL, 0, 0, 0} + }; + + INightSecSiteInfoPtr pInfo = (IUnknown*)m_spUnkSite; + + if(pInfo) + { + CComVariant var; + pInfo->get_Info(nsAdvanced, &var); + + if(var.vt == VT_BOOL && var.bVal == TRUE) + return pAdvancedPropMap; + } + + return pNormalPropMap; + } + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// ISecureShutdownWin +public: + STDMETHOD(get_Info)(/*[in]*/ NightSecInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + STDMETHOD(DoShutdown)(/*[in]*/ long hParent, /*[in]*/ long lMode); + STDMETHOD(SetData)(/*[in]*/ IUnknown* pUnk); + +protected: + CPropertyBag m_Data; + CActionEngine m_Engine; + bool m_bDisablePassword; + + IXpyPassUIPtr m_xpyPass; +}; + +#endif //__ENCRYPT_H_ diff --git a/NSCmpts/Encrypt.rgs b/NSCmpts/Encrypt.rgs new file mode 100644 index 0000000..5e2e3b8 --- /dev/null +++ b/NSCmpts/Encrypt.rgs @@ -0,0 +1,43 @@ +HKCR +{ + NightSecurity.Encrypt.25 = s 'Encrypt Class' + { + CLSID = s '{22AD5F42-A7F1-11D3-82E3-0020182B97FC}' + } + NightSecurity.Encrypt = s 'Encrypt Class' + { + CLSID = s '{22AD5F42-A7F1-11D3-82E3-0020182B97FC}' + CurVer = s 'NightSecurity.Encrypt.25' + } + NoRemove CLSID + { + ForceRemove {22AD5F42-A7F1-11D3-82E3-0020182B97FC} = s 'Encrypt Class' + { + ProgID = s 'NightSecurity.Encrypt.25' + VersionIndependentProgID = s 'NightSecurity.Encrypt' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'TypeLib' = s '{34F11693-F275-11d2-A589-0020182B97FC}' + } + } +} + +HKEY_LOCAL_MACHINE +{ + NoRemove 'Software' + { + NoRemove 'Heavenly Helpers' + { + NoRemove 'Night Security' + { + NoRemove 'Installed Components' + { + ForceRemove 'NightSecurity.Encrypt' + } + } + } + } +} \ No newline at end of file diff --git a/NSCmpts/EncryptActions.cpp b/NSCmpts/EncryptActions.cpp new file mode 100644 index 0000000..aac7fb5 --- /dev/null +++ b/NSCmpts/EncryptActions.cpp @@ -0,0 +1,235 @@ +// EncryptActions.cpp: implementation of the CEncryptActions class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "EncryptActions.h" + +#include "resource.h" +#include + + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +bool CEncryptActions::EncryptPrepare::Do(CActionEngine* pEngine, + HWND hwndUpdates) +{ + ASSERT(pEngine != NULL); + + Update(hwndUpdates, _T("Listing files to encrypt..."), NULL); + + // Iterate through source folders + string_array::const_iterator iterSrc; + for(iterSrc = m_aFiles.begin(); iterSrc != m_aFiles.end(); iterSrc++) + { + Update(hwndUpdates, NULL, (LPCTSTR)*iterSrc); + + file_iterator fileIter((file_path)*iterSrc, file_iterator::sub_folders | file_iterator::full_paths), end; + for( ; fileIter != end; fileIter++) + { + file_path srcFile(fileIter->cFileName); + if(!(srcFile.attributes() & FILE_ATTRIBUTE_DIRECTORY)) + { + if(m_asIgnore.find(srcFile.ext().make_lower()) == m_asIgnore.end()) + { + // Construct File + Encrypt* pEncrypt = new Encrypt(srcFile); + pEngine->Add(pEncrypt); + } + } + } + + // Error from file_iterator (listing folders) + if(fileIter.state() != ERROR_SUCCESS) + throw CActionError(HRESULT_FROM_WIN32(fileIter.state()), IDS_ENCRYPT_ERR_LIST, (file_path)*iterSrc); + } + + return false; +} + +HRESULT CEncryptActions::EncryptPrepare::Initialize(const CPropertyBag& data) +{ + if(!data.GetStringSet(NS_ENCRYPT_REG_FILES, m_aFiles)) + return S_FALSE; + + CEncryptActions::Encrypt::m_bEncryptReadOnly = data.GetInt(NS_ENCRYPT_REG_READONLY, false) ? true : false; + + string_array asTemp; + data.GetStringSet(NS_IGNORE_REG_EXT, asTemp); + + // Make them all lower + for_each(asTemp.begin(), asTemp.end(), Lower); + + // And copy them to the set (removes doubles) + copy(asTemp.begin(), asTemp.end(), inserter(m_asIgnore, m_asIgnore.begin())); + + // Remove any blanks from ignore + m_asIgnore.erase(_T("")); + + return S_OK; +} + + +IXpyExPtr CEncryptActions::Encrypt::m_pXpy; +bool CEncryptActions::Encrypt::m_bEncryptReadOnly = false; +UINT CEncryptActions::Encrypt::m_nXpyRefs = 0; + +bool CEncryptActions::Encrypt::Do(CActionEngine* pEngine, + HWND hwndUpdates) +{ + // Update any monitors + Update(hwndUpdates, _T("Encrypting..."), m_file); + + // Initialize XPY + HRESULT hr; + if(FAILED(hr = InitXpy())) + { + // If it doesn't work then trash all the encryption actions + // in the engine + if(pEngine) + pEngine->RemoveAll(this); + + // And spit out an error + throw CActionError(hr, IDS_ENCRYPT_ERR_XPYINIT); + } + + + // Use this in case we need to reset the attributes + // in order to encrypt the file. XPY won't encrypt + // read-only files. There's an option here + // to let you. So basically what we have to do is + // reset the file to normal attributes and then set + // it back + + // If it's 0 that means we haven't messed with the + // attributes yet. If it has a value that means we + // need to set the value back before returning + DWORD dwAttributes = 0; + +encrypt: + + try + { + // Here's the actual close code + // rest is basically error checking + m_pXpy->Close((LPCTSTR)m_file); + + } + catch(_com_error& e) + { + // Here we check for the read-only error that Xpy + // will spit up. If the flag is set then go ahead + // and reset the attributes + + if(e.Error() == XPY_E_FILE_ATTRIBUTES && // Read Only Error + m_bEncryptReadOnly) // flag to encrypt read-only + { + + // If we haven't messed with the attributes + // yet then go ahead and reset them + if(!dwAttributes) + { + // Get Attributes + dwAttributes = GetFileAttributes(m_file); + + // Let System files blow! (with an error) + if(!(dwAttributes & FILE_ATTRIBUTE_SYSTEM)) + { + SetFileAttributes(m_file, FILE_ATTRIBUTE_NORMAL); + + // Reencrypt + goto encrypt; + } + + } + + // Otherwise we won't try again + } + + // Set the Attributes back + if(dwAttributes) + SetFileAttributes(m_file, dwAttributes); + + // Get the proper error message + _bstr_t bsError = e.Description(); + + if(bsError.length()) + throw CActionError((LPCTSTR)bsError, e.Error(), IDS_ENCRYPT_ERR, m_file); + else + throw CActionError(e.Error(), IDS_ENCRYPT_ERR, m_file); + } + + // Set the Attributes back + if(dwAttributes) + SetFileAttributes(m_file, dwAttributes); + + return false; +} + +bool CEncryptActions::Encrypt::IsFixable(HRESULT hr) const +{ + switch(hr) + { + case XPY_E_FILE_ATTRIBUTES: + case HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION): + case HRESULT_FROM_WIN32(ERROR_LOCK_VIOLATION): + return true; + default: + return false; + } +} + +void CEncryptActions::Encrypt::Fix(HRESULT hr) +{ + if(hr == XPY_E_FILE_ATTRIBUTES) + { + if(SetFileAttributes(m_file, FILE_ATTRIBUTE_NORMAL)) + Do(NULL, NULL); + else + throw CActionError(HRESULT_FROM_WIN32(::GetLastError()), IDS_ENCRYPT_ERR, m_file); + } + else if(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION) || + hr == HRESULT_FROM_WIN32(ERROR_LOCK_VIOLATION)) + { + bool bFirst = true; +start: + try + { + // Try again + Do(NULL, NULL); + return; + } + catch(CActionError& err) + { + // If it's the first around and the error is the same... + if(bFirst && IsFixable(err.m_hRes)) + { + HCURSOR hCurs = ::GetCursor(); + + // ... Prompt user to close programs + MessageBox(NULL, _T("Files cannot be encrypted while they are opened in a program. Close all other programs and then click the OK button."), _T("Encrypt Files"), MB_OK | MB_ICONINFORMATION); + + if(hCurs) + ::SetCursor(hCurs); + + bFirst = false; + } + // Otherwise out with the error + else + throw; + } + + goto start; + } +} + +HRESULT CEncryptActions::Encrypt::InitXpy() +{ + if(m_pXpy) + return S_OK; + else + return m_pXpy.CreateInstance(__uuidof(XpyEx)); +} + diff --git a/NSCmpts/EncryptActions.h b/NSCmpts/EncryptActions.h new file mode 100644 index 0000000..70f9dd6 --- /dev/null +++ b/NSCmpts/EncryptActions.h @@ -0,0 +1,93 @@ +// EncryptActions.h: interface for the CBackupActions class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_ENCRYPTACTIONS_H__75916453_A62F_11D3_82DF_0020182B97FC__INCLUDED_) +#define AFX_ENCRYPTACTIONS_H__75916453_A62F_11D3_82DF_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "ActionEngine.h" +#include +#include + +#include "../common/cmptdata.h" +#include + +class CEncryptActions +{ +public: + + class Encrypt : public CAction + { + public: + Encrypt(const file_path& file) + { + m_file = file; + AddXpyRef(); + } + virtual ~Encrypt() + { + ReleaseXpyRef(); + } + + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates); + virtual void Fix(HRESULT hr); + virtual bool IsFixable(HRESULT hr) const; + virtual bool IsRetryable() const + { return true; } + + static bool m_bEncryptReadOnly; + + protected: + file_path m_file; + + /////////////////////////////////////////////////// + // Xpy Related stuff + + // Starts XpyEx + static HRESULT InitXpy(); + + // These are used in reference counting and when to release the + // XpyEx pointer + + // XXXXXXXXXXXXXXX + // We don't use the built in reference counting, because the then + // we have no way of telling whether it's released or not + static void AddXpyRef() + { m_nXpyRefs++; } + static void ReleaseXpyRef() + { + if(!--m_nXpyRefs && m_pXpy != NULL) + m_pXpy = NULL; + } + static IXpyExPtr m_pXpy; + static UINT m_nXpyRefs; + }; + + class EncryptPrepare : public CAction + { + public: + EncryptPrepare() {}; + + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates); + virtual void Fix(HRESULT hr) { } + virtual bool IsFixable(HRESULT hr) const + { return false; } + virtual bool IsRetryable() const + { return false; } + + HRESULT Initialize(const CPropertyBag& data); + + protected: + string_array m_aFiles; + string_set m_asIgnore; + + friend class Encrypt; + }; + +}; + +#endif // !defined(AFX_ENCRYPTACTIONS_H__75916453_A62F_11D3_82DF_0020182B97FC__INCLUDED_) diff --git a/NSCmpts/EncryptAdvancedProp.cpp b/NSCmpts/EncryptAdvancedProp.cpp new file mode 100644 index 0000000..2149139 --- /dev/null +++ b/NSCmpts/EncryptAdvancedProp.cpp @@ -0,0 +1,51 @@ +// EncryptAdvancedProp.cpp : Implementation of CEncryptAdvancedProp +#include "stdafx.h" +#include "NSCmpts.h" +#include "EncryptAdvancedProp.h" + +///////////////////////////////////////////////////////////////////////////// +// CEncryptAdvancedProp + +LRESULT CEncryptAdvancedProp::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Let it choose an object for data + m_Data.Initialize(m_nObjects, m_ppUnk); + + // Set this for CIgnoreProp + m_hwndIgnore = m_hWnd; + + CIgnoreProp::OnInitDialog(uMsg, wParam, lParam, bHandled); + + // Other Data Init + m_bDisablePassword = m_Data.GetInt(NS_ENCRYPT_REG_DISABLE, true) ? true : false; + m_bEncryptReadOnly = m_Data.GetInt(NS_ENCRYPT_REG_READONLY, false) ? true : false; + + UpdateData(false); + + bHandled = true; + return TRUE; +} + +LRESULT CEncryptAdvancedProp::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Just in case, save before destroy + UpdateData(true); + return 0; +} + +void CEncryptAdvancedProp::UpdateData(bool bSave) +{ + // Do Ignore Extensions first + CIgnoreProp::UpdateData(bSave); + + if(bSave) + { + m_bDisablePassword = IsDlgButtonChecked(IDC_DISABLEPASSWORD) ? true : false; + m_bEncryptReadOnly = IsDlgButtonChecked(IDC_ENCRYPTREADONLY) ? true : false; + } + else + { + CheckDlgButton(IDC_DISABLEPASSWORD, m_bDisablePassword ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(IDC_ENCRYPTREADONLY, m_bEncryptReadOnly ? BST_CHECKED : BST_UNCHECKED); + } +} diff --git a/NSCmpts/EncryptAdvancedProp.h b/NSCmpts/EncryptAdvancedProp.h new file mode 100644 index 0000000..864407c --- /dev/null +++ b/NSCmpts/EncryptAdvancedProp.h @@ -0,0 +1,104 @@ +// EncryptAdvancedProp.h : Declaration of the CEncryptAdvancedProp + +#ifndef __ENCRYPTADVANCEDPROP_H_ +#define __ENCRYPTADVANCEDPROP_H_ + +#include "resource.h" // main symbols + +#include "../common/CmptData.h" +#include + +#include "IgnoreProp.h" + +EXTERN_C const CLSID CLSID_EncryptAdvancedProp; + +///////////////////////////////////////////////////////////////////////////// +// CEncryptAdvancedProp +class ATL_NO_VTABLE CEncryptAdvancedProp : + public CComObjectRootEx, + public CComCoClass, + public IPropertyPageImpl, + public CDialogImplEx, + + // Some dialog functionality from + public CIgnoreProp, + public CContextHelp +{ + +// Construction +public: + CEncryptAdvancedProp() : CIgnoreProp(m_Data), CDialogImplEx(IDD) + { + m_dwTitleID = IDS_TITLEEncryptAdvancedProp; + m_dwHelpFileID = IDS_NSHELPFILE; + m_dwDocStringID = IDS_DOCSTRINGEncryptAdvancedProp; + } + + enum {IDD = IDD_ENCRYPTADVANCED}; + +DECLARE_REGISTRY_RESOURCEID(IDR_ENCRYPTADVANCEDPROP) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CEncryptAdvancedProp) + COM_INTERFACE_ENTRY(IPropertyPage) +END_COM_MAP() + +BEGIN_MSG_MAP(CEncryptAdvancedProp) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + NOTIFY_HANDLER(IDC_IGNORE_LIST, LVN_ENDLABELEDIT, OnEndLabelEdit) + NOTIFY_HANDLER(IDC_IGNORE_LIST, NM_SETFOCUS, OnListSetFocus) + NOTIFY_HANDLER(IDC_IGNORE_LIST, LVN_KEYDOWN, OnKeyDown) + COMMAND_ID_HANDLER(IDC_NEW, OnAdd) + COMMAND_ID_HANDLER(IDC_DEL, OnRemove) + CHAIN_MSG_MAP(IPropertyPageImpl) + CHAIN_MSG_MAP(CContextHelp) +END_MSG_MAP() + +BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(IDC_DISABLEPASSWORD, 4009) + HELP_ID(IDC_ENCRYPTREADONLY, 4011) + HELP_ID(IDC_IGNORE_LIST, 4010) + HELP_ID(IDC_NEW, 4018) + HELP_ID(IDC_DEL, 4017) +END_HELP_MAP + +// Handler prototypes: +// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); +// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); +// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + + STDMETHOD(Apply)(void) + { + ATLTRACE(_T("CEncryptAdvancedProp::Apply\n")); + + // Let it choose an object for data + if(!m_Data.IsInitialized()) + m_Data.Initialize(m_nObjects, m_ppUnk); + + if(!m_Data.IsInitialized()) + E_FAIL; + + UpdateData(true); + + m_Data.WriteStringSet(NS_IGNORE_REG_EXT, m_asExtensions); + m_Data.WriteInt(NS_ENCRYPT_REG_DISABLE, m_bDisablePassword); + m_Data.WriteInt(NS_ENCRYPT_REG_READONLY, m_bEncryptReadOnly); + + m_bDirty = FALSE; + return S_OK; + } + +protected: + CPropertyBag m_Data; + bool m_bDisablePassword; + bool m_bEncryptReadOnly; + + void UpdateData(bool bSave = true); +}; + +#endif //__ENCRYPTADVANCEDPROP_H_ diff --git a/NSCmpts/EncryptAdvancedProp.rgs b/NSCmpts/EncryptAdvancedProp.rgs new file mode 100644 index 0000000..0dcda59 --- /dev/null +++ b/NSCmpts/EncryptAdvancedProp.rgs @@ -0,0 +1,14 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {93425F13-BC15-11D3-82FF-005056D45AB0} = s 'EncryptAdvancedProp Class' + { + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/NSCmpts/EncryptData.cpp b/NSCmpts/EncryptData.cpp new file mode 100644 index 0000000..4c1660a --- /dev/null +++ b/NSCmpts/EncryptData.cpp @@ -0,0 +1,105 @@ +// EncryptData.cpp: implementation of the CEncryptData class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "EncryptData.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +UINT CEncryptData::m_nExtensions = 0; +UINT CEncryptData::m_nPaths = 0; + + +UINT CEncryptData::LoadExtensions(string_array& asExt, const CPropertyBag& settings) +{ + int nCnt = 0; // Number of URLs from Registry + string sExt; + string sKeyName; + + // Format Key Name + sKeyName.format(NS_BACKUP_REG_EXT, nCnt++); + + while((sExt = settings.GetString(sKeyName, NS_NO_KEY)) != NS_NO_KEY) + { + asExt.push_back(sExt); + sKeyName.format(NS_BACKUP_REG_EXT, nCnt++); + } + + m_nExtensions = max(m_nExtensions, --nCnt); + return nCnt; +} + +UINT CEncryptData::SaveExtensions(const string_array& asExt, CPropertyBag& settings) +{ + UINT nCnt = 0; // Number of URLs from Registry + string sKeyName = _T(""); + + string_array::const_iterator iter = asExt.begin(); + for(; iter != asExt.end(); iter++) + { + sKeyName.format(NS_BACKUP_REG_EXT, nCnt++); + settings.WriteString(sKeyName, *iter); + } + + UINT nRet = nCnt - 1; + + for(; nCnt < m_nExtensions; nCnt++) + { + // Format Registry Key + sKeyName.format(NS_BACKUP_REG_EXT, nCnt); + settings.DeleteProperty(sKeyName); + } + + m_nExtensions = 0; + + return nRet; +} + +UINT CEncryptData::LoadPaths(file_array& aPaths, const CPropertyBag& settings) +{ + int nCnt = 0; + string sPath; + string sKeyName; + + // Format Key Name + sKeyName.format(NS_BACKUP_REG_SOURCE, nCnt++); + + // Add URLs to List Box + while((sPath = settings.GetString(sKeyName, NS_NO_KEY)) != NS_NO_KEY) + { + aPaths.push_back(sPath); + + // Format Key Name + sKeyName.format(NS_BACKUP_REG_SOURCE, nCnt++); + } + + return m_nPaths = --nCnt; + +} + +UINT CEncryptData::SavePaths(const file_array& aPaths, CPropertyBag& settings) +{ + UINT nCnt = 0; // Number of URLs from Registry + string sKeyName; + + file_array::const_iterator iter = aPaths.begin(); + for(; iter != aPaths.end(); iter++) + { + sKeyName.format(NS_BACKUP_REG_SOURCE, nCnt++); + settings.WriteString(sKeyName, *iter); + } + + UINT nRet = nCnt - 1; + + for(; nCnt < m_nPaths; nCnt++) + { + // Format Registry Key + sKeyName.format(NS_BACKUP_REG_SOURCE, nCnt); + settings.DeleteProperty(sKeyName); + } + + return nRet; +} diff --git a/NSCmpts/EncryptData.h b/NSCmpts/EncryptData.h new file mode 100644 index 0000000..2b39152 --- /dev/null +++ b/NSCmpts/EncryptData.h @@ -0,0 +1,47 @@ +// EncryptData.h: interface for the CEncryptData class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_BACKUPDATA_H__00EC1850_A1A5_11D3_82DB_0020182B97FC__INCLUDED_) +#define AFX_BACKUPDATA_H__00EC1850_A1A5_11D3_82DB_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include +#include + +#include +typedef std::vector string_array; + +#include +typedef std::vector file_array; + +#include "../common/cmptdata.h" + +#define NS_NO_KEY _T("No Key") +#define NS_ENCRYPT_REG_EXT _T("Ignore%.4d") +#define NS_ENCRYPT_REG_SOURCE _T("Path%.4d") +#define NS_ENCRYPT_REG_DEST _T("Destination") +#define NS_ENCRYPT_REG_ENGINE _T("Engine") + +class CEncryptData +{ +public: + CEncryptData() { }; + + // For Filtering and Advanced Property Sheet + static UINT LoadExtensions(string_array& asExt, const CPropertyBag& settings); + static UINT SaveExtensions(const string_array& asExt, CPropertyBag& settings); + + // For Backup and Source Property Sheet + static UINT LoadSources(file_array& aSources, const CPropertyBag& settings); + static UINT SaveSources(const file_array& aSources, CPropertyBag& settings); + +protected: + static UINT m_nExtensions; + static UINT m_nSources; +}; + +#endif // !defined(AFX_BACKUPDATA_H__00EC1850_A1A5_11D3_82DB_0020182B97FC__INCLUDED_) diff --git a/NSCmpts/EncryptSourceProp.cpp b/NSCmpts/EncryptSourceProp.cpp new file mode 100644 index 0000000..17b47f7 --- /dev/null +++ b/NSCmpts/EncryptSourceProp.cpp @@ -0,0 +1,28 @@ +// EncryptSourceProp.cpp : Implementation of CEncryptSourceProp +#include "stdafx.h" +#include "NSCmpts.h" +#include "EncryptSourceProp.h" + +///////////////////////////////////////////////////////////////////////////// +// CEncryptSourceProp + +LRESULT CEncryptSourceProp::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Let it initialize + CSourceProp::OnInitDialog(uMsg, wParam, lParam, bHandled); + + // Load the File List + m_Data.Initialize(m_nObjects, m_ppUnk); + + if(m_Data.IsInitialized()) + m_Data.GetStringSet(NS_ENCRYPT_REG_FILES, m_aPaths); + + // Set Icon and Caption for Xpy + CStatic icon = GetDlgItem(IDC_ICO); + icon.SetIcon(::LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_WXPY))); + SetDlgItemText(IDC_MESSAGE, _T("Encrypt these files or folders: ")); + + UpdateData(false); + + return TRUE; +} diff --git a/NSCmpts/EncryptSourceProp.h b/NSCmpts/EncryptSourceProp.h new file mode 100644 index 0000000..0be6b5a --- /dev/null +++ b/NSCmpts/EncryptSourceProp.h @@ -0,0 +1,87 @@ +// EncryptSourceProp.h : Declaration of the CEncryptSourceProp + +#ifndef __ENCRYPTSOURCEPROP_H_ +#define __ENCRYPTSOURCEPROP_H_ + +#include "resource.h" // main symbols + +#include "../common/cmptdata.h" +#include + +#include "sourceprop.h" + +EXTERN_C const CLSID CLSID_EncryptSourceProp; + +///////////////////////////////////////////////////////////////////////////// +// CEncryptSourceProp +class ATL_NO_VTABLE CEncryptSourceProp : + public CComObjectRootEx, + public CComCoClass, + public IPropertyPageImpl, + + // Most of functionality comes from + public CSourceProp, + public CContextHelp +{ + +// Construction +public: + CEncryptSourceProp() + { + m_dwTitleID = IDS_TITLEEncryptSourceProp; + m_dwHelpFileID = IDS_NSHELPFILE; + m_dwDocStringID = IDS_DOCSTRINGEncryptSourceProp; + } + +DECLARE_REGISTRY_RESOURCEID(IDR_ENCRYPTSOURCEPROP) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CEncryptSourceProp) + COM_INTERFACE_ENTRY(IPropertyPage) + COM_INTERFACE_ENTRY(IDropTarget) +END_COM_MAP() + +BEGIN_MSG_MAP(CEncryptSourceProp) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + CHAIN_MSG_MAP(CSourceProp) + CHAIN_MSG_MAP(IPropertyPageImpl) + CHAIN_MSG_MAP(CContextHelp) +END_MSG_MAP() + +BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(IDC_SOURCE_LIST, 4013) + HELP_ID(IDC_ADD, 4008) + HELP_ID(IDC_REMOVE, 4012) +END_HELP_MAP + +// Handler prototypes: +// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); +// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); +// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + + STDMETHOD(Apply)(void) + { + ATLTRACE(_T("CBackupSourceProp::Apply\n")); + + m_Data.Initialize(m_nObjects, m_ppUnk); + + if(!m_Data.IsInitialized()) + return E_FAIL; + + UpdateData(true); + + m_Data.WriteStringSet(NS_ENCRYPT_REG_FILES, m_aPaths); + + m_bDirty = FALSE; + return S_OK; + } + +protected: + CPropertyBag m_Data; + +}; + +#endif //__ENCRYPTSOURCEPROP_H_ diff --git a/NSCmpts/EncryptSourceProp.rgs b/NSCmpts/EncryptSourceProp.rgs new file mode 100644 index 0000000..dc935cf --- /dev/null +++ b/NSCmpts/EncryptSourceProp.rgs @@ -0,0 +1,23 @@ +HKCR +{ + NSCmpts.EncryptSourceProp.1 = s 'EncryptSourceProp Class' + { + CLSID = s '{B4981E50-A882-11D3-82E4-0020182B97FC}' + } + NSCmpts.EncryptSourceProp = s 'EncryptSourceProp Class' + { + CLSID = s '{B4981E50-A882-11D3-82E4-0020182B97FC}' + CurVer = s 'NSCmpts.EncryptSourceProp.1' + } + NoRemove CLSID + { + ForceRemove {B4981E50-A882-11D3-82E4-0020182B97FC} = s 'EncryptSourceProp Class' + { + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/NSCmpts/IDropTargetImpl.cpp b/NSCmpts/IDropTargetImpl.cpp new file mode 100644 index 0000000..0ca984d --- /dev/null +++ b/NSCmpts/IDropTargetImpl.cpp @@ -0,0 +1,20 @@ +// IDropTargetImpl.cpp: implementation of the IDropTargetImpl class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "IDropTargetImpl.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +IDropTargetImpl::IDropTargetImpl() +{ + +} + +IDropTargetImpl::~IDropTargetImpl() +{ + +} diff --git a/NSCmpts/IDropTargetImpl.h b/NSCmpts/IDropTargetImpl.h new file mode 100644 index 0000000..fe8c75e --- /dev/null +++ b/NSCmpts/IDropTargetImpl.h @@ -0,0 +1,20 @@ +// IDropTargetImpl.h: interface for the IDropTargetImpl class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_IDROPTARGETIMPL_H__C9CF5F33_A181_11D3_82DB_0020182B97FC__INCLUDED_) +#define AFX_IDROPTARGETIMPL_H__C9CF5F33_A181_11D3_82DB_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +class IDropTargetImpl +{ +public: + IDropTargetImpl(); + virtual ~IDropTargetImpl(); + +}; + +#endif // !defined(AFX_IDROPTARGETIMPL_H__C9CF5F33_A181_11D3_82DB_0020182B97FC__INCLUDED_) diff --git a/NSCmpts/IgnoreProp.cpp b/NSCmpts/IgnoreProp.cpp new file mode 100644 index 0000000..9769246 --- /dev/null +++ b/NSCmpts/IgnoreProp.cpp @@ -0,0 +1,179 @@ +// IgnoreProp.cpp: implementation of the CIgnoreProp class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "IgnoreProp.h" + +#include "resource.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + + +LRESULT CIgnoreProp::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Our Current Window + CWindow wndIgnore = m_hwndIgnore; + + + // Load the System Image list + m_imgList.Load(true); + + + // Set the List + m_ctlList = wndIgnore.GetDlgItem(IDC_IGNORE_LIST); + m_ctlList.SetImageList(m_imgList, LVSIL_SMALL); + + + // Set Button Icons + HICON hIconNew = ::LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_NEW)); + HICON hIconDel = ::LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_DEL)); + + CButton btn = wndIgnore.GetDlgItem(IDC_NEW); + btn.SetIcon(hIconNew); + + btn = wndIgnore.GetDlgItem(IDC_DEL); + btn.SetIcon(hIconDel); + + + // Load the Extension List + if(m_Data.IsInitialized()) + m_Data.GetStringSet(NS_IGNORE_REG_EXT, m_asExtensions); + + + UpdateData(false); + + return TRUE; +} + +// Adds an extension to the List Control +int CIgnoreProp::AddExtension(string sExtension) +{ + // Get the Extension Icon + int nIndex = m_imgList.GetTypeIndex(sExtension); + + LVITEM lv; + lv.mask = LVIF_TEXT | LVIF_IMAGE; + lv.iItem = 0; + lv.iSubItem = 0; + lv.pszText = sExtension.get_buffer(); + lv.iImage = nIndex; + + // Set it + return m_ctlList.InsertItem(&lv); +} + +// Updates or Saves data from Dialog +void CIgnoreProp::UpdateData(bool bSave) +{ + if(bSave) + { + m_asExtensions.clear(); + + // Go through List Box and take down names + TCHAR buff[MAX_PATH]; + int nItem = 0; + while(m_ctlList.GetItemText(nItem++, 0, buff, MAX_PATH)) + m_asExtensions.push_back(buff); + } + else + { + m_ctlList.DeleteAllItems(); + + // Add everything to the List Control + string_array::const_iterator iter = m_asExtensions.begin(); + for(; iter != m_asExtensions.end(); iter++) + AddExtension(*iter); + } +} + +LRESULT CIgnoreProp::OnEndLabelEdit(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + LVITEM* pItem = &((NMLVDISPINFO*)pnmh)->item; + + // Only Change if there is Text + if(pItem->pszText) + { + // Make sure text is sort of valid + // without illegal Characters + string sTemp(pItem->pszText); + string::size_type nPos; + while((nPos = sTemp.find_first_of(_T("\\/:*?\"<>|."))) != string::npos) + sTemp.erase(nPos, 1); + + // Copy it back to structure + _tcscpy(pItem->pszText, sTemp); + + // Modify Icon + pItem->iImage = m_imgList.GetTypeIndex(sTemp); + pItem->mask = pItem->mask | LVIF_IMAGE; + + // Set it + m_ctlList.SetItem(pItem); + } + + return 0; +} + +LRESULT CIgnoreProp::OnListSetFocus(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + // Disclaimer: This is a kludge fix + // SysListView32 wouldn't redraw itself when it had focus + // and app was activated + m_ctlList.Invalidate(); + m_ctlList.RedrawWindow(NULL, NULL, RDW_FRAME | RDW_INVALIDATE); + return 0; +} + +LRESULT CIgnoreProp::OnKeyDown(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + NMLVKEYDOWN* pLVKeyDow = (NMLVKEYDOWN*)pnmh; + + // if F2 then Edit + if(pLVKeyDow->wVKey == VK_F2) + { + m_ctlList.SetFocus(); // Needs to have the Focus in order to edit + m_ctlList.EditLabel(m_ctlList.GetNextItem(-1, LVNI_ALL | LVNI_FOCUSED)); + } + + // If Delete then call Delete Handler + if(pLVKeyDow->wVKey == VK_DELETE) + { + OnRemove(0, 0, 0, bHandled); + } + + return 0; +} + +LRESULT CIgnoreProp::OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + int iItem = -1; + + // Loop through selected items + while((iItem = m_ctlList.GetNextItem(-1, LVNI_ALL | LVNI_SELECTED)) != -1) + // Take it out of List Box + m_ctlList.DeleteItem(iItem); + + return 0; +} + +/*template*/ +LRESULT CIgnoreProp/**/::OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + int iItem = -1; + + // Add an basic extension + string sExt; + sExt.load_string(IDS_BACKUP_NEWEXT); + + if((iItem = AddExtension(sExt)) != -1) + { + // Open for Editing + m_ctlList.SetFocus(); // Needs to have the Focus in order to edit + m_ctlList.EditLabel(iItem); + } + + return 0; +} \ No newline at end of file diff --git a/NSCmpts/IgnoreProp.h b/NSCmpts/IgnoreProp.h new file mode 100644 index 0000000..206519e --- /dev/null +++ b/NSCmpts/IgnoreProp.h @@ -0,0 +1,51 @@ +// IgnoreProp.h: interface for the CIgnoreProp class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_IGNOREPROP_H__93425F11_BC15_11D3_82FF_005056D45AB0__INCLUDED_) +#define AFX_IGNOREPROP_H__93425F11_BC15_11D3_82FF_005056D45AB0__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include + +#include "../common/CmptData.h" + +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////////// +// CIgnoreProp is common code for the Advanced Property Pages + +class CIgnoreProp +{ +public: + CIgnoreProp(CPropertyBag& data) : m_Data(data) {} + +// Message Handlers +protected: + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnEndLabelEdit(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnListSetFocus(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnKeyDown(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + +// Helper Functions +protected: + int AddExtension(string sExtension); + void UpdateData(bool bSave); + +// Data +protected: + CSysImageList m_imgList; // For looking up Icons + CListViewCtrl m_ctlList; // List Control + string_array m_asExtensions; // Set of Extensions + CPropertyBag& m_Data; // Reference to Data + HWND m_hwndIgnore; // Dialog Window to work with (set by class user) +}; + +#endif // !defined(AFX_IGNOREPROP_H__93425F11_BC15_11D3_82FF_005056D45AB0__INCLUDED_) diff --git a/NSCmpts/NSCmpts.aps b/NSCmpts/NSCmpts.aps new file mode 100644 index 0000000..5d2aa14 Binary files /dev/null and b/NSCmpts/NSCmpts.aps differ diff --git a/NSCmpts/NSCmpts.cpp b/NSCmpts/NSCmpts.cpp new file mode 100644 index 0000000..8dcaecf --- /dev/null +++ b/NSCmpts/NSCmpts.cpp @@ -0,0 +1,130 @@ +// NSCmpts.cpp : Implementation of DLL Exports. + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f NSCmptsps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include +#include "NSCmpts.h" + +#include "NSCmpts_i.c" +#include "../common/interfaces.cpp" +#include "EmptyRecycleBin.h" +#include "EmptyTempFolder.h" +#include "DeleteSwapFile.h" +#include "RunScanDisk.h" +#include "WipefreeSpace.h" +#include "Backup.h" + +#include "..\Common\Defines.h" +#include "BackupSourceProp.h" +#include "BackupDestProp.h" +#include "BackupAdvancedProp.h" +#include "NightSecError.h" +#include "Encrypt.h" +#include "EncryptSourceProp.h" +#include "EncryptAdvancedProp.h" + +CComModule _Module; + +BEGIN_OBJECT_MAP(ObjectMap) + OBJECT_ENTRY(CLSID_EmptyRecycleBin, CEmptyRecycleBin) + OBJECT_ENTRY(CLSID_EmptyTempFolder, CEmptyTempFolder) + OBJECT_ENTRY(CLSID_DeleteSwapFile, CDeleteSwapFile) + OBJECT_ENTRY(CLSID_RunScanDisk, CRunScanDisk) + OBJECT_ENTRY(CLSID_WipefreeSpace, CWipefreeSpace) + OBJECT_ENTRY(CLSID_Backup, CBackup) + OBJECT_ENTRY(CLSID_BackupSourceProp, CBackupSourceProp) + OBJECT_ENTRY(CLSID_BackupDestProp, CBackupDestProp) + OBJECT_ENTRY(CLSID_BackupAdvancedProp, CBackupAdvancedProp) + OBJECT_ENTRY(CLSID_Encrypt, CEncrypt) + OBJECT_ENTRY(CLSID_EncryptSourceProp, CEncryptSourceProp) + OBJECT_ENTRY(CLSID_EncryptAdvancedProp, CEncryptAdvancedProp) +END_OBJECT_MAP() + +///////////////////////////////////////////////////////////////////////////// +// DLL Entry Point + +extern "C" +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +{ + if (dwReason == DLL_PROCESS_ATTACH) + { + _Module.Init(ObjectMap, hInstance, &LIBID_NightSecCmpts); + DisableThreadLibraryCalls(hInstance); + + // Not mission critical (used only for drag drop) + OleInitialize(NULL); + } + else if (dwReason == DLL_PROCESS_DETACH) + { + _Module.Term(); + + // Not mission critical (used only for drag drop) + OleUninitialize(); + } + return TRUE; // ok +} + +///////////////////////////////////////////////////////////////////////////// +// Used to determine whether the DLL can be unloaded by OLE + +STDAPI DllCanUnloadNow(void) +{ + return (_Module.GetLockCount()==0) ? S_OK : S_FALSE; +} + +///////////////////////////////////////////////////////////////////////////// +// Returns a class factory to create an object of the requested type + +STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) +{ + return _Module.GetClassObject(rclsid, riid, ppv); +} + +///////////////////////////////////////////////////////////////////////////// +// DllRegisterServer - Adds entries to the system registry + +STDAPI DllRegisterServer(void) +{ + // <<<< Addition + // InstallShield Doesn't call this for the current thread + // And if we're using the _ATL_DLL (COM Based) we need this + HRESULT hr = CoInitialize(NULL); + // End >>>> + + // registers object, typelib and all interfaces in typelib + return _Module.RegisterServer(TRUE); + + // <<<< Addition + if(SUCCEEDED(hr)) + CoUninitialize(); + + return hr; + // End >>>> + +} + +///////////////////////////////////////////////////////////////////////////// +// DllUnregisterServer - Removes entries from the system registry + +STDAPI DllUnregisterServer(void) +{ + // <<<< Addition + HRESULT hr = CoInitialize(NULL); + // End >>>> + + return _Module.UnregisterServer(TRUE); + + // <<<< Addition + if(SUCCEEDED(hr)) + CoUninitialize(); + + return S_OK; + // End >>>> +} + + diff --git a/NSCmpts/NSCmpts.def b/NSCmpts/NSCmpts.def new file mode 100644 index 0000000..aad945f --- /dev/null +++ b/NSCmpts/NSCmpts.def @@ -0,0 +1,9 @@ +; NSCmpts.def : Declares the module parameters. + +LIBRARY "NSCmpts.DLL" + +EXPORTS + DllCanUnloadNow @1 PRIVATE + DllGetClassObject @2 PRIVATE + DllRegisterServer @3 PRIVATE + DllUnregisterServer @4 PRIVATE diff --git a/NSCmpts/NSCmpts.dsp b/NSCmpts/NSCmpts.dsp new file mode 100644 index 0000000..1b706f4 --- /dev/null +++ b/NSCmpts/NSCmpts.dsp @@ -0,0 +1,695 @@ +# Microsoft Developer Studio Project File - Name="NSCmpts" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=NSCmpts - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "NSCmpts.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "NSCmpts.mak" CFG="NSCmpts - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "NSCmpts - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "NSCmpts - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "NSCmpts - Win32 Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "NSCmpts - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "NSCmpts - Win32 Unicode Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "NSCmpts - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "NSCmpts - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /Gi /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 comdlg32.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x67870000" /subsystem:windows /dll /debug /machine:I386 /out:"../Debug/NSCmpts.dll" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none +# Begin Custom Build - Performing registration +OutDir=.\Debug +TargetPath=\Projects\NightSec\Debug\NSCmpts.dll +InputPath=\Projects\NightSec\Debug\NSCmpts.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "NSCmpts - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 comdlg32.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x67870000" /subsystem:windows /dll /debug /machine:I386 /out:"../Debug/NSCmpts.dll" /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\DebugU +TargetPath=\Projects\NightSec\Debug\NSCmpts.dll +InputPath=\Projects\NightSec\Debug\NSCmpts.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "NSCmpts - Win32 Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinSize" +# PROP BASE Intermediate_Dir "ReleaseMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinSize" +# PROP Intermediate_Dir "ReleaseMinSize" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 comdlg32.lib kernel32.lib user32.lib gdi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x67870000" /subsystem:windows /dll /machine:I386 /out:"../Release/NSCmpts.dll" /OPT:NOWIN98 +# SUBTRACT LINK32 /pdb:none +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinSize +TargetPath=\Projects\NightSec\Release\NSCmpts.dll +InputPath=\Projects\NightSec\Release\NSCmpts.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "NSCmpts - Win32 Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinDependency" +# PROP BASE Intermediate_Dir "ReleaseMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinDependency" +# PROP Intermediate_Dir "ReleaseMinDependency" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x67870000" /subsystem:windows /dll /machine:I386 /out:"../Release/NSCmpts.dll" +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinDependency +TargetPath=\Projects\NightSec\Release\NSCmpts.dll +InputPath=\Projects\NightSec\Release\NSCmpts.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "NSCmpts - Win32 Unicode Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinSize" +# PROP BASE Intermediate_Dir "ReleaseUMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinSize" +# PROP Intermediate_Dir "ReleaseUMinSize" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 comdlg32.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x67870000" /subsystem:windows /dll /machine:I386 /out:"../Release/NSCmpts.dll" +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinSize +TargetPath=\Projects\NightSec\Release\NSCmpts.dll +InputPath=\Projects\NightSec\Release\NSCmpts.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "NSCmpts - Win32 Unicode Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinDependency" +# PROP BASE Intermediate_Dir "ReleaseUMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinDependency" +# PROP Intermediate_Dir "ReleaseUMinDependency" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 comdlg32.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x67870000" /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\NSCmpts.dll +InputPath=.\ReleaseUMinDependency\NSCmpts.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "NSCmpts - Win32 Debug" +# Name "NSCmpts - Win32 Unicode Debug" +# Name "NSCmpts - Win32 Release MinSize" +# Name "NSCmpts - Win32 Release MinDependency" +# Name "NSCmpts - Win32 Unicode Release MinSize" +# Name "NSCmpts - Win32 Unicode Release MinDependency" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ActionEngine.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\Include\src\appmisc.cpp +# End Source File +# Begin Source File + +SOURCE=.\Backup.cpp +# End Source File +# Begin Source File + +SOURCE=.\BackupActions.cpp +# End Source File +# Begin Source File + +SOURCE=.\BackupAdvancedProp.cpp +# End Source File +# Begin Source File + +SOURCE=.\BackupDestProp.cpp +# End Source File +# Begin Source File + +SOURCE=.\BackupSourceProp.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\CmptData.cpp +# End Source File +# Begin Source File + +SOURCE=..\Interfaces\CmptIfaces.idl + +!IF "$(CFG)" == "NSCmpts - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "NSCmpts - Win32 Unicode Debug" + +!ELSEIF "$(CFG)" == "NSCmpts - Win32 Release MinSize" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "NSCmpts - Win32 Release MinDependency" + +!ELSEIF "$(CFG)" == "NSCmpts - Win32 Unicode Release MinSize" + +!ELSEIF "$(CFG)" == "NSCmpts - Win32 Unicode Release MinDependency" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\DeleteSwapFile.cpp +# End Source File +# Begin Source File + +SOURCE=.\EmptyRecycleBin.cpp +# End Source File +# Begin Source File + +SOURCE=.\EmptyTempFolder.cpp +# End Source File +# Begin Source File + +SOURCE=.\Encrypt.cpp +# End Source File +# Begin Source File + +SOURCE=.\EncryptActions.cpp +# End Source File +# Begin Source File + +SOURCE=.\EncryptAdvancedProp.cpp +# End Source File +# Begin Source File + +SOURCE=.\EncryptSourceProp.cpp +# End Source File +# Begin Source File + +SOURCE=.\IgnoreProp.cpp +# End Source File +# Begin Source File + +SOURCE=.\NightSecError.cpp +# End Source File +# Begin Source File + +SOURCE=.\NSCmpts.cpp +# End Source File +# Begin Source File + +SOURCE=.\NSCmpts.def +# End Source File +# Begin Source File + +SOURCE=.\NSCmpts.idl +# ADD MTL /tlb ".\NSCmpts.tlb" /h "NSCmpts.h" /iid "NSCmpts_i.c" /Oicf +# End Source File +# Begin Source File + +SOURCE=.\NSCmpts.rc +# End Source File +# Begin Source File + +SOURCE=..\..\Include\src\path.cpp +# End Source File +# Begin Source File + +SOURCE=.\ProgressDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\RunScanDisk.cpp +# End Source File +# Begin Source File + +SOURCE=.\SourceProp.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\TempActions.cpp +# End Source File +# Begin Source File + +SOURCE=.\TempWarnDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\WipefreeSpace.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ActionEngine.h +# End Source File +# Begin Source File + +SOURCE=.\Backup.h +# End Source File +# Begin Source File + +SOURCE=.\BackupActions.h +# End Source File +# Begin Source File + +SOURCE=.\BackupAdvancedProp.h +# End Source File +# Begin Source File + +SOURCE=.\BackupDestProp.h +# End Source File +# Begin Source File + +SOURCE=.\BackupSourceProp.h +# End Source File +# Begin Source File + +SOURCE=..\Common\CmptData.h +# End Source File +# Begin Source File + +SOURCE=.\DeleteSwapFile.h +# End Source File +# Begin Source File + +SOURCE=.\EmptyRecycleBin.h +# End Source File +# Begin Source File + +SOURCE=.\EmptyTempFolder.h +# End Source File +# Begin Source File + +SOURCE=.\Encrypt.h +# End Source File +# Begin Source File + +SOURCE=.\EncryptActions.h +# End Source File +# Begin Source File + +SOURCE=.\EncryptAdvancedProp.h +# End Source File +# Begin Source File + +SOURCE=.\EncryptSourceProp.h +# End Source File +# Begin Source File + +SOURCE=.\IgnoreProp.h +# End Source File +# Begin Source File + +SOURCE=.\NightSecError.h +# End Source File +# Begin Source File + +SOURCE=.\NSMessages.h +# End Source File +# Begin Source File + +SOURCE=.\ProgressDlg.h +# End Source File +# Begin Source File + +SOURCE=.\PromptClose.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\RunScanDisk.h +# End Source File +# Begin Source File + +SOURCE=.\SourceProp.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\TempActions.h +# End Source File +# Begin Source File + +SOURCE=.\TempWarnDlg.h +# End Source File +# Begin Source File + +SOURCE=..\Common\types.h +# End Source File +# Begin Source File + +SOURCE=.\WipefreeSpace.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\161.avi +# End Source File +# Begin Source File + +SOURCE=.\res\advanced.ico +# End Source File +# Begin Source File + +SOURCE=.\Backup.rgs +# End Source File +# Begin Source File + +SOURCE=.\res\backup1.ico +# End Source File +# Begin Source File + +SOURCE=.\BackupAdvancedProp.rgs +# End Source File +# Begin Source File + +SOURCE=.\BackupDestProp.rgs +# End Source File +# Begin Source File + +SOURCE=.\BackupSourceProp.rgs +# End Source File +# Begin Source File + +SOURCE=.\res\copyfile.ico +# End Source File +# Begin Source File + +SOURCE=.\res\cursor1.cur +# End Source File +# Begin Source File + +SOURCE=.\res\DeleteSwapFile.rgs +# End Source File +# Begin Source File + +SOURCE=.\EmptyRecycleBin.rgs +# End Source File +# Begin Source File + +SOURCE=.\res\EmptyTempFolder.rgs +# End Source File +# Begin Source File + +SOURCE=.\res\enc.avi +# End Source File +# Begin Source File + +SOURCE=.\Encrypt.rgs +# End Source File +# Begin Source File + +SOURCE=.\EncryptAdvancedProp.rgs +# End Source File +# Begin Source File + +SOURCE=.\EncryptSourceProp.rgs +# End Source File +# Begin Source File + +SOURCE=.\res\ico00001.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ico00002.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ico00003.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ico00004.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ico00005.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ico00006.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ico00007.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ico00008.ico +# End Source File +# Begin Source File + +SOURCE=.\res\icon1.ico +# End Source File +# Begin Source File + +SOURCE=.\res\icon2.ico +# End Source File +# Begin Source File + +SOURCE=.\res\items.ico +# End Source File +# Begin Source File + +SOURCE=.\res\new1.ico +# End Source File +# Begin Source File + +SOURCE=".\res\Night Security Worker.ico" +# End Source File +# Begin Source File + +SOURCE=.\res\recycle.ico +# End Source File +# Begin Source File + +SOURCE=.\res\RunScanDisk.rgs +# End Source File +# Begin Source File + +SOURCE=.\res\temp.avi +# End Source File +# Begin Source File + +SOURCE=.\res\WipefreeSpace.rgs +# End Source File +# Begin Source File + +SOURCE=.\res\wxpy.ico +# End Source File +# End Group +# End Target +# End Project +# Section NSCmpts : {00708077-0000-0000-0000-000077087800} +# 1:18:IDR_BACKUPDESTPROP:112 +# 1:27:IDS_DOCSTRINGBackupDestProp:111 +# 1:23:IDS_TITLEBackupDestProp:106 +# 1:18:IDD_BACKUPDESTPROP:113 +# 1:26:IDS_HELPFILEBackupDestProp:110 +# End Section +# Section NSCmpts : {00008088-0000-0000-0000-000000000000} +# 1:23:IDR_ENCRYPTADVANCEDPROP:170 +# 1:32:IDS_DOCSTRINGEncryptAdvancedProp:169 +# 1:28:IDS_TITLEEncryptAdvancedProp:167 +# 1:23:IDD_ENCRYPTADVANCEDPROP:171 +# 1:31:IDS_HELPFILEEncryptAdvancedProp:168 +# End Section +# Section NSCmpts : {00008077-0800-7777-7777-777777777777} +# 1:22:IDR_BACKUPADVANCEDPROP:126 +# 1:30:IDS_HELPFILEBackupAdvancedProp:115 +# 1:31:IDS_DOCSTRINGBackupAdvancedProp:116 +# 1:22:IDD_BACKUPADVANCEDPROP:127 +# 1:27:IDS_TITLEBackupAdvancedProp:114 +# End Section diff --git a/NSCmpts/NSCmpts.h b/NSCmpts/NSCmpts.h new file mode 100644 index 0000000..629dd78 --- /dev/null +++ b/NSCmpts/NSCmpts.h @@ -0,0 +1,298 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Sat Mar 04 00:04:32 2000 + */ +/* Compiler settings for E:\Projects\NightSec\NSCmpts\NSCmpts.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __NSCmpts_h__ +#define __NSCmpts_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __EmptyRecycleBin_FWD_DEFINED__ +#define __EmptyRecycleBin_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class EmptyRecycleBin EmptyRecycleBin; +#else +typedef struct EmptyRecycleBin EmptyRecycleBin; +#endif /* __cplusplus */ + +#endif /* __EmptyRecycleBin_FWD_DEFINED__ */ + + +#ifndef __EmptyTempFolder_FWD_DEFINED__ +#define __EmptyTempFolder_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class EmptyTempFolder EmptyTempFolder; +#else +typedef struct EmptyTempFolder EmptyTempFolder; +#endif /* __cplusplus */ + +#endif /* __EmptyTempFolder_FWD_DEFINED__ */ + + +#ifndef __DeleteSwapFile_FWD_DEFINED__ +#define __DeleteSwapFile_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DeleteSwapFile DeleteSwapFile; +#else +typedef struct DeleteSwapFile DeleteSwapFile; +#endif /* __cplusplus */ + +#endif /* __DeleteSwapFile_FWD_DEFINED__ */ + + +#ifndef __RunScanDisk_FWD_DEFINED__ +#define __RunScanDisk_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class RunScanDisk RunScanDisk; +#else +typedef struct RunScanDisk RunScanDisk; +#endif /* __cplusplus */ + +#endif /* __RunScanDisk_FWD_DEFINED__ */ + + +#ifndef __WipefreeSpace_FWD_DEFINED__ +#define __WipefreeSpace_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class WipefreeSpace WipefreeSpace; +#else +typedef struct WipefreeSpace WipefreeSpace; +#endif /* __cplusplus */ + +#endif /* __WipefreeSpace_FWD_DEFINED__ */ + + +#ifndef __Backup_FWD_DEFINED__ +#define __Backup_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class Backup Backup; +#else +typedef struct Backup Backup; +#endif /* __cplusplus */ + +#endif /* __Backup_FWD_DEFINED__ */ + + +#ifndef __BackupSourceProp_FWD_DEFINED__ +#define __BackupSourceProp_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class BackupSourceProp BackupSourceProp; +#else +typedef struct BackupSourceProp BackupSourceProp; +#endif /* __cplusplus */ + +#endif /* __BackupSourceProp_FWD_DEFINED__ */ + + +#ifndef __BackupDestProp_FWD_DEFINED__ +#define __BackupDestProp_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class BackupDestProp BackupDestProp; +#else +typedef struct BackupDestProp BackupDestProp; +#endif /* __cplusplus */ + +#endif /* __BackupDestProp_FWD_DEFINED__ */ + + +#ifndef __BackupAdvancedProp_FWD_DEFINED__ +#define __BackupAdvancedProp_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class BackupAdvancedProp BackupAdvancedProp; +#else +typedef struct BackupAdvancedProp BackupAdvancedProp; +#endif /* __cplusplus */ + +#endif /* __BackupAdvancedProp_FWD_DEFINED__ */ + + +#ifndef __Encrypt_FWD_DEFINED__ +#define __Encrypt_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class Encrypt Encrypt; +#else +typedef struct Encrypt Encrypt; +#endif /* __cplusplus */ + +#endif /* __Encrypt_FWD_DEFINED__ */ + + +#ifndef __EncryptSourceProp_FWD_DEFINED__ +#define __EncryptSourceProp_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class EncryptSourceProp EncryptSourceProp; +#else +typedef struct EncryptSourceProp EncryptSourceProp; +#endif /* __cplusplus */ + +#endif /* __EncryptSourceProp_FWD_DEFINED__ */ + + +#ifndef __EncryptAdvancedProp_FWD_DEFINED__ +#define __EncryptAdvancedProp_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class EncryptAdvancedProp EncryptAdvancedProp; +#else +typedef struct EncryptAdvancedProp EncryptAdvancedProp; +#endif /* __cplusplus */ + +#endif /* __EncryptAdvancedProp_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "cmptifaces.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + + +#ifndef __NightSecCmpts_LIBRARY_DEFINED__ +#define __NightSecCmpts_LIBRARY_DEFINED__ + +/* library NightSecCmpts */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_NightSecCmpts; + +EXTERN_C const CLSID CLSID_EmptyRecycleBin; + +#ifdef __cplusplus + +class DECLSPEC_UUID("34F11694-F275-11d2-A589-0020182B97FC") +EmptyRecycleBin; +#endif + +EXTERN_C const CLSID CLSID_EmptyTempFolder; + +#ifdef __cplusplus + +class DECLSPEC_UUID("34F11695-F275-11d2-A589-0020182B97FC") +EmptyTempFolder; +#endif + +EXTERN_C const CLSID CLSID_DeleteSwapFile; + +#ifdef __cplusplus + +class DECLSPEC_UUID("34F11696-F275-11d2-A589-0020182B97FC") +DeleteSwapFile; +#endif + +EXTERN_C const CLSID CLSID_RunScanDisk; + +#ifdef __cplusplus + +class DECLSPEC_UUID("34F11697-F275-11d2-A589-0020182B97FC") +RunScanDisk; +#endif + +EXTERN_C const CLSID CLSID_WipefreeSpace; + +#ifdef __cplusplus + +class DECLSPEC_UUID("34F11698-F275-11d2-A589-0020182B97FC") +WipefreeSpace; +#endif + +EXTERN_C const CLSID CLSID_Backup; + +#ifdef __cplusplus + +class DECLSPEC_UUID("2E47D920-3D64-11D3-BF0A-0020182B97FC") +Backup; +#endif + +EXTERN_C const CLSID CLSID_BackupSourceProp; + +#ifdef __cplusplus + +class DECLSPEC_UUID("E85A26C1-946D-11D3-BFC4-0020182B97FC") +BackupSourceProp; +#endif + +EXTERN_C const CLSID CLSID_BackupDestProp; + +#ifdef __cplusplus + +class DECLSPEC_UUID("E85A26C2-946D-11D3-BFC4-0020182B97FC") +BackupDestProp; +#endif + +EXTERN_C const CLSID CLSID_BackupAdvancedProp; + +#ifdef __cplusplus + +class DECLSPEC_UUID("E85A26C3-946D-11D3-BFC4-0020182B97FC") +BackupAdvancedProp; +#endif + +EXTERN_C const CLSID CLSID_Encrypt; + +#ifdef __cplusplus + +class DECLSPEC_UUID("22AD5F42-A7F1-11D3-82E3-0020182B97FC") +Encrypt; +#endif + +EXTERN_C const CLSID CLSID_EncryptSourceProp; + +#ifdef __cplusplus + +class DECLSPEC_UUID("B4981E50-A882-11D3-82E4-0020182B97FC") +EncryptSourceProp; +#endif + +EXTERN_C const CLSID CLSID_EncryptAdvancedProp; + +#ifdef __cplusplus + +class DECLSPEC_UUID("93425F13-BC15-11D3-82FF-005056D45AB0") +EncryptAdvancedProp; +#endif +#endif /* __NightSecCmpts_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/NSCmpts/NSCmpts.idl b/NSCmpts/NSCmpts.idl new file mode 100644 index 0000000..77c0c0e --- /dev/null +++ b/NSCmpts/NSCmpts.idl @@ -0,0 +1,123 @@ +// NSCmpts.idl : IDL source for NSCmpts.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (NSCmpts.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + +import "../interfaces/cmptifaces.idl"; +[ + uuid(34F11693-F275-11d2-A589-0020182B97FC), + version(2.5), + helpstring("NightSec Components 2.5") +] +library NightSecCmpts +{ + importlib("stdole32.tlb"); + + [ + uuid(34F11694-F275-11d2-A589-0020182B97FC), + helpstring("Empties the recycle bin and Norton Protected Files") + ] + coclass EmptyRecycleBin + { + interface ISecureShutdownWin; + }; + [ + uuid(34F11695-F275-11d2-A589-0020182B97FC), + helpstring("Clears the temp folder") + ] + coclass EmptyTempFolder + { + interface ISecureShutdownWin; + }; + [ + uuid(34F11696-F275-11d2-A589-0020182B97FC), + helpstring("Delete swap file command") + ] + coclass DeleteSwapFile + { + interface ISecureShutdownDOS; + }; + [ + uuid(34F11697-F275-11d2-A589-0020182B97FC), + helpstring("Command for running scandisk") + ] + coclass RunScanDisk + { + interface ISecureShutdownDOS; + }; + [ + uuid(34F11698-F275-11d2-A589-0020182B97FC), + helpstring("Command for Wiping free space on hard disk(s)") + ] + coclass WipefreeSpace + { + interface ISecureShutdownDOS; + }; + + [ + uuid(2E47D920-3D64-11D3-BF0A-0020182B97FC), + helpstring("Backs up the users files") + ] + coclass Backup + { + [default] interface ISecureShutdownWin; + }; + + [ + uuid(E85A26C1-946D-11D3-BFC4-0020182B97FC), + helpstring("BackupSourceProp Class") + ] + coclass BackupSourceProp + { + interface IUnknown; + }; + + [ + uuid(E85A26C2-946D-11D3-BFC4-0020182B97FC), + helpstring("BackupDestProp Class") + ] + coclass BackupDestProp + { + interface IUnknown; + }; + + [ + uuid(E85A26C3-946D-11D3-BFC4-0020182B97FC), + helpstring("BackupAdvancedProp Class") + ] + coclass BackupAdvancedProp + { + interface IUnknown; + }; + + [ + uuid(22AD5F42-A7F1-11D3-82E3-0020182B97FC), + helpstring("Encrypts the user's files") + ] + coclass Encrypt + { + [default] interface ISecureShutdownWin; + }; + + [ + uuid(B4981E50-A882-11D3-82E4-0020182B97FC), + helpstring("EncryptSourceProp Class") + ] + coclass EncryptSourceProp + { + interface IUnknown; + }; + + [ + uuid(93425F13-BC15-11D3-82FF-005056D45AB0), + helpstring("EncryptAdvancedProp Class") + ] + coclass EncryptAdvancedProp + { + interface IUnknown; + }; +}; diff --git a/NSCmpts/NSCmpts.plg b/NSCmpts/NSCmpts.plg new file mode 100644 index 0000000..aa7bb20 --- /dev/null +++ b/NSCmpts/NSCmpts.plg @@ -0,0 +1,16 @@ + + +
+

Build Log

+

+--------------------Configuration: NSCmpts - Win32 Release MinSize-------------------- +

+

Command Lines

+ + + +

Results

+NSCmpts.dll - 0 error(s), 0 warning(s) +
+ + diff --git a/NSCmpts/NSCmpts.rc b/NSCmpts/NSCmpts.rc new file mode 100644 index 0000000..9c36b8d --- /dev/null +++ b/NSCmpts/NSCmpts.rc @@ -0,0 +1,516 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.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 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "1 TYPELIB ""NSCmpts.tlb""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 2,5,0,1 + PRODUCTVERSION 2,5,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Components for Night Security Program\0" + VALUE "CompanyName", "The Family (Thailand)\0" + VALUE "FileDescription", "Night Security (Component Module)\0" + VALUE "FileVersion", "2, 5, 0, 1\0" + VALUE "InternalName", "NSCmpts\0" + VALUE "LegalCopyright", "Copyright (C) 1998 - 1999, The Family (Thailand)\0" + VALUE "LegalTrademarks", "\0" + VALUE "OLESelfRegister", "\0" + VALUE "OriginalFilename", "nscmpts.dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "Night Security 2.5\0" + VALUE "ProductVersion", "2, 5, 0, 1\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_EMPTYRECYCLE DIALOG DISCARDABLE 0, 0, 200, 115 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "Recycle Bin Options: ",IDC_STATIC,0,0,199,114 + ICON IDI_RECYCLE,IDC_STATIC,7,16,20,20 + ICON IDI_NOTE,IDC_STATIC,5,86,20,20 + LTEXT "Normally it's best to leave both these options on. Norton Protected Files can have things in it you hadn't even saved.", + IDC_STATIC,33,85,159,24 + CONTROL "Empty Recycle Bin",IDC_EMPTYRECYCLE,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,35,23,75,10 + CONTROL "Empty Norton Protected Files",IDC_EMPTYNORTON,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,35,53,107,10 + ICON IDI_NORTONPROT,IDC_STATIC,7,46,20,20 + GROUPBOX "Note: ",IDC_STATIC,0,75,198,38 +END + +IDD_RUNSCANDISK DIALOG DISCARDABLE 0, 0, 200, 115 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "&Automatically Fix Errors",IDC_AUTOFIX,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,35,20,88,10 + CONTROL "&Save Lost Clusters as Files",IDC_SAVE,"Button", + BS_AUTORADIOBUTTON | WS_GROUP,49,33,100,10 + CONTROL "&Delete Lost Clusters",IDC_NOSAVE,"Button", + BS_AUTORADIOBUTTON,49,44,79,10 + GROUPBOX "Scandisk Options: ",IDC_STATIC,0,0,199,114 + ICON IDI_SCANDISK,IDC_STATIC,7,14,20,20 + LTEXT "For security reasons it's usually best to leave 'Delete Lost Clusters' checked.", + IDC_STATIC,33,84,160,18 + GROUPBOX "Note: ",IDC_STATIC,0,74,199,40 + ICON IDI_NOTE,IDC_STATIC,5,86,20,20 +END + +IDD_TEMPWARNDLG DIALOG DISCARDABLE 0, 0, 250, 84 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Empty Temporary Files" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Yes",IDOK,139,63,50,14 + DEFPUSHBUTTON "No",IDCANCEL,193,63,50,14 + ICON IDI_EXCLAM,IDC_STATIC,7,7,20,20 + LTEXT "This folder doesn't look like a folder where temporary files are normally stored. Please check and make sure this is actually the folder where you keep temporary files. \n\nAre you sure you want to remove all the files inside it? ", + IDC_FOLDERWARN,33,7,210,48 + CONTROL "Don't show this again.",IDC_DONTSHOW,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,67,124,10 +END + +IDD_WIPEFREESPACE DIALOG DISCARDABLE 0, 0, 200, 115 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "Wipe free space on: ",IDC_STATIC,0,0,199,114 + ICON IDI_DRIVE,IDC_STATIC,7,13,20,20 + LTEXT "Wipe the free space on all your hard drives unless you are sure there is no sensitive material on that drive. (Always wipe your system drive)", + IDC_STATIC,31,84,161,24 + GROUPBOX "Note: ",IDC_STATIC,0,74,199,40 + CONTROL "Item1",IDC_FIRST_DRIVE,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,38,14,42,10 + CONTROL "Item1",IDC_FIRST_DRIVE2,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,85,14,41,10 + CONTROL "Item1",IDC_FIRST_DRIVE3,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,132,14,42,10 + CONTROL "Item1",IDC_FIRST_DRIVE4,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,38,25,43,10 + CONTROL "Item1",IDC_FIRST_DRIVE5,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,85,25,44,10 + CONTROL "Item1",IDC_FIRST_DRIVE6,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,132,25,42,10 + CONTROL "Item1",IDC_FIRST_DRIVE7,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,38,37,41,10 + CONTROL "Item1",IDC_FIRST_DRIVE8,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,85,37,42,10 + CONTROL "Item1",IDC_FIRST_DRIVE9,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,132,37,43,10 + CONTROL "Item1",IDC_FIRST_DRIVE10,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,38,49,44,10 + CONTROL "Item1",IDC_FIRST_DRIVE11,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,85,50,42,10 + CONTROL "Item1",IDC_FIRST_DRIVE12,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,132,50,41,10 + CONTROL "Item1",IDC_FIRST_DRIVE13,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,38,62,42,10 + CONTROL "Item1",IDC_FIRST_DRIVE14,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,85,62,43,10 + CONTROL "Item1",IDC_FIRST_DRIVE15,"Button",BS_AUTOCHECKBOX | NOT + WS_VISIBLE | WS_TABSTOP,132,62,44,10 + ICON IDI_NOTE,IDC_STATIC,5,86,20,20 +END + +IDD_SOURCE DIALOGEX 0, 0, 200, 115 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "List1",IDC_SOURCE_LIST,"SysListView32",LVS_REPORT | + LVS_SHOWSELALWAYS | LVS_SORTASCENDING | + LVS_SHAREIMAGELISTS | LVS_EDITLABELS | + LVS_NOCOLUMNHEADER | WS_TABSTOP,6,11,141,96, + WS_EX_CLIENTEDGE + PUSHBUTTON "Add...",IDC_ADD,153,11,39,15 + PUSHBUTTON "Remove",IDC_REMOVE,153,29,39,15 + GROUPBOX "Files or folders: ",IDC_MESSAGE,0,0,199,114 + ICON IDI_BACKUP,IDC_ICO,162,86,20,20 +END + +IDD_BACKUPDEST DIALOG DISCARDABLE 0, 0, 200, 115 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "Backup files to: ",IDC_STATIC,0,0,199,114 + EDITTEXT IDC_DEST,7,40,182,14,ES_AUTOHSCROLL + PUSHBUTTON "Browse...",IDC_BROWSE,139,58,50,14 + ICON IDI_BACKUP,IDC_STATIC,9,13,20,20 + LTEXT "Select the drive or location you'd like to back up to:", + IDC_STATIC,39,14,150,22 +END + +IDD_BACKUPADVANCED DIALOG DISCARDABLE 0, 0, 200, 115 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + COMBOBOX IDC_ENGINE_TYPE,117,14,72,73,CBS_DROPDOWNLIST | CBS_SORT | + CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Advanced options: ",IDC_STATIC,0,0,199,114 + CONTROL "List1",IDC_IGNORE_LIST,"SysListView32",LVS_LIST | + LVS_SORTASCENDING | LVS_SHAREIMAGELISTS | LVS_EDITLABELS | + WS_BORDER | WS_TABSTOP,9,53,162,54 + LTEXT "&Ignore files with these extensions: ",IDC_STATIC,9,42, + 108,8 + LTEXT "Backup &according to:",IDC_STATIC,43,16,69,8 + PUSHBUTTON "&New URL",IDC_NEW,175,53,16,15,BS_ICON | BS_CENTER | + BS_VCENTER + PUSHBUTTON "&Delete",IDC_DEL,175,71,16,15,BS_ICON | BS_CENTER | + BS_VCENTER + ICON IDI_ADVANCED,IDC_STATIC,8,12,20,20 +END + +IDD_ENCRYPTADVANCED DIALOG DISCARDABLE 0, 0, 200, 115 +STYLE DS_CONTROL | WS_CHILD +FONT 8, "MS Sans Serif" +BEGIN + GROUPBOX "More Encryption Options: ",-1,0,0,199,114 + CONTROL "List1",IDC_IGNORE_LIST,"SysListView32",LVS_LIST | + LVS_SORTASCENDING | LVS_SHAREIMAGELISTS | LVS_EDITLABELS | + WS_BORDER | WS_TABSTOP,9,53,162,54 + LTEXT "&Ignore files with these extensions: ",-1,9,42,108,8 + PUSHBUTTON "New",IDC_NEW,175,53,16,15,BS_ICON | BS_CENTER | + BS_VCENTER + PUSHBUTTON "Del",IDC_DEL,175,71,16,15,BS_ICON | BS_CENTER | + BS_VCENTER + ICON IDI_PASSWORD,-1,8,13,20,20 + CONTROL "&Disable HomeARC password",IDC_DISABLEPASSWORD,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,45,14,105,10 + CONTROL "&Encrypt read-only/system files",IDC_ENCRYPTREADONLY, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,45,28,105,10 +END + +IDD_PROGRESSBACKUP DIALOG FIXED IMPURE 20, 20, 250, 84 +STYLE DS_MODALFRAME | DS_SETFOREGROUND | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Backing up files..." +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Animate1",IDC_ANIMATION,"SysAnimate32",ACS_TRANSPARENT | + ACS_AUTOPLAY | WS_TABSTOP,7,1,235,34 + CONTROL "",IDC_PROGRESS,"msctls_progress32",0x0,7,63,185,8 + DEFPUSHBUTTON "Cancel",IDCANCEL,197,63,45,14,NOT WS_TABSTOP + CONTROL "",IDC_MESSAGE1,"Static",SS_SIMPLE | SS_NOPREFIX,7,39, + 236,10 + CONTROL "",IDC_MESSAGE2,"Static",SS_SIMPLE | SS_NOPREFIX,7,50, + 236,10 +END + +IDD_PROGRESSENCRYPT DIALOG FIXED IMPURE 20, 20, 250, 84 +STYLE DS_MODALFRAME | DS_SETFOREGROUND | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Encrypting..." +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Animate1",IDC_ANIMATION,"SysAnimate32",ACS_TRANSPARENT | + ACS_AUTOPLAY | WS_TABSTOP,7,6,235,30 + CONTROL "",IDC_PROGRESS,"msctls_progress32",0x0,7,63,185,8 + DEFPUSHBUTTON "Cancel",IDCANCEL,197,63,45,14,NOT WS_TABSTOP + CONTROL "",IDC_MESSAGE1,"Static",SS_SIMPLE | SS_NOPREFIX,7,39, + 236,10 + CONTROL "",IDC_MESSAGE2,"Static",SS_SIMPLE | SS_NOPREFIX,7,50, + 236,10 +END + +IDD_PROGRESSTEMP DIALOG FIXED IMPURE 20, 20, 250, 84 +STYLE DS_MODALFRAME | DS_SETFOREGROUND | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Emptying Temp Folder..." +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Animate1",IDC_ANIMATION,"SysAnimate32",ACS_TRANSPARENT | + ACS_AUTOPLAY | WS_TABSTOP,7,1,235,34 + CONTROL "",IDC_PROGRESS,"msctls_progress32",0x0,7,63,185,8 + DEFPUSHBUTTON "Cancel",IDCANCEL,197,63,45,14,NOT WS_TABSTOP + CONTROL "",IDC_MESSAGE1,"Static",SS_SIMPLE | SS_NOPREFIX,7,39, + 236,10 + CONTROL "",IDC_MESSAGE2,"Static",SS_SIMPLE | SS_NOPREFIX,7,50, + 236,10 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "res\\Night Security Worker.ico" +IDI_DRIVE ICON DISCARDABLE "res\\ico00007.ico" +IDI_EXCLAM ICON DISCARDABLE "res\\ico00002.ico" +IDI_NORTONPROT ICON DISCARDABLE "res\\ico00001.ico" +IDI_NOTE ICON DISCARDABLE "res\\ico00003.ico" +IDI_RECYCLE ICON DISCARDABLE "res\\recycle.ico" +IDI_SCANDISK ICON DISCARDABLE "res\\ico00006.ico" +IDI_COPYFILES ICON DISCARDABLE "res\\icon1.ico" +IDI_BACKUP ICON DISCARDABLE "res\\icon2.ico" +IDI_ITEMS ICON DISCARDABLE "res\\items.ico" +IDI_NEW ICON DISCARDABLE "res\\ico00005.ico" +IDI_DEL ICON DISCARDABLE "res\\new1.ico" +IDI_ADVANCED ICON DISCARDABLE "res\\ico00004.ico" +IDI_PASSWORD ICON DISCARDABLE "res\\ico00008.ico" +IDI_WXPY ICON DISCARDABLE "res\\wxpy.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// + +IDR_DELETESWAPFILE REGISTRY DISCARDABLE "res\\DeleteSwapFile.rgs" +IDR_EMPTYRECYCLEBIN REGISTRY DISCARDABLE "EmptyRecycleBin.rgs" +IDR_EMPTYTEMPFOLDER REGISTRY DISCARDABLE "res\\EmptyTempFolder.rgs" +IDR_RUNSCANDISK REGISTRY DISCARDABLE "res\\RunScanDisk.rgs" +IDR_WIPEFREESPACE REGISTRY DISCARDABLE "res\\WipefreeSpace.rgs" +IDR_BACKUPSOURCEPROP REGISTRY DISCARDABLE "BackupSourceProp.rgs" +IDR_BACKUPDESTPROP REGISTRY DISCARDABLE "BackupDestProp.rgs" +IDR_BACKUPADVANCEDPROP REGISTRY DISCARDABLE "BackupAdvancedProp.rgs" +IDR_BACKUP REGISTRY DISCARDABLE "Backup.rgs" +IDR_ENCRYPT REGISTRY DISCARDABLE "Encrypt.rgs" +IDR_ENCRYPTSOURCEPROP REGISTRY DISCARDABLE "EncryptSourceProp.rgs" +IDR_ENCRYPTADVANCEDPROP REGISTRY DISCARDABLE "EncryptAdvancedProp.rgs" + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_EMPTYRECYCLE, DIALOG + BEGIN + VERTGUIDE, 33 + END + + IDD_RUNSCANDISK, DIALOG + BEGIN + VERTGUIDE, 33 + END + + IDD_TEMPWARNDLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 243 + TOPMARGIN, 7 + BOTTOMMARGIN, 77 + END + + IDD_SOURCE, DIALOG + BEGIN + VERTGUIDE, 192 + BOTTOMMARGIN, 114 + END + + IDD_BACKUPDEST, DIALOG + BEGIN + BOTTOMMARGIN, 105 + END + + IDD_PROGRESSBACKUP, DIALOG + BEGIN + VERTGUIDE, 7 + VERTGUIDE, 242 + END + + IDD_PROGRESSENCRYPT, DIALOG + BEGIN + VERTGUIDE, 7 + VERTGUIDE, 242 + END + + IDD_PROGRESSTEMP, DIALOG + BEGIN + VERTGUIDE, 7 + VERTGUIDE, 242 + HORZGUIDE, 40 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// AVI +// + +IDR_AVIBACKUP AVI DISCARDABLE "res\\161.avi" +IDR_AVIENCRYPT AVI DISCARDABLE "res\\enc.avi" +IDR_AVITEMP AVI DISCARDABLE "res\\temp.avi" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "NSCmpts" + IDS_TITLEBackupSourceProp "From" + IDS_NSHELPFILE "nightsec.hlp" + IDS_DOCSTRINGBackupSourceProp "Source to Backup From" + IDS_TITLEBackupDestProp "To" + IDS_RECYCLENAME "Empty Recycle Bin" + IDS_RECYCLEDESC "Empty your Recycle Bin and Norton Protected Files automatically. Any files you delete can easily be restored if they're in your Recycle Bin." + IDS_RECYCLEPARAM "r" + IDS_DOCSTRINGBackupDestProp "Backup Destination" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BACKUPNAME "Backup Data" + IDS_BACKUPDESC "Use this option to backup your important files to a disk, network or another location on your computer. " + IDS_TITLEBackupAdvancedProp "More" + IDS_DOCSTRINGBackupAdvancedProp "Advanced Options" + IDS_TEMPNAME "Empty Temp Folder" + IDS_TEMPDESC "Empties the folder where your Temp files are stored. Temp files are files programs make while running. These files can contain private information and should be deleted if a program leaves them laying around." + IDS_TEMPPARAM "t" + IDS_DELSWAP_BATCHTEXT "ECHO Deleting Swap File\r\nSET NSSWAP=%s\r\nIF NOT EXIST %%NSSWAP%%\\WIN386.SWP GOTO nsswaproot\r\nDEL %%NSSWAP%%\\WIN386.SWP\r\n:nsswaproot\r\nIF NOT EXIST C:\\WIN386.SWP GOTO nsswapend\r\nDEL C:\\WIN386.SWP\r\n:nsswapend\r\nECHO.\r\nECHO.\r\n\r\n" + IDS_DELSWAP_DESC "Deletes Windows Swap File. This file can contain sensitive information as Windows uses it for extra memory. " + IDS_DELSWAP_NAME "Delete Windows Swap File " + IDS_SCANDISK_NAME "Check hard disk for lost clusters" + IDS_SCANDISK_DESC "Checks for and deletes lost clusters. Lost clusters are areas on the hard disk that are marked as used but actually aren't. They can contain private information. " + IDS_SCANDISK_BATCHTEXT "SCANDISK /all %s %s /nosummary" + IDS_BACKUPPARAM "b" + IDS_ENCRYPTNAME "Encrypt Data" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ENCRYPTDESC "Use this option to encrypt all your data files. You'll need to have your XPY password. " + IDS_SCANDISK_NOSAVE "/nosave" + IDS_SCANDISK_AUTOFIX "/autofix" + IDS_WIPEFREE_NAME "Wipe free space" + IDS_WIPEFREE_DESC "Wipe the free space on your hard disk(s). When a file is deleted it isn't actually removed, only it's name is deleted from an index. This command overwrites your deleted files and is what the secure shutdown is all about." + IDS_WIPEFREE_BATCHTEXT "SET NSWIPER=%s\\NSWIPE.EXE\r\nIF EXIST %%NSWIPER%% GOTO nswipeokay\r\nECHO Couldn't find the Wiper Program! Make sure you installed Night Security correctly.\r\nPAUSE\r\nGOTO nswipeend\r\n:nswipeokay\r\n%%NSWIPER%% %s\r\n:nswipeend\r\nECHO.\r\nECHO.\r\n\r\n" + IDS_WIPEFREE_DRIVE "%s:" + IDS_ENCRYPTPARAM "x" + IDS_TITLERunScanDiskProps "Options" + IDS_DOCSTRINGRunScanDiskProps "Checks for and deletes lost clusters. " + IDS_TITLEEncryptSourceProp "Files" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_EMPTYCOMMAND "recycle" + IDS_NORTONCOMMAND "protected" + IDS_TITLERecycle "Options" + IDS_DOCSTRINGRecycle "Empty your Recycle Bin and Norton Protected Files automatically." + IDS_EMPTYTEMP_WARN "The folder %s doesn't look like a temp directory. Please check and make sure this is actually the folder where you keep temporary files. \n\nAre you sure you want to remove all the files inside it? " + IDS_TITLEWipeFreeSpace "Options" + IDS_DOCSTRINGWipeFreeSpace "Wipe the free space on your hard disk(s)." + IDS_BACKUP_NEWEXT "ext" + IDS_BACKUP_VALID_PATH "File or folder does not exist.\n\nClick the 'Add' button to add a folder, or try dragging a file into the list." + IDS_BACKUP_ERR_LIST "Couldn't list all the files in %F to backup. %e" + IDS_BACKUP_ERR_CREATE_DEST + "Couldn't create the backup destination folder %F. %e" + IDS_BACKUP_ERR_DEST "The backup destination path %F is invalid." + IDS_BACKUP_ERR_COPY "Couldn't backup the file %f. %e" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_BACKUP_ERR_DISKFULL "The disk in drive %s is full. Please insert another empty disk." + IDS_ENCRYPT_ERR_LIST "Couldn't list all the files in %F to encrypt. %e" + IDS_ENCRYPT_ERR_XPYINIT "Couldn't initialize XPY for encryption. Make sure you installed correctly. %e" + IDS_ENCRYPT_ERR "Couldn't encrypt file %f. %e" + IDS_TEMP_ERR_LIST "Couldn't list all the files in the temp folder %F. %e" + IDS_TEMP_ERR_DELETE "Couldn't delete the temp file %f. %e" + IDS_TITLEEncryptAdvancedProp "More" + IDS_DOCSTRINGEncryptAdvancedProp "Advanced Encryption Options" + IDS_BACKUP_ERR_FILE "Couldn't backup the file %F. %e" + IDS_ENCRYPT_ERR_XPY "Couldn't initialize XPY for encryption. Please make sure the Menu Extensions are installed correctly. \n\n" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +1 TYPELIB "NSCmpts.tlb" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/NSCmpts/NSCmptsps.def b/NSCmpts/NSCmptsps.def new file mode 100644 index 0000000..3f23af3 --- /dev/null +++ b/NSCmpts/NSCmptsps.def @@ -0,0 +1,11 @@ + +LIBRARY "NSCmptsPS" + +DESCRIPTION 'Proxy/Stub DLL' + +EXPORTS + DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + GetProxyDllInfo @3 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE diff --git a/NSCmpts/NSCmptsps.mk b/NSCmpts/NSCmptsps.mk new file mode 100644 index 0000000..9a85966 --- /dev/null +++ b/NSCmpts/NSCmptsps.mk @@ -0,0 +1,16 @@ + +NSCmptsps.dll: dlldata.obj NSCmpts_p.obj NSCmpts_i.obj + link /dll /out:NSCmptsps.dll /def:NSCmptsps.def /entry:DllMain dlldata.obj NSCmpts_p.obj NSCmpts_i.obj \ + kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \ + +.c.obj: + cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \ + $< + +clean: + @del NSCmptsps.dll + @del NSCmptsps.lib + @del NSCmptsps.exp + @del dlldata.obj + @del NSCmpts_p.obj + @del NSCmpts_i.obj diff --git a/NSCmpts/NSMessages.h b/NSCmpts/NSMessages.h new file mode 100644 index 0000000..f7a3930 --- /dev/null +++ b/NSCmpts/NSMessages.h @@ -0,0 +1,35 @@ +#ifndef __NS_MESSAGES_H__990929 +#define __NS_MESSAGES_H__990929 + + +struct NS_ERROR_DATA +{ + HRESULT hRes; + LPCTSTR szDesc; + LPARAM lParam; +}; + +struct NS_UPDATE_DATA +{ + LPCTSTR szMessage1; + LPCTSTR szMessage2; + long lCur; + long lTot; +}; + +/*struct NS_UPDATE_DATA +{ + LPCTSTR szMessage; + long lCur; + long lTot; +};*/ + +// WPARAM: NULL +// LPARAM: address of NS_ERROR_DATA +#define NSM_ERROR (WM_APP + 10) + +// WPARAM: NULL +// LPARAM: address of NS_UPDATE_DATA +#define NSM_UPDATE (NSM_ERROR + 1) + +#endif //__NS_MESSAGES_H__990929 \ No newline at end of file diff --git a/NSCmpts/NSSettings.h b/NSCmpts/NSSettings.h new file mode 100644 index 0000000..ab90341 --- /dev/null +++ b/NSCmpts/NSSettings.h @@ -0,0 +1,32 @@ +// NSSettings.h: interface for the CSettings class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_NSSETTINGS_H__4D76E505_722D_11D3_BF84_0020182B97FC__INCLUDED_) +#define AFX_NSSETTINGS_H__4D76E505_722D_11D3_BF84_0020182B97FC__INCLUDED_ + +#include +#include "../Common/CmptData.h" + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +class CNightSecSettings : + public settings, + public CPropertyBag +{ +public: + virtual HRESULT erase(const string& sKeyName) + { return DeleteProperty(sKeyName); }; + virtual HRESULT write_string(const string& sKeyName, const string& sValue) + { return WriteString(sKeyName, sValue); }; + virtual HRESULT write_int(const string& sKeyName, int nValue) + { return WriteInt(sKeyName, nValue); }; + virtual string get_string(const string& sKeyName, const string& sDefault) const + { return GetString(sKeyName, sDefault); }; + virtual int get_int(const string& sKeyName, int nDefault) const + { return GetInt(sKeyName, nDefault); } +}; + +#endif // !defined(AFX_NSSETTINGS_H__4D76E505_722D_11D3_BF84_0020182B97FC__INCLUDED_) diff --git a/NSCmpts/NightSecError.cpp b/NSCmpts/NightSecError.cpp new file mode 100644 index 0000000..252c19a --- /dev/null +++ b/NSCmpts/NightSecError.cpp @@ -0,0 +1,176 @@ +// NightSecError.cpp : Implementation of CNSCmptsApp and DLL registration. + +#include "stdafx.h" +#include "NSCmpts.h" +#include "NightSecError.h" + +///////////////////////////////////////////////////////////////////////////// +// Set the current error to +void CBaseErrorImpl::SetError(const string& sDesc, HRESULT hRes, + LPCTSTR szHelpFile /*= _T("")*/, long lHelpContext /*= 0*/) +{ + // Initialize Other Stuff + m_hRes = hRes; + m_bsDescription = sDesc; + m_bsHelpFile = szHelpFile; + m_lHelpContext = lHelpContext; +} + +/*void CActionErrorImpl::SetError(CAction* pAction, const string& sDesc, HRESULT hRes, + LPCTSTR szHelpFile, long lHelpContext) +{ + // Attach to Action + m_pAction = pAction; + pAction->addref(); + + CBaseErrorImpl::SetError(sDesc, hRes, szHelpFile, lHelpContext); +} +*/ + +void CActionErrorImpl::Attach(CAction* pAction) +{ + // Attach to Action + ASSERT(pAction); + m_pAction = pAction; + pAction->addref(); +} + +////////////////////////////////////////////////////////////////////////// +// Fix the error + +STDMETHODIMP CActionErrorImpl::Fix() +{ + // Sanity Checks + ASSERT(m_pAction); + ASSERT(m_pAction->IsFixable(m_hRes)); + + if(!m_pAction) + return E_UNEXPECTED; + if(!m_pAction->IsFixable(m_hRes)) + return E_FAIL; + + // Fix it + try + { + m_pAction->Fix(m_hRes); + + // Clear error information + m_bsDescription = _T("Fixed Successfully"); + m_hRes = S_OK; + m_lHelpContext = 0; + } + catch(CActionError& err) + { + // Set new error information + m_hRes = err.m_hRes; + m_bsDescription = err.m_sDesc; + m_lHelpContext = 0; + } + + return m_hRes; +} + + +/////////////////////////////////////////////////////////////////// +// Check if fixable + +STDMETHODIMP CActionErrorImpl::get_Fixable(/*[out, retval]*/ BOOL* pbRet) +{ + ASSERT(m_pAction); + + if(!m_pAction) + return E_UNEXPECTED; + + *pbRet = m_pAction->IsFixable(m_hRes) ? TRUE : FALSE; + + return S_OK; +} + +//////////////////////////////////////////////////////////////////// +// Retry the action + +STDMETHODIMP CActionErrorImpl::Retry() +{ + // Sanity Checks + + ASSERT(m_pAction); + ASSERT(m_pAction->IsRetryable()); + + if(!m_pAction) + return E_UNEXPECTED; + if(!m_pAction->IsRetryable()) + return E_FAIL; + + // Do it Again + try + { + m_pAction->Do(NULL, NULL); + + // Clear error Information + m_hRes = S_OK; + m_bsDescription = _T("Completed Successfully"); + m_lHelpContext = 0; + } + catch(CActionError& err) + { + // Set New Error Information + m_hRes = err.m_hRes; + m_bsDescription = err.m_sDesc; + m_lHelpContext = 0; + } + + return m_hRes; + +} + + +///////////////////////////////////////////////////////////////////// +// Check if retryable + +STDMETHODIMP CActionErrorImpl::get_Retryable(/*[out, retval]*/ BOOL* pbRet) +{ + ASSERT(m_pAction); + + if(!m_pAction) + return E_UNEXPECTED; + + *pbRet = m_pAction->IsRetryable() ? TRUE : FALSE; + + return S_OK; +} + +void CNightSecErrorImpl::Attach(ISecureShutdownWin* pShutdown) +{ + // Attach to Secure Shutdown + ASSERT(pShutdown); + m_pShutdown = pShutdown; + m_pShutdown->AddRef(); +} + + +//////////////////////////////////////////////////////////////////// +// Retry the action + +STDMETHODIMP CNightSecErrorImpl::Retry() +{ + // Sanity Checks + ASSERT(m_pShutdown); + + if(!m_pShutdown) + return E_UNEXPECTED; + + + // Do it Again + HRESULT hr = m_pShutdown->DoShutdown(NULL, 0); + + if(SUCCEEDED(hr)) + { + // Clear error Information + m_hRes = S_OK; + m_bsDescription = _T("Completed Successfully"); + m_lHelpContext = 0; + } + // Otherwise it should have filled us up with new error info + + return m_hRes; +} diff --git a/NSCmpts/NightSecError.h b/NSCmpts/NightSecError.h new file mode 100644 index 0000000..164c5fb --- /dev/null +++ b/NSCmpts/NightSecError.h @@ -0,0 +1,134 @@ +// NightSecError.h: Definition of the CNightSecError class +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_NIGHTSECERROR_H__F6662FF3_94AB_11D3_BFC4_0020182B97FC__INCLUDED_) +#define AFX_NIGHTSECERROR_H__F6662FF3_94AB_11D3_BFC4_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "resource.h" // main symbols +#include "../common/Defines.h" +#include "../common/interfaces.h" + +#include "ActionEngine.h" + +///////////////////////////////////////////////////////////////////////////// +// CXXXXErrorImpl: A COM object that gets added to INightSecErrorLog on +// the host + +class CBaseErrorImpl : + public INightSecError +{ +public: + CBaseErrorImpl() + : m_lHelpContext(0) {}; + + // Set the error codes for this object + void SetError(const string& sDesc, HRESULT hRes, + LPCTSTR szHelpFile = _T(""), long lHelpContext = 0); + void SetError(const string& sDesc, HRESULT hRes, long lHelpContext) + { SetError(sDesc, hRes, NS_HELP_FILE, lHelpContext); } + +// INightSecError +public: + STDMETHOD(get_Err)(/*[out, retval]*/ HRESULT* phRet) + { *phRet = m_hRes; return S_OK; } + STDMETHOD(get_Description)(/*[out, retval]*/ BSTR* pbsRet) + { *pbsRet = m_bsDescription.Copy(); return S_OK; } + STDMETHOD(get_HelpFile)(/*[out, retval]*/ BSTR* pbsRet) + { *pbsRet = m_bsHelpFile.Copy(); return S_OK; } + STDMETHOD(get_HelpContext)(/*[out, retval]*/ long* plRet) + { *plRet = m_lHelpContext; return S_OK; } + +protected: + CComBSTR m_bsDescription; // Description of Error + CComBSTR m_bsHelpFile; // Helpfile for Error + long m_lHelpContext; // Location in Help File + HRESULT m_hRes; // Original HRESULT +}; + +//////////////////////////////////////////////////////////////// +// This is a special case CBaseErrorImpl that wraps a +// CAction + +class CActionErrorImpl : + public CComObjectRoot, + public CBaseErrorImpl, + public INightSecErrorFix +{ + +// Construction +public: + CActionErrorImpl() + { m_pAction = NULL; }; + ~CActionErrorImpl() + { m_pAction->release(); } + + // Attach to this action (addrefs) + void Attach(CAction* pAction); + +// COM MAP +BEGIN_COM_MAP(CActionErrorImpl) + COM_INTERFACE_ENTRY(INightSecError) + COM_INTERFACE_ENTRY(INightSecErrorFix) +END_COM_MAP() + +DECLARE_NOT_AGGREGATABLE(CActionErrorImpl) + +// INightSecErrorFix +public: + STDMETHOD(Fix)(); + STDMETHOD(get_Fixable)(/*[out, retval]*/ BOOL* pbRet); + STDMETHOD(Retry)(); + STDMETHOD(get_Retryable)(/*[out, retval]*/ BOOL* pbRet); + +protected: + CAction* m_pAction; // Action that caused the error +}; + +/////////////////////////////////////////////////////////// +// Special Case CBaseErrorIpml that wraps a +// ISecureShutdownWin Object + +class CNightSecErrorImpl : + public CComObjectRoot, + public CBaseErrorImpl, + public INightSecErrorFix +{ + +// Construction +public: + CNightSecErrorImpl() + { m_pShutdown = NULL; }; + ~CNightSecErrorImpl() + { if(m_pShutdown) m_pShutdown->Release(); } + + // Attach to object (addrefs) + void Attach(ISecureShutdownWin* pShutdown); + +// COM MAP +BEGIN_COM_MAP(CActionErrorImpl) + COM_INTERFACE_ENTRY(INightSecError) + COM_INTERFACE_ENTRY(INightSecErrorFix) +END_COM_MAP() + +DECLARE_NOT_AGGREGATABLE(CActionErrorImpl) + +// INightSecErrorFix +public: + STDMETHOD(Fix)() + { return E_FAIL; }; + STDMETHOD(get_Fixable)(/*[out, retval]*/ BOOL* pbRet) + { *pbRet = FALSE; return S_OK; }; + STDMETHOD(Retry)(); + STDMETHOD(get_Retryable)(/*[out, retval]*/ BOOL* pbRet) + { *pbRet = TRUE; return S_OK; }; + +protected: + ISecureShutdownWin* m_pShutdown; // Object that caused the error +}; + +#endif // !defined(AFX_NIGHTSECERROR_H__F6662FF3_94AB_11D3_BFC4_0020182B97FC__INCLUDED_) diff --git a/NSCmpts/ProgressDlg.cpp b/NSCmpts/ProgressDlg.cpp new file mode 100644 index 0000000..9f1ae5c --- /dev/null +++ b/NSCmpts/ProgressDlg.cpp @@ -0,0 +1,151 @@ +// ProgressDlg.cpp : Implementation of CProgressDlg +#include "stdafx.h" +#include "ProgressDlg.h" + +///////////////////////////////////////////////////////////////////////////// +// CProgressDlg + +CActionProgressDlg::CActionProgressDlg(IUnknown* pSite, UINT nIDD) + : CDialogImplEx(nIDD) +{ + m_pUnk = pSite; + m_bCancel = false; +} + +CActionProgressDlg::~CActionProgressDlg() +{ + if(IsWindow()) + DestroyWindow(); + + // Release any pointers we're holding on to + if(m_pUnk) + m_pUnk->Release(); + if(m_pErrorLog) + m_pErrorLog->Release(); +} + +LRESULT CActionProgressDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Used later + m_ctlProgress = GetDlgItem(IDC_PROGRESS); + + CenterWindow(GetDesktopWindow()); + + // This sets up the Event Mechanism + if(m_pUnk != NULL) + DispEventAdvise(m_pUnk); // Pointer from IObjectWithSite + + return 1; // Let the system set the focus +} + +LRESULT CActionProgressDlg::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + + // Release any pointers we're holding on to + if(m_pUnk) + { + // Drop the Event Stuff + DispEventUnadvise(m_pUnk); // Pointer from IObjectWithSite + + m_pUnk->Release(); + } + if(m_pErrorLog) + m_pErrorLog->Release(); + + return 0; +} + +// Update Message from Action Engine +LRESULT CActionProgressDlg::OnUpdateFile(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + NS_UPDATE_DATA* pData = (NS_UPDATE_DATA*)lParam; + + // If there 0 in the total then clear + if(pData->lTot == 0) + { + m_ctlProgress.SetRange(0, 1); + m_ctlProgress.SetPos(0); + } + else + { + // If total != -1 then change range + if(pData->lTot > 0) + m_ctlProgress.SetRange(0, pData->lTot); + + // If Current changed (!= -1) then set state + if(pData->lCur >= 0) + m_ctlProgress.SetPos(pData->lCur); + } + + // If there's a message display it + if(pData->szMessage1) + ::SetWindowText(GetDlgItem(IDC_MESSAGE1), pData->szMessage1); + if(pData->szMessage2) + ::SetWindowText(GetDlgItem(IDC_MESSAGE2), pData->szMessage2); + + // If m_bCancel is set then this cancels the CActionEngine + return m_bCancel ? 0 : 1; +} + +// Called in response to the button being pressed, window being closed, or +// event being fired +LRESULT CActionProgressDlg::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + // This gets checked when the Engine sends and Update (OnUpdateFile) + m_bCancel = true; + + // We're working on cancelling so reflect that in UI + ::SetWindowText(GetDlgItem(IDCANCEL), _T("Cancelling...")); + ::EnableWindow(GetDlgItem(IDCANCEL), FALSE); + return 0; +} + +// Called when event Fired +STDMETHODIMP CActionProgressDlg::OnCancelEv() +{ + // Just call normal cancel event + BOOL bHandled = TRUE; + OnCancel(0, 0, NULL, bHandled); + + return S_OK; +}; + +// Error Message from CActionEngine +LRESULT CActionProgressDlg::OnError(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // See if we can get an INightSecErrorLog pointer that IObjectWithSite + // gave us + if(m_pErrorLog == NULL) + m_pErrorLog = m_pUnk; + + if(m_pErrorLog == NULL) + return 0; + + // Create a new NightSecError object + CComObject* pError = NULL; + HRESULT hr = CComObject::CreateInstance(&pError); + + if(FAILED(hr)) + return 0; + + // Set info on the Error Object + NS_ERROR_DATA* pData = (NS_ERROR_DATA*)lParam; + pError->SetError(pData->szDesc, pData->hRes); + pError->Attach((CAction*)pData->lParam); + + // Send it to the INightSecErrorLog + m_pErrorLog->AddError(pError->GetUnknown()); + + return 0; +} + +// Starts the AVI file playing from resources +bool CActionProgressDlg::PlayAmination(UINT nID) +{ + ASSERT(IsWindow()); + ASSERT(GetDlgItem(IDC_ANIMATION)); + + // Dialog box should have AutoPlay enabled + return ((BOOL)::SendMessage(GetDlgItem(IDC_ANIMATION), ACM_OPEN, 0, (LPARAM)MAKEINTRESOURCE(nID))) ? true : false; +} + diff --git a/NSCmpts/ProgressDlg.h b/NSCmpts/ProgressDlg.h new file mode 100644 index 0000000..b8bc7d6 --- /dev/null +++ b/NSCmpts/ProgressDlg.h @@ -0,0 +1,73 @@ +// ProgressDlg.h : Declaration of the CActionProgressDlg + +#ifndef __ProgressDLG_H_ +#define __ProgressDLG_H_ + +#include "resource.h" // main symbols +#include +#include +#include "NSMessages.h" +#include "../common/events.h" +#include "../common/interfaces.h" +#include "NightSecError.h" + +///////////////////////////////////////////////////////////////////////////// +// CActionProgressDlg +// This is the update window the Action Engine +// Handles receiving of the error and update messages +// Also catches events from host program + +class CActionProgressDlg : + public CDialogImplEx, + public IDispEventImpl<0, CActionProgressDlg, &DIID_DShutdownEvents, &LIBID_NightSecShutdown, 2, 5> +{ +public: + // Construction + CActionProgressDlg(IUnknown* pSite, UINT nIDD); + ~CActionProgressDlg(); + +// Catch Cancel Events +BEGIN_SINK_MAP(CActionProgressDlg) + SINK_ENTRY_EX(0, DIID_DShutdownEvents, 1, OnCancelEv) +END_SINK_MAP() + +// Message Map +BEGIN_MSG_MAP(CActionProgressDlg) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + MESSAGE_HANDLER(NSM_UPDATE, OnUpdateFile) + MESSAGE_HANDLER(NSM_ERROR, OnError) + COMMAND_ID_HANDLER(IDCANCEL, OnCancel) +END_MSG_MAP() + +// Handler prototypes: +// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); +// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); +// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + + // Message from Action Engine + LRESULT OnUpdateFile(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + + // Called in response to the button being pressed, window being closed, or + // event being fired + LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + + // Called when event Fired + STDMETHOD(OnCancelEv)(); + + // Message from CActionEngine + LRESULT OnError(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + bool PlayAmination(UINT nID); + + +protected: + bool m_bCancel; // True when cancelled, but not stopped + CProgressBarCtrl m_ctlProgress; // Progress Bar + IUnknownPtr m_pUnk; // Pointer from IObjectWithSite + INightSecErrorLogPtr m_pErrorLog; // ErrorLog on same object as m_pUnk +}; + +#endif //__ProgressDLG_H_ diff --git a/NSCmpts/PromptClose.cpp b/NSCmpts/PromptClose.cpp new file mode 100644 index 0000000..8871415 --- /dev/null +++ b/NSCmpts/PromptClose.cpp @@ -0,0 +1,11 @@ +// PromptClose.cpp: implementation of the CPromptClose class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "PromptClose.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + diff --git a/NSCmpts/PromptClose.h b/NSCmpts/PromptClose.h new file mode 100644 index 0000000..a10c058 --- /dev/null +++ b/NSCmpts/PromptClose.h @@ -0,0 +1,51 @@ +// PromptClose.h: interface for the CPromptClose class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_PROMPTCLOSE_H__5BB78C71_C041_11D3_8306_005056C1D336__INCLUDED_) +#define AFX_PROMPTCLOSE_H__5BB78C71_C041_11D3_8306_005056C1D336__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include + +template +class CPromptCloseT : public CWindowImplBaseT< TBase > +{ +public: + CPromptCloseT() + { + m_nIDRet = IDCANCEL; + } + + bool CloseNext(UINT nRet) + { + m_nIDRet = nRet; + _Module.AddCreateWndData(&m_thunk.cd, this); + return HOOK_AND_SUBCLASS_NEXT() ? true : false; + } + + +BEGIN_MSG_MAP(CPromptCloseT) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) +END_MSG_MAP() + + DECLARE_HOOK_AND_SUBCLASS(CPromptCloseT) + + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) + { + EndDialog(m_hWnd, m_nIDRet); + UnsubclassWindow(); + // Hide this Dialog + return TRUE; + } + +protected: + UINT m_nIDRet; +}; + +typedef CPromptCloseT CPromptClose; + +#endif // !defined(AFX_PROMPTCLOSE_H__5BB78C71_C041_11D3_8306_005056C1D336__INCLUDED_) diff --git a/NSCmpts/RunScanDisk.cpp b/NSCmpts/RunScanDisk.cpp new file mode 100644 index 0000000..60a3eb7 --- /dev/null +++ b/NSCmpts/RunScanDisk.cpp @@ -0,0 +1,140 @@ +// RunScanDisk.cpp : Implementation of CRunScanDisk +#include "stdafx.h" +#include "NSCmpts.h" +#include "RunScanDisk.h" +#include "../Common/Defines.h" +#include + +///////////////////////////////////////////////////////////////////////////// +// CRunScanDisk + +STDMETHODIMP CRunScanDisk::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_ISecureShutdownDOS, + }; + for (int i=0;i= 0x80000000); + + + // Format and return string with options + string sParamNoSave; + string sParamAutoFix; + + if(m_Data.GetInt(_T("Auto Fix"), true)) + { + sParamAutoFix.load_string(IDS_SCANDISK_AUTOFIX); + sParamNoSave.load_string(IDS_SCANDISK_NOSAVE); + + if(!m_Data.GetInt(_T("Save Clusters"), false)) + sParamNoSave = _T(""); + + } + + string sRetVal; + sRetVal.format(IDS_SCANDISK_BATCHTEXT, (LPCTSTR)sParamAutoFix, (LPCTSTR)sParamNoSave); + + CComBSTR bsRet(sRetVal); + *psText = bsRet.Detach(); + + return S_OK; +} + +//////////////////////////////////////////////////////// +// Returns Info about our object + +STDMETHODIMP CRunScanDisk::get_Info(NightSecInfo nsItem, VARIANT* pvVal) +{ + ::VariantClear(pvVal); + + CComBSTR bsRetVal; + switch(nsItem) + { + case nsName: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_SCANDISK_NAME); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + case nsHelpText: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_SCANDISK_DESC); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + } + + ::VariantClear(pvVal); + return S_FALSE; +} + +//////////////////////////////////////////////////////// +// Called to initialize our data object + +STDMETHODIMP CRunScanDisk::SetData(IUnknown* pUnk) +{ + return m_Data.Initialize(pUnk); +} +/////////////////////////////////////////////////////////////////////////////// +// Property Page Stuff + +// Updates all controls +bool CRunScanDisk::UpdateAutoFix() +{ + bool bEnable = IsDlgButtonChecked(IDC_AUTOFIX) ? true : false; + ::EnableWindow(GetDlgItem(IDC_SAVE), bEnable); + ::EnableWindow(GetDlgItem(IDC_NOSAVE), bEnable); + + return bEnable; +} + +LRESULT CRunScanDisk::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Load Auto Fix State + CheckDlgButton(IDC_AUTOFIX, m_Data.GetInt(_T("Auto Fix"), true)); + + // Load Save Clusters State + bool bSave = m_Data.GetInt(_T("Save Clusters"), false) ? true : false; + + CheckDlgButton(IDC_SAVE, bSave); + CheckDlgButton(IDC_NOSAVE, !bSave); + + UpdateAutoFix(); + + return FALSE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +// Used to enable/disable controls +LRESULT CRunScanDisk::OnAutoFix(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + UpdateAutoFix(); + SetDirty(true); + + return 0; +} diff --git a/NSCmpts/RunScanDisk.h b/NSCmpts/RunScanDisk.h new file mode 100644 index 0000000..79d261a --- /dev/null +++ b/NSCmpts/RunScanDisk.h @@ -0,0 +1,107 @@ +// RunScanDisk.h : Declaration of the CRunScanDisk + +#ifndef __RUNSCANDISK_H_ +#define __RUNSCANDISK_H_ + +#include "resource.h" // main symbols +#include "..\Common\CmptData.h" +#include + +///////////////////////////////////////////////////////////////////////////// +// CRunScanDisk +class ATL_NO_VTABLE CRunScanDisk : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl, + public IPropertyPageImpl, + public CDialogImplEx, + public CContextHelp +// public CDialogImpl + +{ +// Construction +public: + CRunScanDisk() : CDialogImplEx(IDD) + { + m_dwTitleID = IDS_TITLERunScanDiskProps; + m_dwHelpFileID = IDS_NSHELPFILE; + m_dwDocStringID = IDS_DOCSTRINGRunScanDiskProps; + } + ~CRunScanDisk() + { ATLTRACE(_T("Destroying RunScanDisk\n")); } + HRESULT FinalConstruct(); + + +DECLARE_REGISTRY_RESOURCEID(IDR_RUNSCANDISK) + +BEGIN_COM_MAP(CRunScanDisk) + COM_INTERFACE_ENTRY(ISecureShutdownDOS) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) + COM_INTERFACE_ENTRY_IMPL(IPropertyPage) +END_COM_MAP() + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// ISecureShutdownDOS +public: + STDMETHOD(get_Info)(/*[in]*/ NightSecInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + STDMETHOD(GetBatchText)(/*[out, retval]*/ BSTR* psText); + STDMETHOD(SetData)(/*[in]*/ IUnknown* pUnk); + +// Data +protected: + CPropertyBag m_Data; + +/////////////////////////////////////////////////////////////////// +// Property Sheet Stuff + +public: + enum {IDD = IDD_RUNSCANDISK}; + +BEGIN_MSG_MAP(CRunScanDisk) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + COMMAND_HANDLER(IDC_AUTOFIX, BN_CLICKED, OnAutoFix) + CHAIN_MSG_MAP(IPropertyPageImpl) + CHAIN_MSG_MAP(CContextHelp) +END_MSG_MAP() + +BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(IDC_AUTOFIX, 4021) + HELP_ID(IDC_SAVE, 4023) + HELP_ID(IDC_NOSAVE, 4022) +END_HELP_MAP + +// Property Sheet Messages + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnAutoFix(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + + + STDMETHOD(Apply)(void) + { + ATLTRACE(_T("CClearInetCache::Apply\n")); + + HRESULT hr; + HRESULT hrRet = S_OK; + + // Save AutoFix State + hr = m_Data.WriteInt(_T("Auto Fix"), IsDlgButtonChecked(IDC_AUTOFIX)); + if(FAILED(hr)) hrRet = hr; + + // Save Cluster State + hr = m_Data.WriteInt(_T("Save Clusters"), IsDlgButtonChecked(IDC_SAVE)); + if(FAILED(hr)) hrRet = hr; + + m_bDirty = FALSE; + return hrRet; + + } + +protected: + bool UpdateAutoFix(); + +}; + +#endif //__RUNSCANDISK_H_ diff --git a/NSCmpts/SourceProp.cpp b/NSCmpts/SourceProp.cpp new file mode 100644 index 0000000..40cb0bf --- /dev/null +++ b/NSCmpts/SourceProp.cpp @@ -0,0 +1,306 @@ +// SourceProp.cpp : Implementation of CSourceProp +#include "stdafx.h" +#include "NSCmpts.h" +#include "SourceProp.h" +#include + +///////////////////////////////////////////////////////////////////////////// +// CSourceProp + +LRESULT CSourceProp::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Load the System Image list + m_imgList.Load(true); + + // Set the List + m_ctlList = GetDlgItem(IDC_SOURCE_LIST); + m_ctlList.SetImageList(m_imgList, LVSIL_SMALL); + + // We need at least one bogus column since we're using + // report view + LV_COLUMN lvC; // list view column structure + + // Now initialize the columns you will need. + // Initialize the LV_COLUMN structure. + // The mask specifies that the fmt, width, pszText, and subitem members + // of the structure are valid. + lvC.mask = LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM; + lvC.fmt = LVCFMT_LEFT; // left-align column + lvC.cx = 200; // width of column in pixels + lvC.iSubItem = 0; + + if(m_ctlList.InsertColumn(0, &lvC) == -1) + return true; + + bHandled = true; + return TRUE; +} + +LRESULT CSourceProp::OnChange(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + // Make sure the column is the width of control + RECT rect; + m_ctlList.GetClientRect(&rect); + m_ctlList.SetColumnWidth(0, rect.right); + + return 0; +} + + +LRESULT CSourceProp::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + UpdateData(true); + return 0; +} + +LRESULT CSourceProp::OnShowWindow(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + HWND hwndParent = GetParent(); + + // Sets the DropTarget for the Parent Window and removes + // it when hidden. For some reason if we set it for the + // property page itself it doesn't work. + // + // Since there could be multiple property pages fiddling + // with the parent windows Drag Drop Status, we use a + // window property to keep track of the current owner. + + if(wParam) + { + IDropTarget* pTarget = NULL; + QueryInterface(IID_IDropTarget, (void**)&pTarget); + ASSERT(pTarget); + + // Not mission critical (used only for drag drop) + RevokeDragDrop(hwndParent); + HRESULT hr = RegisterDragDrop(hwndParent, pTarget); + + // Register Drag Drop Addrefs + pTarget->Release(); + + // Set the window property to a pointer to us + if(SUCCEEDED(hr)) + SetProp(hwndParent, _T("DropTarget"), (HANDLE)this); + } + else + { + // If window property is pointer to us then ... + if((CSourceProp*)GetProp(hwndParent, _T("DropTarget")) == this) + { + // Remove Drag Drop + RevokeDragDrop(hwndParent); + RemoveProp(hwndParent, _T("DropTarget")); + } + } + + return 0; +} + +LRESULT CSourceProp::OnEndLabelEdit(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + LVITEM* pItem = &((NMLVDISPINFO*)pnmh)->item; + + // Only Change if there is Text + if(pItem->pszText == NULL) + return 0; + + file_path path(pItem->pszText); + if(path.exists()) + { + pItem->iImage = m_imgList.GetFileIndex(pItem->pszText); + // WINBUG: Windows 95 (original version) doesn't set LVIF_TEXT + // have to set it here. + pItem->mask |= (LVIF_IMAGE | LVIF_TEXT); + + // Set Item text + m_ctlList.SetItem(pItem); + } + else + { + string sTemp; + sTemp.load_string(IDS_BACKUP_VALID_PATH); + + MessageBox(sTemp, _T("Night Security"), MB_OK | MB_ICONWARNING); + } + + return 0; +} + +LRESULT CSourceProp::OnListSetFocus(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + // Disclaimer: This is a kludge fix + // SysListView32 wouldn't redraw itself when it had focus + // and app was activated + m_ctlList.Invalidate(); + m_ctlList.RedrawWindow(NULL, NULL, RDW_FRAME | RDW_INVALIDATE); + return 0; +} + +LRESULT CSourceProp::OnKeyDown(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + NMLVKEYDOWN* pLVKeyDow = (NMLVKEYDOWN*)pnmh; + + // if F2 then Edit + if(pLVKeyDow->wVKey == VK_F2) + { + m_ctlList.SetFocus(); // Needs to have the Focus in order to edit + m_ctlList.EditLabel(m_ctlList.GetNextItem(-1, LVNI_ALL | LVNI_FOCUSED)); + } + + // If Delete then call Delete Handler + if(pLVKeyDow->wVKey == VK_DELETE) + { + OnRemove(0, 0, 0, bHandled); + } + + return 0; +} + +LRESULT CSourceProp::OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + int iItem = -1; + + // Loop through selected items + while((iItem = m_ctlList.GetNextItem(-1, LVNI_ALL | LVNI_SELECTED)) != -1) + // Take it out of List Box + m_ctlList.DeleteItem(iItem); + + return 0; +} + +LRESULT CSourceProp::OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + LPMALLOC pMalloc; + if(FAILED(::SHGetMalloc(&pMalloc))) + return 0; + + TCHAR buff[MAX_PATH]; + BROWSEINFO bi; + bi.hwndOwner = m_hWnd; + bi.pidlRoot = NULL; + bi.pszDisplayName = buff; + bi.lpszTitle = _T("Choose a folder to add."); + bi.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS; + bi.lpfn = NULL; + bi.lParam = 0; + + LPITEMIDLIST pidl = SHBrowseForFolder(&bi); + + if(pidl == NULL) + return 0; + + if(::SHGetPathFromIDList(pidl, buff)) + AddFile(buff); + + pMalloc->Free(pidl); + pMalloc->Release(); + + bHandled = true; + return 0; +} + +bool CSourceProp::AddFile(string sFileName) +{ + int nIndex = m_imgList.GetFileIndex(sFileName); + + LVITEM lv; + lv.mask = LVIF_TEXT | LVIF_IMAGE; + lv.iItem = 0; + lv.iSubItem = 0; + lv.pszText = sFileName.get_buffer(sFileName.size() + 1); + lv.iImage = nIndex; + + return ListView_InsertItem(GetDlgItem(IDC_SOURCE_LIST), &lv) >= 0; +} + +STDMETHODIMP CSourceProp::DragEnter(IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect) +{ + HRESULT hr = E_FAIL; + FORMATETC fmte = + { + CF_HDROP, // use CF_HDROP format + NULL, // no specific device required + DVASPECT_CONTENT, // embedded object + -1, // must be -1 for DVASPECT_CONTENT + TYMED_HGLOBAL // how to transfer data + }; + STGMEDIUM medium; + + // No data object + if (pDataObject == NULL) + return E_FAIL; + + // Use the given IDataObject to get a list of filenames (CF_HDROP). + hr = pDataObject->GetData(&fmte, &medium); + + if(SUCCEEDED(hr)) + { + ReleaseStgMedium(&medium); + *pdwEffect = DROPEFFECT_LINK; + } + else + *pdwEffect = DROPEFFECT_NONE; + + return hr; +} + +STDMETHODIMP CSourceProp::Drop(IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect) +{ + HRESULT hr = E_FAIL; + FORMATETC fmte = + { + CF_HDROP, // use CF_HDROP format + NULL, // no specific device required + DVASPECT_CONTENT, // embedded object + -1, // must be -1 for DVASPECT_CONTENT + TYMED_HGLOBAL // how to transfer data + }; + STGMEDIUM medium; + + // No data object + if(!pDataObject) + return hr; + + // Use the given IDataObject to get a list of filenames (CF_HDROP). + hr = pDataObject->GetData(&fmte, &medium); + + if(FAILED(hr)) + return hr; + + // Get Number of Files + int nFiles = DragQueryFile((HDROP)medium.hGlobal, (UINT) -1, NULL, 0); + + string sFile; + int nTotLength = 0; + + // Okay now Circle through and get all the files + for (int nCnt = 0; nCnt < nFiles; nCnt++) + { + if(DragQueryFile((HDROP) medium.hGlobal, nCnt, sFile.get_buffer(MAX_PATH), MAX_PATH)) + AddFile(sFile); + } + + // Release the data. + ReleaseStgMedium(&medium); + + return hr; +} + +void CSourceProp::UpdateData(bool bSave) +{ + if(bSave) + { + m_aPaths.clear(); + TCHAR buff[MAX_PATH]; + int nItem = 0; + while(m_ctlList.GetItemText(nItem++, 0, buff, MAX_PATH)) + m_aPaths.push_back(buff); + } + else + { + string_array::const_iterator iter = m_aPaths.begin(); + for(; iter != m_aPaths.end(); iter++) + AddFile(*iter); + } + +} diff --git a/NSCmpts/SourceProp.h b/NSCmpts/SourceProp.h new file mode 100644 index 0000000..9e3aa46 --- /dev/null +++ b/NSCmpts/SourceProp.h @@ -0,0 +1,80 @@ +// SourceProp.h : Declaration of the CSourceProp + +#ifndef __SOURCEPROP_H_ +#define __SOURCEPROP_H_ + +#include "resource.h" // main symbols + +#include "../common/cmptdata.h" + +#include +#include +#include +#include +#include + + +///////////////////////////////////////////////////////////////////////////// +// CSourceProp: Base functionality for Night Sec File List Property Pages +// With dragdrop, browse etc... + +class ATL_NO_VTABLE CSourceProp : +// public CDialogImpl, + public CDialogImplEx, + public IDropTarget +{ +public: + CSourceProp() : CDialogImplEx(IDD_SOURCE) {} + + enum { IDD = IDD_SOURCE }; + +BEGIN_MSG_MAP(CSourceProp) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + MESSAGE_HANDLER(WM_SHOWWINDOW, OnShowWindow) + NOTIFY_HANDLER(IDC_SOURCE_LIST, LVN_ENDLABELEDIT, OnEndLabelEdit) + NOTIFY_HANDLER(IDC_SOURCE_LIST, NM_SETFOCUS, OnListSetFocus) + NOTIFY_HANDLER(IDC_SOURCE_LIST, LVN_KEYDOWN, OnKeyDown) + NOTIFY_HANDLER(IDC_SOURCE_LIST, LVN_ITEMCHANGED, OnChange) + NOTIFY_HANDLER(IDC_SOURCE_LIST, LVN_INSERTITEM, OnChange) + NOTIFY_HANDLER(IDC_SOURCE_LIST, LVN_DELETEITEM, OnChange) + COMMAND_ID_HANDLER(IDC_ADD, OnAdd) + COMMAND_ID_HANDLER(IDC_REMOVE, OnRemove) +END_MSG_MAP() + +// Handler prototypes: +// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); +// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); +// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnShowWindow(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnEndLabelEdit(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnListSetFocus(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnKeyDown(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnChange(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + + + bool AddFile(string sFileName); + +protected: + CSysImageList m_imgList; + CListViewCtrl m_ctlList; + string_array m_aPaths; + + void UpdateData(bool bSave = true); + +// IDropTarget +public: + STDMETHOD(DragEnter)(IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect); + STDMETHOD(DragOver)(DWORD grfKeyState, POINTL pt, DWORD* pdwEffect) + { return S_OK; } + STDMETHOD(DragLeave)(void) + { return S_OK; } + STDMETHOD(Drop)(IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect); +}; + +#endif //__SOURCEPROP_H_ diff --git a/NSCmpts/StdAfx.cpp b/NSCmpts/StdAfx.cpp new file mode 100644 index 0000000..a5eea17 --- /dev/null +++ b/NSCmpts/StdAfx.cpp @@ -0,0 +1,12 @@ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +#ifdef _ATL_STATIC_REGISTRY +#include +#include +#endif + +#include diff --git a/NSCmpts/StdAfx.h b/NSCmpts/StdAfx.h new file mode 100644 index 0000000..1edb277 --- /dev/null +++ b/NSCmpts/StdAfx.h @@ -0,0 +1,48 @@ +// 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__EAA0D02A_91CC_11D3_BFBF_0020182B97FC__INCLUDED_) +#define AFX_STDAFX_H__EAA0D02A_91CC_11D3_BFBF_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define STRICT + +// Windows 95 Compatible +#undef WINVER +#define WINVER 0x0400 +#undef _WIN32_WINNT + +// Don't want our program dependant on some browser! +#undef _WIN32_IE +#define _WIN32_IE 0x0000 + +#define _ATL_APARTMENT_THREADED + +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +extern CComModule _Module; +#include +#include +#include + +#define NO_KEY _T("No Key") + +#include +using std::find; +using std::copy; +using std::inserter; +using std::replace; +using std::for_each; + +#include "../common/types.h" +#include "../common/defines.h" +#include +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__EAA0D02A_91CC_11D3_BFBF_0020182B97FC__INCLUDED) diff --git a/NSCmpts/TempActions.cpp b/NSCmpts/TempActions.cpp new file mode 100644 index 0000000..24c8a91 --- /dev/null +++ b/NSCmpts/TempActions.cpp @@ -0,0 +1,153 @@ +// TempActions.cpp: implementation of the CEncryptActions class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "TempActions.h" + +#include "resource.h" +#include + + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +bool CTempActions::DeletePrepare::Do(CActionEngine* pEngine, + HWND hwndUpdates) +{ + ASSERT(pEngine != NULL); + + // Need to create another array for the folders + // since they need to pushed on backwards after the files + // so we don't get "Folder not empty" errors + action_array aFolders; + + Update(hwndUpdates, _T("Preparing to clear Temp Folder...")); + + file_iterator fileIter(m_tempFolder, file_iterator::sub_folders | file_iterator::full_paths), end; + for( ; fileIter != end; fileIter++) + { + file_path srcFile(fileIter->cFileName); + + CAction* pAction; + if(srcFile.attributes() & FILE_ATTRIBUTE_DIRECTORY) + { + pAction = new DeleteFolder(srcFile); + aFolders.push_back(pAction); + } + else + { + pAction = new DeleteFile(srcFile); + pEngine->Add(pAction); + } + } + + while(!aFolders.empty()) + { + pEngine->Add(aFolders.back()); + aFolders.pop_back(); + } + + // Error from file_iterator (listing folders) + if(fileIter.state() != ERROR_SUCCESS) + throw CActionError(HRESULT_FROM_WIN32(fileIter.state()), IDS_TEMP_ERR_LIST, m_tempFolder); + + return false; +} + +HRESULT CTempActions::DeletePrepare::Initialize(const file_path& temp_folder) +{ + m_tempFolder = temp_folder; + return S_OK; +} + +bool CTempActions::DeleteFile::Do(CActionEngine* pEngine, + HWND hwndUpdates) +{ + // Update any monitors + Update(hwndUpdates, m_file); + + ::SetFileAttributes(m_file, FILE_ATTRIBUTE_NORMAL); + + try + { + if(!::DeleteFile(m_file)) + throw CActionError(HRESULT_FROM_WIN32(::GetLastError()), IDS_TEMP_ERR_DELETE, m_file); + } + catch(CActionError& err) + { + // These errors are okay. The file is gone + if(err.m_hRes != HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) && + err.m_hRes != HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)) + throw; + } + + return false; + +} +bool CTempActions::DeleteFile::IsFixable(HRESULT hr) const +{ + return (hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION) || + hr == HRESULT_FROM_WIN32(ERROR_LOCK_VIOLATION) || + hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || + hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)); +} + +void CTempActions::DeleteFile::Fix(HRESULT hr) +{ + bool bFirst = true; + +start: + + if(IsFixable(hr)) + { + try + { + // Try again + Do(NULL, NULL); + return; + + } + catch(CActionError& err) + { + // If it's the first around and the error is the same... + if(bFirst && IsFixable(err.m_hRes)) + { + // ... Prompt user to close programs + MessageBox(NULL, _T("Many programs keep files in the temp folder. These files cannot be deleted while the program is open. Close all other programs and then click the OK button."), _T("Empty Temp Folder"), MB_OK | MB_ICONINFORMATION); + bFirst = false; + } + // Otherwise out with the error + else + throw; + } + } + + goto start; +} + +bool CTempActions::DeleteFolder::Do(CActionEngine* pEngine, + HWND hwndUpdates) +{ + // Update any monitors + Update(hwndUpdates, m_folder); + + if(!::RemoveDirectory(m_folder)) + { + DWORD dwError = ::GetLastError(); + + // This error will be accompanied by another file error + // so we don't need to show it + if(dwError != ERROR_DIR_NOT_EMPTY) + throw CActionError(HRESULT_FROM_WIN32(::GetLastError()), IDS_TEMP_ERR_DELETE, m_folder); + } + + return false; + +} + +void CTempActions::DeleteFolder::Fix(HRESULT hr) +{ + +} diff --git a/NSCmpts/TempActions.h b/NSCmpts/TempActions.h new file mode 100644 index 0000000..5b78d1e --- /dev/null +++ b/NSCmpts/TempActions.h @@ -0,0 +1,79 @@ +// TempActions.h: interface for the CBackupActions class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_TEMPACTIONS_H__75916453_A62F_11D3_82DF_0020182B97FC__INCLUDED_) +#define AFX_TEMPACTIONS_H__75916453_A62F_11D3_82DF_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "ActionEngine.h" +#include +#include + +class CTempActions +{ +public: + + class DeleteFile : public CAction + { + public: + DeleteFile(const file_path& file) + { + m_file = file; + } + + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates); + virtual void Fix(HRESULT hr); + virtual bool IsFixable(HRESULT hr) const; + virtual bool IsRetryable() const + { return true; } + + protected: + file_path m_file; + static HWND hWndParent; + }; + + class DeleteFolder : public CAction + { + public: + DeleteFolder(const file_path& folder) + { + m_folder = folder; + } + + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates); + virtual void Fix(HRESULT hr); + virtual bool IsFixable(HRESULT hr) const + { return false; } + virtual bool IsRetryable() const + { return true; } + + protected: + file_path m_folder; + }; + + class DeletePrepare : public CAction + { + public: + DeletePrepare() {}; + + virtual bool Do(CActionEngine* pEngine, HWND hwndUpdates); + virtual void Fix(HRESULT hr) { } + virtual bool IsFixable(HRESULT hr) const + { return false; } + virtual bool IsRetryable() const + { return false; } + + HRESULT Initialize(const file_path& temp_folder); + + protected: + file_path m_tempFolder; + friend class Encrypt; + }; + +}; + +#endif // !defined(AFX_ENCRYPTACTIONS_H__75916453_A62F_11D3_82DF_0020182B97FC__INCLUDED_) diff --git a/NSCmpts/TempWarnDlg.cpp b/NSCmpts/TempWarnDlg.cpp new file mode 100644 index 0000000..702519e --- /dev/null +++ b/NSCmpts/TempWarnDlg.cpp @@ -0,0 +1,44 @@ +// TempWarnDlg.cpp : Implementation of CTempWarnDlg +#include "stdafx.h" +#include "TempWarnDlg.h" + +///////////////////////////////////////////////////////////////////////////// +// CTempWarnDlg + +CTempWarnDlg::CTempWarnDlg(const string& sFolderName) + : CDialogImplEx(IDD) +{ + m_sFolderName = sFolderName; + m_bNotAgain = false; +} + +CTempWarnDlg::~CTempWarnDlg() +{ + +} + +LRESULT CTempWarnDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + string sTemp; + sTemp.format(IDS_EMPTYTEMP_WARN, (LPCTSTR)m_sFolderName); + + SetDlgItemText(IDC_FOLDERWARN, sTemp); + CheckDlgButton(IDC_DONTSHOW, m_bNotAgain); + + return 1; // Let the system set the focus +} + +LRESULT CTempWarnDlg::OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + m_bNotAgain = IsDlgButtonChecked(IDC_DONTSHOW) ? true : false; + EndDialog(wID); + return 0; +} + +LRESULT CTempWarnDlg::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + m_bNotAgain = IsDlgButtonChecked(IDC_DONTSHOW) ? true : false; + EndDialog(wID); + return 0; +} + diff --git a/NSCmpts/TempWarnDlg.h b/NSCmpts/TempWarnDlg.h new file mode 100644 index 0000000..1c007b2 --- /dev/null +++ b/NSCmpts/TempWarnDlg.h @@ -0,0 +1,35 @@ +// TempWarnDlg.h : Declaration of the CTempWarnDlg + +#ifndef __TEMPWARNDLG_H_ +#define __TEMPWARNDLG_H_ + +#include "resource.h" // main symbols +#include + +///////////////////////////////////////////////////////////////////////////// +// CTempWarnDlg +class CTempWarnDlg : + public CDialogImplEx +// public CDialogImpl +{ +public: + CTempWarnDlg(const string& sFolderName); + ~CTempWarnDlg(); + + enum { IDD = IDD_TEMPWARNDLG }; + +BEGIN_MSG_MAP(CTempWarnDlg) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + COMMAND_ID_HANDLER(IDOK, OnOK) + COMMAND_ID_HANDLER(IDCANCEL, OnCancel) +END_MSG_MAP() + + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + + string m_sFolderName; + bool m_bNotAgain; +}; + +#endif //__TEMPWARNDLG_H_ diff --git a/NSCmpts/WipefreeSpace.cpp b/NSCmpts/WipefreeSpace.cpp new file mode 100644 index 0000000..72bc199 --- /dev/null +++ b/NSCmpts/WipefreeSpace.cpp @@ -0,0 +1,217 @@ +// WipefreeSpace.cpp : Implementation of CWipefreeSpace +#include "stdafx.h" +#include "NSCmpts.h" +#include "WipefreeSpace.h" + +///////////////////////////////////////////////////////////////////////////// +// CWipefreeSpace + +STDMETHODIMP CWipefreeSpace::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_ISecureShutdownDOS, + }; + for (int i=0;ivt = VT_BSTR; + bsRetVal.LoadString(IDS_WIPEFREE_NAME); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + case nsHelpText: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_WIPEFREE_DESC); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + } + + ::VariantClear(pvVal); + return S_FALSE; +} + + +STDMETHODIMP CWipefreeSpace::SetData(IUnknown* pUnk) +{ + return m_Data.Initialize(pUnk); +} + +/////////////////////////////////////////////////////////////////////////////// +// Property Sheet Stuff + +STDMETHODIMP CWipefreeSpace::Apply() +{ + ATLTRACE(_T("CClearInetCache::Apply\n")); + + string sTemp; + string sDrives; + + // If the user has selected just some drives then + // save them individually + if(m_bCustomDrives) + { + for(int nCnt = 0; nCnt < m_nDrives; nCnt++) + { + // Loop through check boxes + if(IsDlgButtonChecked(IDC_FIRST_DRIVE + nCnt)) + { + // Get Label of Checked Button + ::GetWindowText(GetDlgItem(IDC_FIRST_DRIVE + nCnt), sTemp.get_buffer(10), 10); + sTemp.release_buffer(); + + // Label should be "Drive C" (C is the 7th Char) + sDrives += sTemp[6]; + + } + + } + } + // All Drives + else + sDrives = _T("!!!"); + + m_bDirty = FALSE; + return m_Data.WriteString(_T("Drives"), sDrives); + +} + +LRESULT CWipefreeSpace::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + string sDrives; + string sTemp; + + // Get Property + string sSelectedDrives = m_Data.GetString(_T("Drives"), _T("!!!")); + + // Has the User Changed the Defaults? + m_bCustomDrives = (sSelectedDrives != _T("!!!")); + + ::GetLogicalDriveStrings(220, sDrives.get_buffer(220)); + sDrives.release_buffer(); + + sSelectedDrives.make_upper(); + + LPCTSTR szCurDrive = sDrives; // Pointer to Current Drive in sDrives + int nCnt = 0; // Current Drive Num (for interface) + + + // Loop Through Drives + while(szCurDrive[0] != _T('\0')) + { + // We're only interested in fixed drives + if(GetDriveType(szCurDrive) == DRIVE_FIXED) + { + sTemp = szCurDrive; + sTemp.make_upper(); + + // Due to interface limitations we only support 15 drives (MAX_DRIVES) + if(nCnt < MAX_DRIVES) + { + // Give the Window the Appropriate Label + SetDlgItemText(IDC_FIRST_DRIVE + nCnt, (string)(_T("Drive ") + string(sTemp[0]))); + + // Since it's hidden in the dialog template, show it + ::ShowWindow(GetDlgItem(IDC_FIRST_DRIVE + nCnt), SW_SHOW); + + // Check it if the user has selected it or if we are going for all of'm + CheckDlgButton(IDC_FIRST_DRIVE + nCnt, (!m_bCustomDrives) || ((sSelectedDrives.find(sTemp[0]) != string::npos))); + + nCnt++; + } + + + } + + // Next Drive + szCurDrive += _tcslen(szCurDrive) + 1; // ???? Later: What does this do + } + + // Counter for Apply() + m_nDrives = nCnt; + + return false; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +LRESULT CWipefreeSpace::OnDrivesChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + // User is overriding the default + m_bCustomDrives = true; + return 0; +} diff --git a/NSCmpts/WipefreeSpace.h b/NSCmpts/WipefreeSpace.h new file mode 100644 index 0000000..9c68a20 --- /dev/null +++ b/NSCmpts/WipefreeSpace.h @@ -0,0 +1,102 @@ +// WipefreeSpace.h : Declaration of the CWipefreeSpace + +#ifndef __WIPEFREESPACE_H_ +#define __WIPEFREESPACE_H_ + +#include "resource.h" // main symbols +#include "../Common/CmptData.h" +#include + +#define MAX_DRIVES 15 + +///////////////////////////////////////////////////////////////////////////// +// CWipefreeSpace +class ATL_NO_VTABLE CWipefreeSpace : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl, + public IPropertyPageImpl, +// public CDialogImpl + public CDialogImplEx, + public CContextHelp +{ +// Construction +public: + CWipefreeSpace() : CDialogImplEx(IDD) + { + m_dwTitleID = IDS_TITLEWipeFreeSpace; + m_dwHelpFileID = IDS_NSHELPFILE; + m_dwDocStringID = IDS_DOCSTRINGWipeFreeSpace; + m_bCustomDrives = true; + } + ~CWipefreeSpace() + { ATLTRACE(_T("Destroying WipefreeSpace\n")); } + +DECLARE_REGISTRY_RESOURCEID(IDR_WIPEFREESPACE) + +BEGIN_COM_MAP(CWipefreeSpace) + COM_INTERFACE_ENTRY(ISecureShutdownDOS) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) + COM_INTERFACE_ENTRY_IMPL(IPropertyPage) +END_COM_MAP() + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// ISecureShutdownDOS +public: + STDMETHOD(get_Info)(/*[in]*/ NightSecInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + STDMETHOD(GetBatchText)(/*[out, retval]*/ BSTR* psText); + STDMETHOD(SetData)(/*[in]*/ IUnknown* pUnk); + +// Data +protected: + bool m_bCustomDrives; + int m_nDrives; + CPropertyBag m_Data; + + +/////////////////////////////////////////////////////////////////// +// Property Sheet Stuff + +public: + + enum {IDD = IDD_WIPEFREESPACE}; + + BEGIN_MSG_MAP(CWipefreeSpace) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + COMMAND_RANGE_HANDLER(IDC_FIRST_DRIVE, IDC_FIRST_DRIVE + MAX_DRIVES - 1, OnDrivesChange) + CHAIN_MSG_MAP(IPropertyPageImpl) + CHAIN_MSG_MAP(CContextHelp) + END_MSG_MAP() + + BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(IDC_FIRST_DRIVE, 4024) + HELP_ID(IDC_FIRST_DRIVE2, 4024) + HELP_ID(IDC_FIRST_DRIVE3, 4024) + HELP_ID(IDC_FIRST_DRIVE4, 4024) + HELP_ID(IDC_FIRST_DRIVE5, 4024) + HELP_ID(IDC_FIRST_DRIVE6, 4024) + HELP_ID(IDC_FIRST_DRIVE7, 4024) + HELP_ID(IDC_FIRST_DRIVE8, 4024) + HELP_ID(IDC_FIRST_DRIVE9, 4024) + HELP_ID(IDC_FIRST_DRIVE10, 4024) + HELP_ID(IDC_FIRST_DRIVE11, 4024) + HELP_ID(IDC_FIRST_DRIVE12, 4024) + HELP_ID(IDC_FIRST_DRIVE13, 4024) + HELP_ID(IDC_FIRST_DRIVE14, 4024) + HELP_ID(IDC_FIRST_DRIVE15, 4024) + END_HELP_MAP + +// Property Sheet Messages + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDrivesChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + +public: + STDMETHOD(Apply)(void); + +}; + +#endif //__WIPEFREESPACE_H_ diff --git a/NSCmpts/dlldata.c b/NSCmpts/dlldata.c new file mode 100644 index 0000000..3f7c11d --- /dev/null +++ b/NSCmpts/dlldata.c @@ -0,0 +1,40 @@ +/********************************************************* + DllData file -- generated by MIDL compiler + + DO NOT ALTER THIS FILE + + This file is regenerated by MIDL on every IDL file compile. + + To completely reconstruct this file, delete it and rerun MIDL + on all the IDL files in this DLL, specifying this file for the + /dlldata command line option + +*********************************************************/ + +#define PROXY_DELEGATION + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_PROXY_FILE( CmptIfaces ) +EXTERN_PROXY_FILE( NSCmpts ) + + +PROXYFILE_LIST_START +/* Start of list */ + REFERENCE_PROXY_FILE( CmptIfaces ), + REFERENCE_PROXY_FILE( NSCmpts ), +/* End of list */ +PROXYFILE_LIST_END + + +DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID ) + +#ifdef __cplusplus +} /*extern "C" */ +#endif + +/* end of generated dlldata file */ diff --git a/NSCmpts/res/161.avi b/NSCmpts/res/161.avi new file mode 100644 index 0000000..5d7b02d Binary files /dev/null and b/NSCmpts/res/161.avi differ diff --git a/NSCmpts/res/DeleteSwapFile.rgs b/NSCmpts/res/DeleteSwapFile.rgs new file mode 100644 index 0000000..06e059a --- /dev/null +++ b/NSCmpts/res/DeleteSwapFile.rgs @@ -0,0 +1,42 @@ +HKCR +{ + NightSecurity.DeleteSwapFile.25 = s 'DeleteSwapFile Class' + { + CLSID = s '{34F11696-F275-11d2-A589-0020182B97FC}' + } + NightSecurity.DeleteSwapFile = s 'DeleteSwapFile Class' + { + CurVer = s 'NightSecurity.DeleteSwapFile.25' + CLSID = s '{34F11696-F275-11d2-A589-0020182B97FC}' + } + NoRemove CLSID + { + ForceRemove {34F11696-F275-11d2-A589-0020182B97FC} = s 'DeleteSwapFile Class' + { + ProgID = s 'NightSecurity.DeleteSwapFile.25' + VersionIndependentProgID = s 'NightSecurity.DeleteSwapFile' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} + +HKEY_LOCAL_MACHINE +{ + NoRemove 'Software' + { + NoRemove 'Heavenly Helpers' + { + NoRemove 'Night Security' + { + NoRemove 'Installed Components' + { + ForceRemove 'NightSecurity.DeleteSwapFile' + } + } + } + } +} \ No newline at end of file diff --git a/NSCmpts/res/EmptyTempFolder.rgs b/NSCmpts/res/EmptyTempFolder.rgs new file mode 100644 index 0000000..1ee786e --- /dev/null +++ b/NSCmpts/res/EmptyTempFolder.rgs @@ -0,0 +1,42 @@ +HKCR +{ + NightSecurity.EmptyTempFolder.25 = s 'EmptyTempFolder Class' + { + CLSID = s '{34F11695-F275-11d2-A589-0020182B97FC}' + } + NightSecurity.EmptyTempFolder = s 'EmptyTempFolder Class' + { + CurVer = s 'NightSecurity.EmptyTempFolder.25' + CLSID = s '{34F11695-F275-11d2-A589-0020182B97FC}' + } + NoRemove CLSID + { + ForceRemove {34F11695-F275-11d2-A589-0020182B97FC} = s 'EmptyTempFolder Class' + { + ProgID = s 'NightSecurity.EmptyTempFolder.25' + VersionIndependentProgID = s 'NightSecurity.EmptyTempFolder' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} + +HKEY_LOCAL_MACHINE +{ + NoRemove 'Software' + { + NoRemove 'Heavenly Helpers' + { + NoRemove 'Night Security' + { + NoRemove 'Installed Components' + { + ForceRemove 'NightSecurity.EmptyTempFolder' + } + } + } + } +} \ No newline at end of file diff --git a/NSCmpts/res/Night Security Worker.ico b/NSCmpts/res/Night Security Worker.ico new file mode 100644 index 0000000..f1486e4 Binary files /dev/null and b/NSCmpts/res/Night Security Worker.ico differ diff --git a/NSCmpts/res/RunScanDisk.rgs b/NSCmpts/res/RunScanDisk.rgs new file mode 100644 index 0000000..06bf1cd --- /dev/null +++ b/NSCmpts/res/RunScanDisk.rgs @@ -0,0 +1,42 @@ +HKCR +{ + NightSecurity.RunScanDisk.25 = s 'RunScanDisk Class' + { + CLSID = s '{34F11697-F275-11d2-A589-0020182B97FC}' + } + NightSecurity.RunScanDisk = s 'RunScanDisk Class' + { + CurVer = s 'NightSecurity.RunScanDisk.25' + CLSID = s '{34F11697-F275-11d2-A589-0020182B97FC}' + } + NoRemove CLSID + { + ForceRemove {34F11697-F275-11d2-A589-0020182B97FC} = s 'RunScanDisk Class' + { + ProgID = s 'NightSecurity.RunScanDisk.25' + VersionIndependentProgID = s 'NightSecurity.RunScanDisk' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} + +HKEY_LOCAL_MACHINE +{ + NoRemove 'Software' + { + NoRemove 'Heavenly Helpers' + { + NoRemove 'Night Security' + { + NoRemove 'Installed Components' + { + ForceRemove 'NightSecurity.RunScanDisk' + } + } + } + } +} \ No newline at end of file diff --git a/NSCmpts/res/WipefreeSpace.rgs b/NSCmpts/res/WipefreeSpace.rgs new file mode 100644 index 0000000..74ae6fb --- /dev/null +++ b/NSCmpts/res/WipefreeSpace.rgs @@ -0,0 +1,42 @@ +HKCR +{ + NightSecurity.WipefreeSpace.25 = s 'WipefreeSpace Class' + { + CLSID = s '{34F11698-F275-11d2-A589-0020182B97FC}' + } + NightSecurity.WipefreeSpace = s 'WipefreeSpace Class' + { + CurVer = s 'NightSecurity.WipefreeSpace.25' + CLSID = s '{34F11698-F275-11d2-A589-0020182B97FC}' + } + NoRemove CLSID + { + ForceRemove {34F11698-F275-11d2-A589-0020182B97FC} = s 'WipefreeSpace Class' + { + ProgID = s 'NightSecurity.WipefreeSpace.25' + VersionIndependentProgID = s 'NightSecurity.WipefreeSpace' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} + +HKEY_LOCAL_MACHINE +{ + NoRemove 'Software' + { + NoRemove 'Heavenly Helpers' + { + NoRemove 'Night Security' + { + NoRemove 'Installed Components' + { + ForceRemove 'NightSecurity.WipefreeSpace' + } + } + } + } +} \ No newline at end of file diff --git a/NSCmpts/res/advanced.ico b/NSCmpts/res/advanced.ico new file mode 100644 index 0000000..b08ce7a Binary files /dev/null and b/NSCmpts/res/advanced.ico differ diff --git a/NSCmpts/res/backup1.ico b/NSCmpts/res/backup1.ico new file mode 100644 index 0000000..9cde683 Binary files /dev/null and b/NSCmpts/res/backup1.ico differ diff --git a/NSCmpts/res/backupad.bin b/NSCmpts/res/backupad.bin new file mode 100644 index 0000000..6a0546a --- /dev/null +++ b/NSCmpts/res/backupad.bin @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {E85A26C3-946D-11D3-BFC4-0020182B97FC} = s 'Backup Advanced Properties' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/NSCmpts/res/backupde.bin b/NSCmpts/res/backupde.bin new file mode 100644 index 0000000..54bec7e --- /dev/null +++ b/NSCmpts/res/backupde.bin @@ -0,0 +1,13 @@ +HKCR +{ + NoRemove CLSID + { + ForceRemove {E85A26C2-946D-11D3-BFC4-0020182B97FC} = s 'Backup Destination Properties' + { + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} diff --git a/NSCmpts/res/copyfile.ico b/NSCmpts/res/copyfile.ico new file mode 100644 index 0000000..3c297c6 Binary files /dev/null and b/NSCmpts/res/copyfile.ico differ diff --git a/NSCmpts/res/cursor1.cur b/NSCmpts/res/cursor1.cur new file mode 100644 index 0000000..048f06b Binary files /dev/null and b/NSCmpts/res/cursor1.cur differ diff --git a/NSCmpts/res/enc.avi b/NSCmpts/res/enc.avi new file mode 100644 index 0000000..e4e321b Binary files /dev/null and b/NSCmpts/res/enc.avi differ diff --git a/NSCmpts/res/ico00001.ico b/NSCmpts/res/ico00001.ico new file mode 100644 index 0000000..8462541 Binary files /dev/null and b/NSCmpts/res/ico00001.ico differ diff --git a/NSCmpts/res/ico00002.ico b/NSCmpts/res/ico00002.ico new file mode 100644 index 0000000..e8e1f6f Binary files /dev/null and b/NSCmpts/res/ico00002.ico differ diff --git a/NSCmpts/res/ico00003.ico b/NSCmpts/res/ico00003.ico new file mode 100644 index 0000000..9e7944d Binary files /dev/null and b/NSCmpts/res/ico00003.ico differ diff --git a/NSCmpts/res/ico00004.ico b/NSCmpts/res/ico00004.ico new file mode 100644 index 0000000..b08ce7a Binary files /dev/null and b/NSCmpts/res/ico00004.ico differ diff --git a/NSCmpts/res/ico00005.ico b/NSCmpts/res/ico00005.ico new file mode 100644 index 0000000..da61e8d Binary files /dev/null and b/NSCmpts/res/ico00005.ico differ diff --git a/NSCmpts/res/ico00006.ico b/NSCmpts/res/ico00006.ico new file mode 100644 index 0000000..f60a0ee Binary files /dev/null and b/NSCmpts/res/ico00006.ico differ diff --git a/NSCmpts/res/ico00007.ico b/NSCmpts/res/ico00007.ico new file mode 100644 index 0000000..23a0e26 Binary files /dev/null and b/NSCmpts/res/ico00007.ico differ diff --git a/NSCmpts/res/ico00008.ico b/NSCmpts/res/ico00008.ico new file mode 100644 index 0000000..72c81b9 Binary files /dev/null and b/NSCmpts/res/ico00008.ico differ diff --git a/NSCmpts/res/icon1.ico b/NSCmpts/res/icon1.ico new file mode 100644 index 0000000..3c297c6 Binary files /dev/null and b/NSCmpts/res/icon1.ico differ diff --git a/NSCmpts/res/icon2.ico b/NSCmpts/res/icon2.ico new file mode 100644 index 0000000..9cde683 Binary files /dev/null and b/NSCmpts/res/icon2.ico differ diff --git a/NSCmpts/res/idr_.bin b/NSCmpts/res/idr_.bin new file mode 100644 index 0000000..58d5ce0 --- /dev/null +++ b/NSCmpts/res/idr_.bin @@ -0,0 +1,23 @@ +HKCR +{ + = s '' + { + CLSID = s '{51B91363-FFFF-FFFF-50F3-12007CA3B851}' + } + = s '' + { + CLSID = s '{51B91363-FFFF-FFFF-50F3-12007CA3B851}' + } + NoRemove CLSID + { + ForceRemove {51B91363-FFFF-FFFF-50F3-12007CA3B851} = s '' + { + ProgID = s '' + VersionIndependentProgID = s '' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'both' + } + } + } +} diff --git a/NSCmpts/res/items.ico b/NSCmpts/res/items.ico new file mode 100644 index 0000000..0faf9dc Binary files /dev/null and b/NSCmpts/res/items.ico differ diff --git a/NSCmpts/res/n_161.avi b/NSCmpts/res/n_161.avi new file mode 100644 index 0000000..edc09e3 Binary files /dev/null and b/NSCmpts/res/n_161.avi differ diff --git a/NSCmpts/res/n_temp.avi b/NSCmpts/res/n_temp.avi new file mode 100644 index 0000000..4d150fa Binary files /dev/null and b/NSCmpts/res/n_temp.avi differ diff --git a/NSCmpts/res/new1.ico b/NSCmpts/res/new1.ico new file mode 100644 index 0000000..2027b3e Binary files /dev/null and b/NSCmpts/res/new1.ico differ diff --git a/NSCmpts/res/recycle.ico b/NSCmpts/res/recycle.ico new file mode 100644 index 0000000..4b1e077 Binary files /dev/null and b/NSCmpts/res/recycle.ico differ diff --git a/NSCmpts/res/temp.avi b/NSCmpts/res/temp.avi new file mode 100644 index 0000000..6da080d Binary files /dev/null and b/NSCmpts/res/temp.avi differ diff --git a/NSCmpts/res/wxpy.ico b/NSCmpts/res/wxpy.ico new file mode 100644 index 0000000..f363761 Binary files /dev/null and b/NSCmpts/res/wxpy.ico differ diff --git a/NSCmpts/resource.h b/NSCmpts/resource.h new file mode 100644 index 0000000..5855e5d --- /dev/null +++ b/NSCmpts/resource.h @@ -0,0 +1,168 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by NSCmpts.rc +// +#define IDS_PROJNAME 100 +#define IDS_TITLEBackupSourceProp 101 +#define IDR_BACKUP 101 +#define IDS_HELPFILEBackupSourceProp 102 +#define IDD_BACKUPPROGRESS 102 +#define IDS_NSHELPFILE 102 +#define IDS_DOCSTRINGBackupSourceProp 103 +#define IDC_MESSAGE1 103 +#define IDR_BACKUPSOURCEPROP 104 +#define IDC_MESSAGE2 104 +#define IDD_BACKUPSOURCE 105 +#define IDD_SOURCE 105 +#define IDS_TITLEBackupDestProp 106 +#define IDS_RECYCLENAME 107 +#define IDS_RECYCLEDESC 108 +#define IDR_EMPTYRECYCLEBIN 109 +#define IDS_RECYCLEPARAM 109 +#define IDS_HELPFILEBackupDestProp 110 +#define IDS_DOCSTRINGBackupDestProp 111 +#define IDR_BACKUPDESTPROP 112 +#define IDS_BACKUPNAME 112 +#define IDD_BACKUPDEST 113 +#define IDS_BACKUPDESC 113 +#define IDS_TITLEBackupAdvancedProp 114 +#define IDS_HELPFILEBackupAdvancedProp 115 +#define IDS_DOCSTRINGBackupAdvancedProp 116 +#define IDS_TEMPNAME 117 +#define IDR_EMPTYTEMPFOLDER 118 +#define IDS_TEMPDESC 118 +#define IDS_TEMPPARAM 119 +#define IDR_DELETESWAPFILE 120 +#define IDS_DELSWAP_BATCHTEXT 120 +#define IDS_DELSWAP_DESC 121 +#define IDS_DELSWAP_NAME 122 +#define IDR_RUNSCANDISK 123 +#define IDS_SCANDISK_NAME 123 +#define IDS_SCANDISK_DESC 124 +#define IDS_SCANDISK_BATCHTEXT 125 +#define IDR_BACKUPADVANCEDPROP 126 +#define IDS_BACKUPPARAM 126 +#define IDD_BACKUPADVANCED 127 +#define IDS_ENCRYPTNAME 127 +#define IDR_MAINFRAME 128 +#define IDS_ENCRYPTDESC 128 +#define IDD_DUMMY 129 +#define IDS_SCANDISK_NOSAVE 129 +#define IDS_SCANDISK_AUTOFIX 130 +#define IDS_WIPEFREE_NAME 131 +#define IDS_WIPEFREE_DESC 132 +#define IDI_NOTE 133 +#define IDS_WIPEFREE_BATCHTEXT 133 +#define IDS_WIPEFREE_DRIVE 134 +#define IDS__DESC 135 +#define IDI_ITEMS 135 +#define IDS_ENCRYPTPARAM 135 +#define IDI_RECYCLE 136 +#define IDR_WIPEFREESPACE 137 +#define IDS_TITLERunScanDiskProps 139 +#define IDS_HELPFILERunScanDiskProps 140 +#define IDS_DOCSTRINGRunScanDiskProps 141 +#define IDR_ENCRYPT 142 +#define IDS_TITLEEncryptSourceProp 143 +#define IDS_HELPFILEEncryptSourceProp 144 +#define IDS_EMPTYCOMMAND 145 +#define IDS_NORTONCOMMAND 146 +#define IDS_TITLERecycle 147 +#define IDS_HELPFILERecycle 148 +#define IDS_DOCSTRINGRecycle 149 +#define IDD_TEMPWARNDLG 150 +#define IDS_EMPTYTEMP_WARN 150 +#define IDD_EMPTYRECYCLE 151 +#define IDS_TITLEWipeFreeSpace 151 +#define IDD_RUNSCANDISK 152 +#define IDS_HELPFILEWipeFreeSpace 152 +#define IDD_WIPEFREESPACE 153 +#define IDS_DOCSTRINGWipeFreeSpace 153 +#define IDS_BACKUP_NEWEXT 154 +#define IDD_ENCRYPTADVANCED 154 +#define IDS_BACKUP_VALID_PATH 155 +#define IDS_BACKUP_ERR_LIST 156 +#define IDS_BACKUP_ERR_CREATE_DEST 157 +#define IDS_BACKUP_ERR_DEST 158 +#define IDS_BACKUP_ERR_COPY 159 +#define IDS_BACKUP_ERR_DISKFULL 160 +#define IDS_ENCRYPT_ERR_LIST 161 +#define IDS_ENCRYPT_ERR_XPYINIT 162 +#define IDS_ENCRYPT_ERR 163 +#define IDS_DOCSTRINGEncryptSourceProp 164 +#define IDS_TEMP_ERR_LIST 164 +#define IDR_ENCRYPTSOURCEPROP 165 +#define IDS_TEMP_ERR_DELETE 165 +#define IDS_TITLEEncryptAdvancedProp 167 +#define IDS_HELPFILEEncryptAdvancedProp 168 +#define IDS_DOCSTRINGEncryptAdvancedProp 169 +#define IDR_ENCRYPTADVANCEDPROP 170 +#define IDS_BACKUP_ERR_FILE 170 +#define IDS_ENCRYPT_ERR_XPY 171 +#define IDC_AUTOFIX 201 +#define IDC_PROGRESS 201 +#define IDC_BUTTON1 201 +#define IDI_COPYFILES 201 +#define IDI_BACKUP 202 +#define IDC_SAVE 203 +#define IDI_SCANDISK 203 +#define IDC_IGNORE_LIST 203 +#define IDC_NOSAVE 204 +#define IDI_DRIVE 204 +#define IDI_ADVANCED 205 +#define IDI_PASSWORD 207 +#define IDC_ICO 207 +#define IDC_ANIMATION 208 +#define IDC_DISABLEPASSWORD 209 +#define IDR_AVIBACKUP 209 +#define IDR_AVIENCRYPT 210 +#define IDC_ENCRYPTREADONLY 210 +#define IDI_NORTONPROT 211 +#define IDC_MESSAGE 211 +#define IDR_AVITEMP 211 +#define IDC_EMPTYRECYCLE 212 +#define IDI_EXCLAM 212 +#define IDC_SOURCE_LIST 212 +#define IDC_EMPTYNORTON 213 +#define IDC_DONTSHOW 213 +#define IDC_BROWSE 213 +#define IDI_NEW 213 +#define IDC_FOLDERWARN 214 +#define IDC_REMOVE 214 +#define IDC_DEST 214 +#define IDI_DEL 214 +#define IDC_TYPE 215 +#define IDC_ENGINE_TYPE 215 +#define IDI_WXPY 215 +#define IDC_DEL 216 +#define IDC_NEW 217 +#define IDC_ADD 230 +#define IDD_PROGRESSBACKUP 1020 +#define IDD_PROGRESSENCRYPT 1021 +#define IDD_PROGRESSTEMP 1022 +#define IDC_FIRST_DRIVE 1865 +#define IDC_FIRST_DRIVE2 1866 +#define IDC_FIRST_DRIVE3 1867 +#define IDC_FIRST_DRIVE4 1868 +#define IDC_FIRST_DRIVE5 1869 +#define IDC_FIRST_DRIVE6 1870 +#define IDC_FIRST_DRIVE7 1871 +#define IDC_FIRST_DRIVE8 1872 +#define IDC_FIRST_DRIVE9 1873 +#define IDC_FIRST_DRIVE10 1874 +#define IDC_FIRST_DRIVE11 1875 +#define IDC_FIRST_DRIVE12 1876 +#define IDC_FIRST_DRIVE13 1877 +#define IDC_FIRST_DRIVE14 1878 +#define IDC_FIRST_DRIVE15 1879 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 213 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 211 +#define _APS_NEXT_SYMED_VALUE 172 +#endif +#endif diff --git a/NetCmpts/ClearInetCache.cpp b/NetCmpts/ClearInetCache.cpp new file mode 100644 index 0000000..b4d5b4d --- /dev/null +++ b/NetCmpts/ClearInetCache.cpp @@ -0,0 +1,579 @@ +// ClearInetCache.cpp : Implementation of CClearInetCache +#include "stdafx.h" +#include "NetCmpts.h" +#include "ClearInetCache.h" +#include "ProgressDlg.h" +#include "..\common\defines.h" +#include +#include "parseurl.h" + +#include +using std::find; + +///////////////////////////////////////////////////////////////////////////// +// CClearInetCache + +STDMETHODIMP CClearInetCache::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_ISecureShutdownWin, + }; + for (int i=0;idwStructSize = sizeof(INTERNET_CACHE_ENTRY_INFO); + lpICEInfo->dwReserved = 0; // Always has to be zero + + // Find First + hFindURL = FindFirstUrlCacheEntry (_T("*.*"), lpICEInfo, &nBufferSize); + + if(hFindURL != NULL) + { + // Create Progress dialog + CProgressDlg dlgProg; + dlgProg.Create(hwndParent); + dlgProg.DispEventAdvise(m_spUnkSite); // Pointer from IObjectWithSite + dlgProg.m_ctlProgress.SetRange(0, 2); + dlgProg.m_ctlProgress.SetStep(1); + + bool bLoop = true; + + while(bLoop) + { + + // Update Progress Dialog + dlgProg.SetDlgItemText(IDC_FILENAME, lpICEInfo->lpszSourceUrlName); + dlgProg.m_ctlProgress.SetPos(0); + + // Check if we should delete this URL + if(IsDeleteableURL(lpICEInfo->lpszSourceUrlName)) + { + // Keep going even if error + DeleteUrlCacheEntry(lpICEInfo->lpszSourceUrlName); + + // Update Progress Dialog + dlgProg.m_ctlProgress.SetPos(2); + } + + // nBufferSize Gets changed in FindNext... funcs + // so have to reset + nBufferSize = MAX_CACHE_ENTRY_INFO_SIZE; + + // Get Next One + if(!((bLoop = FindNextUrlCacheEntry(hFindURL, lpICEInfo, &nBufferSize)) ? true : false)) + { + DWORD dwError = ::GetLastError(); + switch(::GetLastError()) + { + case ERROR_NO_MORE_FILES: + case ERROR_NO_MORE_ITEMS: + hRet = S_OK; + break; + // For Debugging + case ERROR_INSUFFICIENT_BUFFER: + hRet = E_OUTOFMEMORY; + break; + default: + hRet = HRESULT_FROM_WIN32(::GetLastError()); + break; + } + } + + PEEK_ALL_MESSAGES(msg); + + // Check for Cancel + if(dlgProg.IsCancelled()) + { + bLoop = false; + hRet = E_ABORT; + } + + } // while bLoop + + // Clean up time + FindCloseUrlCache(hFindURL); + free(lpICEInfo); + + if(dlgProg.IsWindow()) + dlgProg.DestroyWindow(); + + dlgProg.DispEventUnadvise(m_spUnkSite); // Pointer from IObjectWithSite + + return hRet; + + } // if handle is null + + // Clean up + free(lpICEInfo); + + switch(::GetLastError()) + { + case ERROR_NO_MORE_ITEMS: + case ERROR_NO_MORE_FILES: + return S_OK; + break; + default: + return HRESULT_FROM_WIN32(::GetLastError()); + break; + } + +} + +////////////////////////////////////////////////////////////////// +// Load Server List from Registry + +int CClearInetCache::GetServersToDelete() +{ + USES_CONVERSION; + + LoadFlags(); + + int nCnt = 0; // Number of URLs from Registry + int nReadServers = 0; // Number of 'sane' URLs + string sURL = ""; + string sKeyName = ""; + + // Format Key Name + sKeyName.format("Server%.4d", nCnt); + + // Used in URL Parsing + DWORD dwProtocol = 0; + string sServer = ""; + string sObject = ""; + INTERNET_PORT inetPort; + + // Add URLs to List Box + while((sURL = m_Data.GetString(sKeyName, NO_KEY)) != NO_KEY) + { + // Get the Host/Server Part + if(ParseURL(sURL, dwProtocol, sServer, sObject, inetPort)) + { + // Add to Array + m_asServerURLs.push_back(sServer); + nReadServers++; + } + + nCnt++; + + // Format Key Name + sKeyName.format("Server%.4d", nCnt); + + } + + m_bInitialized = true; + + return nReadServers; +} + +////////////////////////////////////////////////////////////////// +// Checks a URL against the list + +bool CClearInetCache::IsDeleteableURL(const string& sURL) +{ + // Sanity Check + if(sURL.empty()) + return false; + + + // Read Servers from Registry + if(!m_bInitialized) + + // Only continue of more than one server + GetServersToDelete(); + + + + // Used in URL Parsing + DWORD dwProtocol = 0; + string sServer = ""; + string sObject = ""; + INTERNET_PORT inetPort; + + // Get the Host/Server Part + if(ParseURL(sURL, dwProtocol, sServer, sObject, inetPort)) + { + if(dwProtocol == INTERNET_SCHEME_UNKNOWN) + return m_bCookies; + + if(m_bClearAll) + return true; + + // Check it against our array + return find(m_asServerURLs.begin(), m_asServerURLs.end(), sServer) + != m_asServerURLs.end(); + + } + + return false; + +} + +STDMETHODIMP CClearInetCache::get_Info(NightSecInfo nsItem, VARIANT* pvVal) +{ + ::VariantClear(pvVal); + + CComBSTR bsRetVal; + + switch(nsItem) + { + case nsName: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_INETNAME); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + case nsHelpText: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_INETDESC); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + case nsCmdLine: + pvVal->vt = VT_BSTR; + bsRetVal.LoadString(IDS_INETPARAM); + pvVal->bstrVal = bsRetVal.Detach(); + return S_OK; + case nsHideNormal: + pvVal->vt = VT_BOOL; + pvVal->bVal = TRUE; + return S_OK; + } + + ::VariantClear(pvVal); + return S_FALSE; +} + + +STDMETHODIMP CClearInetCache::SetData(IUnknown* pUnk) +{ + return m_Data.Initialize(pUnk); +} + + + + + + + + +///////////////////////////////////////////////////////////////////// +// +// Property Sheet +// +///////////////////////////////////////////////////////////////////// + +HRESULT CClearInetCache::SaveChanges() +{ + int nServer = 0; + string sKeyName = ""; + string sURL; + int iItem = -1; + + // Setup Structures + LV_ITEM lv; + + lv.mask = LVIF_TEXT; + lv.iSubItem = 0; + lv.cchTextMax = MAX_PATH * 2; + + HRESULT hr; + HRESULT hrRet = S_OK; + + // Loop through selected items + while((iItem = m_ctlServerList.GetNextItem(iItem, LVNI_ALL)) != -1) + { + lv.iItem = iItem; + lv.iSubItem = 0; + lv.pszText = sURL.get_buffer(MAX_PATH * 2); + + if(m_ctlServerList.GetItem(&lv)) + { + // Format Registry Key + sKeyName.format("Server%.4d", nServer); + + sURL.release_buffer(); + + hr = m_Data.WriteString(sKeyName, sURL); + if(FAILED(hr)) hrRet = hr; + + } + + nServer++; + + } + + for(nServer = nServer; nServer < m_nLoadedURLs; nServer++) + { + // Format Registry Key + sKeyName.format("Server%.4d", nServer); + + m_Data.DeleteProperty(sKeyName); + } + + + // Save Clear All State + hr = m_Data.WriteInt("Clear All", IsDlgButtonChecked(IDC_CLEARALLSERVERS)); + if(FAILED(hr)) hrRet = hr; + + // Save Cookie State + hr = m_Data.WriteInt("Clear Cookies", IsDlgButtonChecked(IDC_COOKIES)); + if(FAILED(hr)) hrRet = hr; + + return hrRet; +} + +LRESULT CClearInetCache::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + LoadFlags(); + + + m_ctlServerList = GetDlgItem(IDC_SERVERURLLIST); + + // Create the small icon image list. + m_ImageListSmall.Create(16, + 16, + ILC_MASK, // list does not include masks + 1, + 0 ); // list won't grow + + + // Set Mask color for Image Lists + m_ImageListSmall.SetBkColor(::GetSysColor(COLOR_WINDOW)); + + + // Load the icon and add to the image list. + if(m_ImageListSmall.AddIcon(::LoadIcon(_Module.m_hInstResource, + MAKEINTRESOURCE(IDI_INETSHORTCUT))) == -1) + return false; + + + // Associate the image lists with the list view control. + m_ctlServerList.SetImageList(m_ImageListSmall, LVSIL_SMALL); + + + // Fill List Control + string sURL; + string sKeyName = ""; + int nCnt = 0; + + // Format Key Name + sKeyName.format("Server%.4d", nCnt); + + while((sURL = m_Data.GetString(sKeyName, NO_KEY)) != NO_KEY) + { + m_ctlServerList.InsertItem(nCnt, sURL, 0); + + // Make sure each one has a unique lParam + m_dwIDCounter++; + nCnt++; + + // Format Key Name + sKeyName.format("Server%.4d", nCnt); + } + + m_nLoadedURLs = nCnt + 1; + + CheckDlgButton(IDC_CLEARALLSERVERS, m_bClearAll); + CheckDlgButton(IDC_COOKIES, m_bCookies); + UpdateClearAll(); + + m_hIconNew = ::LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_NEW)); + m_hIconDel = ::LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_DEL)); + + CButton btn = GetDlgItem(IDC_NEWURL); + btn.SetIcon(m_hIconNew); + + btn = GetDlgItem(IDC_DELETE); + btn.SetIcon(m_hIconDel); + + return false; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE + +} + + + +LRESULT CClearInetCache::OnURLListEndLabelEdit(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pnmh; + + // Only Change if there is Text + if(pDispInfo->item.pszText != NULL) + { + // Used in Checking URL + DWORD dwProtocol = 0; + string sTemp1 = ""; + string sTemp2 = ""; + INTERNET_PORT inetPort; + + + // Do a Check on URL + if(ParseURL(pDispInfo->item.pszText, dwProtocol, sTemp1, sTemp2, inetPort)) + { + // Set Item text + m_ctlServerList.SetItem(&(pDispInfo->item)); + SetDirty(true); + } + else + { + // Try adding http:// + string sNewURL(_T("http://")); + sNewURL += pDispInfo->item.pszText; + if(ParseURL(sNewURL, dwProtocol, sTemp1, sTemp2, inetPort)) + { + // Set Item text + pDispInfo->item.pszText = sNewURL.get_buffer(); + m_ctlServerList.SetItem(&(pDispInfo->item)); + SetDirty(true); + } + else + { + // Give an Error Box + string sMsg; + sMsg.load_string(IDS_NOTVALIDURL); + MessageBox(sMsg, "Night Security", MB_ICONSTOP | MB_OK); + } + + } + } + + return 0; + +} + + +LRESULT CClearInetCache::OnURLListKeyDown(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + LV_KEYDOWN* pLVKeyDow = (LV_KEYDOWN*)pnmh; + + // if F2 then Edit + if(pLVKeyDow->wVKey == VK_F2) + { + m_ctlServerList.SetFocus(); // Needs to have the Focus in order to edit + m_ctlServerList.EditLabel(m_ctlServerList.GetNextItem(-1, LVNI_ALL | LVNI_FOCUSED)); + } + + // If Delete then call Delete Handler + if(pLVKeyDow->wVKey == VK_DELETE) + OnDelete(0, 0, 0, bHandled); + + return 0; + +} + +LRESULT CClearInetCache::OnListSetFocus(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + // Disclaimer: This is a kludge fix + // SysListView32 wouldn't redraw itself when it had focus + // and app was activated + m_ctlServerList.RedrawWindow(NULL, NULL, RDW_FRAME | RDW_INVALIDATE); + return 0; +} + + +LRESULT CClearInetCache::OnNewURL(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + int iItem = -1; + string sNewURL; + sNewURL.load_string(IDS_NEWURL); + + // Insert Item + if((iItem = m_ctlServerList.InsertItem(0, sNewURL, 0)) != -1) + { + m_dwIDCounter++; + + // Open for Editing + m_ctlServerList.SetFocus(); // Needs to have the Focus in order to edit + m_ctlServerList.EditLabel(iItem); + + SetDirty(true); + + } + + return 0; + +} + +LRESULT CClearInetCache::OnDelete(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + int iItem = -1; + + LV_ITEM lv; + + lv.mask = LVIF_TEXT; + lv.iSubItem = 0; + + // Loop through selected items + while((iItem = m_ctlServerList.GetNextItem(-1, LVNI_ALL | LVNI_SELECTED)) != -1) + { + // Take it out of List Box + m_ctlServerList.DeleteItem(iItem); + SetDirty(true); + } + + return 0; + +} + + +LRESULT CClearInetCache::OnClearAll(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + UpdateClearAll(); + + SetDirty(true); + + return 0; +} + +void CClearInetCache::UpdateClearAll() +{ + bool bEnable = !IsDlgButtonChecked(IDC_CLEARALLSERVERS); + + ::EnableWindow(GetDlgItem(IDC_SERVERURLLIST), bEnable); + ::EnableWindow(GetDlgItem(IDC_NEWURL), bEnable); + ::EnableWindow(GetDlgItem(IDC_DELETE), bEnable); + + SetDirty(true); +} + +void CClearInetCache::LoadFlags() +{ + m_bClearAll = m_Data.GetInt("Clear All", true) ? true : false; + m_bCookies = m_Data.GetInt("Clear Cookies", false) ? true : false; +} diff --git a/NetCmpts/ClearInetCache.h b/NetCmpts/ClearInetCache.h new file mode 100644 index 0000000..274d5d9 --- /dev/null +++ b/NetCmpts/ClearInetCache.h @@ -0,0 +1,165 @@ +// ClearInetCache.h : Declaration of the CClearInetCache + +#ifndef __CLEARINETCACHE_H_ +#define __CLEARINETCACHE_H_ + +#include "resource.h" // main symbols +#include "../Common/CmptData.h" + +#define NO_KEY _T("No Key") + +#include +using std::vector; + +#include +typedef vector StringArray; + +#include +#include + +// #include "../common/events.h" + +///////////////////////////////////////////////////////////////////////////// +// CClearInetCache + +class ATL_NO_VTABLE CClearInetCache : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl, +// public IDispEventImpl<0, CClearInetCache, &DIID_DShutdownEvents, &LIBID_NightSecShutdown, 2, 5>, + public IObjectWithSiteImpl, + + // Property Page + public IPropertyPageImpl, + public CDialogImpl, + public CContextHelp + +{ +public: + CClearInetCache() + { + m_dwTitleID = IDS_TITLEClearInetCacheProps; + m_dwHelpFileID = IDS_HELPFILEClearInetCacheProps; + m_dwDocStringID = IDS_DOCSTRINGClearInetCacheProps; + +// m_bCancel = false; + m_bClearAll = true; + m_bCookies = false; + m_bInitialized = false; + m_dwIDCounter = 0; + m_nLoadedURLs = 0; + } + + + +DECLARE_REGISTRY_RESOURCEID(IDR_CLEARINETCACHE) + +BEGIN_COM_MAP(CClearInetCache) + COM_INTERFACE_ENTRY(ISecureShutdownWin) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(ISupportErrorInfo) + COM_INTERFACE_ENTRY(IObjectWithSite) + COM_INTERFACE_ENTRY(IPropertyPage) +END_COM_MAP() + +/*BEGIN_SINK_MAP(CClearInetCache) + SINK_ENTRY_EX(0, DIID_DShutdownEvents, 1, OnCancel) +END_SINK_MAP()*/ + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// ISecureShutdownWin +public: + STDMETHOD(get_Info)(/*[in]*/ NightSecInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + STDMETHOD(DoShutdown)(/*[in]*/ long hParent, /*[in]*/ long lMode); + STDMETHOD(SetData)(/*[in]*/ IUnknown* pUnk); + +// Events +// protected: +// STDMETHOD(OnCancel)() +// { m_bCancel = true; return S_OK; }; + +// Helpers +protected: + bool IsDeleteableURL(const string& sURL); + int GetServersToDelete(); + StringArray m_asServerURLs; + bool m_bClearAll; + bool m_bInitialized; + + +/////////////////////////////////////////////////////////////////// +// Property Sheet Stuff + +public: + + enum {IDD = IDD_CLEARINETCACHE}; + + BEGIN_MSG_MAP(CClearInetCache) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + NOTIFY_HANDLER(IDC_SERVERURLLIST, LVN_ENDLABELEDIT, OnURLListEndLabelEdit) + NOTIFY_HANDLER(IDC_SERVERURLLIST, LVN_KEYDOWN, OnURLListKeyDown) + NOTIFY_HANDLER(IDC_SERVERURLLIST, NM_SETFOCUS, OnListSetFocus) + COMMAND_HANDLER(IDC_NEWURL, BN_CLICKED, OnNewURL) + COMMAND_HANDLER(IDC_DELETE, BN_CLICKED, OnDelete) + COMMAND_HANDLER(IDC_CLEARALLSERVERS, BN_CLICKED, OnClearAll) + CHAIN_MSG_MAP(IPropertyPageImpl) + CHAIN_MSG_MAP(CContextHelp) + END_MSG_MAP() + + BEGIN_HELP_MAP("nightsec.hlp") + HELP_ID(IDC_SERVERURLLIST, 4016) + HELP_ID(IDC_COOKIES, 4015) + HELP_ID(IDC_CLEARALLSERVERS, 4014) + HELP_ID(IDC_NEWURL, 4018) + HELP_ID(IDC_DELETE, 4017) + END_HELP_MAP + + + +// Property Sheet Messages + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnURLListEndLabelEdit(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnURLListKeyDown(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnListSetFocus(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnNewURL(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnDelete(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnClearAll(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + +protected: + HRESULT SaveChanges(); + void UpdateClearAll(); + + +// Data +protected: +// bool m_bCancel; // Called from Cancel Event + + int m_nLoadedURLs; + void LoadFlags(); + bool m_bCookies; + HICON m_hIconDel; + HICON m_hIconNew; + CPropertyBag m_Data; + CListViewCtrl m_ctlServerList; + CImageList m_ImageListSmall; + DWORD m_dwIDCounter; + + + public: + STDMETHOD(Apply)(void) + { + ATLTRACE(_T("CClearInetCache::Apply\n")); + + HRESULT hr = SaveChanges(); + + m_bDirty = FAILED(hr); + return hr; + } + +}; + + +#endif //__CLEARINETCACHE_H_ diff --git a/NetCmpts/ClearInetCache.rgs b/NetCmpts/ClearInetCache.rgs new file mode 100644 index 0000000..7c37a81 --- /dev/null +++ b/NetCmpts/ClearInetCache.rgs @@ -0,0 +1,42 @@ +HKCR +{ + NightSecurity.ClearInetCache.25 = s 'ClearInetCache Class' + { + CLSID = s '{34F1169B-F275-11d2-A589-0020182B97FC}' + } + NightSecurity.ClearInetCache = s 'ClearInetCache Class' + { + CurVer = s 'NightSecurity.ClearInetCache.25' + CLSID = s '{34F1169B-F275-11d2-A589-0020182B97FC}' + } + NoRemove CLSID + { + ForceRemove {34F1169B-F275-11d2-A589-0020182B97FC} = s 'ClearInetCache Class' + { + ProgID = s 'NightSecurity.ClearInetCache.25' + VersionIndependentProgID = s 'NightSecurity.ClearInetCache' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + } + } +} + +HKEY_LOCAL_MACHINE +{ + NoRemove 'Software' + { + NoRemove 'Heavenly Helpers' + { + NoRemove 'Night Security' + { + NoRemove 'Installed Components' + { + 'NightSecurity.ClearInetCache' + } + } + } + } +} \ No newline at end of file diff --git a/NetCmpts/CmptIfaces.h b/NetCmpts/CmptIfaces.h new file mode 100644 index 0000000..7453146 --- /dev/null +++ b/NetCmpts/CmptIfaces.h @@ -0,0 +1,780 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Wed Mar 01 12:32:24 2000 + */ +/* Compiler settings for E:\Projects\NightSec\Interfaces\CmptIfaces.idl: + Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __CmptIfaces_h__ +#define __CmptIfaces_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __ISecureShutdownWin_FWD_DEFINED__ +#define __ISecureShutdownWin_FWD_DEFINED__ +typedef interface ISecureShutdownWin ISecureShutdownWin; +#endif /* __ISecureShutdownWin_FWD_DEFINED__ */ + + +#ifndef __ISecureShutdownDOS_FWD_DEFINED__ +#define __ISecureShutdownDOS_FWD_DEFINED__ +typedef interface ISecureShutdownDOS ISecureShutdownDOS; +#endif /* __ISecureShutdownDOS_FWD_DEFINED__ */ + + +#ifndef __INightSecError_FWD_DEFINED__ +#define __INightSecError_FWD_DEFINED__ +typedef interface INightSecError INightSecError; +#endif /* __INightSecError_FWD_DEFINED__ */ + + +#ifndef __INightSecErrorFix_FWD_DEFINED__ +#define __INightSecErrorFix_FWD_DEFINED__ +typedef interface INightSecErrorFix INightSecErrorFix; +#endif /* __INightSecErrorFix_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +/* interface __MIDL_itf_CmptIfaces_0000 */ +/* [local] */ + +typedef /* [helpstring][uuid][v1_enum] */ +enum NightSecInfo + { nsName = 0, + nsCmdLine = nsName + 1, + nsHelpText = nsCmdLine + 1, + nsForceShow = nsHelpText + 1, + nsHideNormal = nsForceShow + 1, + nsCopyAble = nsHideNormal + 1, + nsHelpFile = nsCopyAble + 1, + nsHelpTopic = nsHelpFile + 1 + } NightSecInfo; + +/* [helpstring] */ #define nsNoPrompt ( 0x2 ) + +/* [helpstring] */ #define nsQuiet ( 0x4 ) + + + +extern RPC_IF_HANDLE __MIDL_itf_CmptIfaces_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_CmptIfaces_0000_v0_0_s_ifspec; + +#ifndef __ISecureShutdownWin_INTERFACE_DEFINED__ +#define __ISecureShutdownWin_INTERFACE_DEFINED__ + +/* interface ISecureShutdownWin */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISecureShutdownWin; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("34F11691-F275-11d2-A589-0020182B97FC") + ISecureShutdownWin : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE DoShutdown( + /* [in] */ long hParent, + /* [in] */ long Mode) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetData( + /* [in] */ IUnknown __RPC_FAR *pUnk) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Info( + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISecureShutdownWinVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + ISecureShutdownWin __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + ISecureShutdownWin __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + ISecureShutdownWin __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *DoShutdown )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ long hParent, + /* [in] */ long Mode); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SetData )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Info )( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + END_INTERFACE + } ISecureShutdownWinVtbl; + + interface ISecureShutdownWin + { + CONST_VTBL struct ISecureShutdownWinVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISecureShutdownWin_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISecureShutdownWin_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISecureShutdownWin_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISecureShutdownWin_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISecureShutdownWin_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISecureShutdownWin_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISecureShutdownWin_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISecureShutdownWin_DoShutdown(This,hParent,Mode) \ + (This)->lpVtbl -> DoShutdown(This,hParent,Mode) + +#define ISecureShutdownWin_SetData(This,pUnk) \ + (This)->lpVtbl -> SetData(This,pUnk) + +#define ISecureShutdownWin_get_Info(This,nsItem,pvVal) \ + (This)->lpVtbl -> get_Info(This,nsItem,pvVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownWin_DoShutdown_Proxy( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ long hParent, + /* [in] */ long Mode); + + +void __RPC_STUB ISecureShutdownWin_DoShutdown_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownWin_SetData_Proxy( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + +void __RPC_STUB ISecureShutdownWin_SetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ISecureShutdownWin_get_Info_Proxy( + ISecureShutdownWin __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + +void __RPC_STUB ISecureShutdownWin_get_Info_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISecureShutdownWin_INTERFACE_DEFINED__ */ + + +#ifndef __ISecureShutdownDOS_INTERFACE_DEFINED__ +#define __ISecureShutdownDOS_INTERFACE_DEFINED__ + +/* interface ISecureShutdownDOS */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISecureShutdownDOS; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("34F11692-F275-11d2-A589-0020182B97FC") + ISecureShutdownDOS : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetBatchText( + /* [retval][out] */ BSTR __RPC_FAR *psText) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetData( + /* [in] */ IUnknown __RPC_FAR *pUnk) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Info( + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISecureShutdownDOSVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + ISecureShutdownDOS __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + ISecureShutdownDOS __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfoCount )( + ISecureShutdownDOS __RPC_FAR * This, + /* [out] */ UINT __RPC_FAR *pctinfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetTypeInfo )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetIDsOfNames )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID __RPC_FAR *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Invoke )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams, + /* [out] */ VARIANT __RPC_FAR *pVarResult, + /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo, + /* [out] */ UINT __RPC_FAR *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetBatchText )( + ISecureShutdownDOS __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *psText); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SetData )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Info )( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + END_INTERFACE + } ISecureShutdownDOSVtbl; + + interface ISecureShutdownDOS + { + CONST_VTBL struct ISecureShutdownDOSVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISecureShutdownDOS_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISecureShutdownDOS_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISecureShutdownDOS_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISecureShutdownDOS_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISecureShutdownDOS_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISecureShutdownDOS_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISecureShutdownDOS_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISecureShutdownDOS_GetBatchText(This,psText) \ + (This)->lpVtbl -> GetBatchText(This,psText) + +#define ISecureShutdownDOS_SetData(This,pUnk) \ + (This)->lpVtbl -> SetData(This,pUnk) + +#define ISecureShutdownDOS_get_Info(This,nsItem,pvVal) \ + (This)->lpVtbl -> get_Info(This,nsItem,pvVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownDOS_GetBatchText_Proxy( + ISecureShutdownDOS __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *psText); + + +void __RPC_STUB ISecureShutdownDOS_GetBatchText_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISecureShutdownDOS_SetData_Proxy( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ IUnknown __RPC_FAR *pUnk); + + +void __RPC_STUB ISecureShutdownDOS_SetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ISecureShutdownDOS_get_Info_Proxy( + ISecureShutdownDOS __RPC_FAR * This, + /* [in] */ NightSecInfo nsItem, + /* [retval][out] */ VARIANT __RPC_FAR *pvVal); + + +void __RPC_STUB ISecureShutdownDOS_get_Info_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISecureShutdownDOS_INTERFACE_DEFINED__ */ + + +#ifndef __INightSecError_INTERFACE_DEFINED__ +#define __INightSecError_INTERFACE_DEFINED__ + +/* interface INightSecError */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_INightSecError; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("409C4B09-9310-11d3-BFC1-0020182B97FC") + INightSecError : public IUnknown + { + public: + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Err( + /* [retval][out] */ HRESULT __RPC_FAR *pbsRet) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Description( + /* [retval][out] */ BSTR __RPC_FAR *pbsRet) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_HelpFile( + /* [retval][out] */ BSTR __RPC_FAR *pbsRet) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_HelpContext( + /* [retval][out] */ long __RPC_FAR *plRet) = 0; + + }; + +#else /* C style interface */ + + typedef struct INightSecErrorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + INightSecError __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + INightSecError __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + INightSecError __RPC_FAR * This); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Err )( + INightSecError __RPC_FAR * This, + /* [retval][out] */ HRESULT __RPC_FAR *pbsRet); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Description )( + INightSecError __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pbsRet); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_HelpFile )( + INightSecError __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pbsRet); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_HelpContext )( + INightSecError __RPC_FAR * This, + /* [retval][out] */ long __RPC_FAR *plRet); + + END_INTERFACE + } INightSecErrorVtbl; + + interface INightSecError + { + CONST_VTBL struct INightSecErrorVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define INightSecError_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define INightSecError_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define INightSecError_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define INightSecError_get_Err(This,pbsRet) \ + (This)->lpVtbl -> get_Err(This,pbsRet) + +#define INightSecError_get_Description(This,pbsRet) \ + (This)->lpVtbl -> get_Description(This,pbsRet) + +#define INightSecError_get_HelpFile(This,pbsRet) \ + (This)->lpVtbl -> get_HelpFile(This,pbsRet) + +#define INightSecError_get_HelpContext(This,plRet) \ + (This)->lpVtbl -> get_HelpContext(This,plRet) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecError_get_Err_Proxy( + INightSecError __RPC_FAR * This, + /* [retval][out] */ HRESULT __RPC_FAR *pbsRet); + + +void __RPC_STUB INightSecError_get_Err_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecError_get_Description_Proxy( + INightSecError __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pbsRet); + + +void __RPC_STUB INightSecError_get_Description_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecError_get_HelpFile_Proxy( + INightSecError __RPC_FAR * This, + /* [retval][out] */ BSTR __RPC_FAR *pbsRet); + + +void __RPC_STUB INightSecError_get_HelpFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecError_get_HelpContext_Proxy( + INightSecError __RPC_FAR * This, + /* [retval][out] */ long __RPC_FAR *plRet); + + +void __RPC_STUB INightSecError_get_HelpContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __INightSecError_INTERFACE_DEFINED__ */ + + +#ifndef __INightSecErrorFix_INTERFACE_DEFINED__ +#define __INightSecErrorFix_INTERFACE_DEFINED__ + +/* interface INightSecErrorFix */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_INightSecErrorFix; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("409C4B04-9310-11d3-BFC1-0020182B97FC") + INightSecErrorFix : public IUnknown + { + public: + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Fixable( + /* [retval][out] */ BOOL __RPC_FAR *pbRet) = 0; + + virtual /* [id] */ HRESULT STDMETHODCALLTYPE Fix( void) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Retryable( + /* [retval][out] */ BOOL __RPC_FAR *pbRet) = 0; + + virtual /* [id] */ HRESULT STDMETHODCALLTYPE Retry( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct INightSecErrorFixVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + INightSecErrorFix __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + INightSecErrorFix __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + INightSecErrorFix __RPC_FAR * This); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Fixable )( + INightSecErrorFix __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + /* [id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Fix )( + INightSecErrorFix __RPC_FAR * This); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *get_Retryable )( + INightSecErrorFix __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + /* [id] */ HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Retry )( + INightSecErrorFix __RPC_FAR * This); + + END_INTERFACE + } INightSecErrorFixVtbl; + + interface INightSecErrorFix + { + CONST_VTBL struct INightSecErrorFixVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define INightSecErrorFix_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define INightSecErrorFix_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define INightSecErrorFix_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define INightSecErrorFix_get_Fixable(This,pbRet) \ + (This)->lpVtbl -> get_Fixable(This,pbRet) + +#define INightSecErrorFix_Fix(This) \ + (This)->lpVtbl -> Fix(This) + +#define INightSecErrorFix_get_Retryable(This,pbRet) \ + (This)->lpVtbl -> get_Retryable(This,pbRet) + +#define INightSecErrorFix_Retry(This) \ + (This)->lpVtbl -> Retry(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecErrorFix_get_Fixable_Proxy( + INightSecErrorFix __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + +void __RPC_STUB INightSecErrorFix_get_Fixable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id] */ HRESULT STDMETHODCALLTYPE INightSecErrorFix_Fix_Proxy( + INightSecErrorFix __RPC_FAR * This); + + +void __RPC_STUB INightSecErrorFix_Fix_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE INightSecErrorFix_get_Retryable_Proxy( + INightSecErrorFix __RPC_FAR * This, + /* [retval][out] */ BOOL __RPC_FAR *pbRet); + + +void __RPC_STUB INightSecErrorFix_get_Retryable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id] */ HRESULT STDMETHODCALLTYPE INightSecErrorFix_Retry_Proxy( + INightSecErrorFix __RPC_FAR * This); + + +void __RPC_STUB INightSecErrorFix_Retry_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __INightSecErrorFix_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( unsigned long __RPC_FAR *, unsigned long , BSTR __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER BSTR_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER BSTR_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * ); +void __RPC_USER BSTR_UserFree( unsigned long __RPC_FAR *, BSTR __RPC_FAR * ); + +unsigned long __RPC_USER VARIANT_UserSize( unsigned long __RPC_FAR *, unsigned long , VARIANT __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER VARIANT_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER VARIANT_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, VARIANT __RPC_FAR * ); +void __RPC_USER VARIANT_UserFree( unsigned long __RPC_FAR *, VARIANT __RPC_FAR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/NetCmpts/NetCmpts.cpp b/NetCmpts/NetCmpts.cpp new file mode 100644 index 0000000..56f00a2 --- /dev/null +++ b/NetCmpts/NetCmpts.cpp @@ -0,0 +1,100 @@ +// NetCmpts.cpp : Implementation of DLL Exports. + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f NetCmptsps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include +#include "NetCmpts.h" + +#include "NetCmpts_i.c" +#include "../interfaces/CmptIfaces_i.c" + +#include "ClearInetCache.h" + +#include "..\Common\Defines.h" + +CComModule _Module; + +BEGIN_OBJECT_MAP(ObjectMap) + OBJECT_ENTRY(CLSID_ClearInetCache, CClearInetCache) +END_OBJECT_MAP() + +///////////////////////////////////////////////////////////////////////////// +// DLL Entry Point + +extern "C" +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +{ + if (dwReason == DLL_PROCESS_ATTACH) + { + _Module.Init(ObjectMap, hInstance, &LIBID_NightSecNetCmpts); + DisableThreadLibraryCalls(hInstance); + } + else if (dwReason == DLL_PROCESS_DETACH) + _Module.Term(); + return TRUE; // ok +} + +///////////////////////////////////////////////////////////////////////////// +// Used to determine whether the DLL can be unloaded by OLE + +STDAPI DllCanUnloadNow(void) +{ + return (_Module.GetLockCount()==0) ? S_OK : S_FALSE; +} + +///////////////////////////////////////////////////////////////////////////// +// Returns a class factory to create an object of the requested type + +STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) +{ + return _Module.GetClassObject(rclsid, riid, ppv); +} + +///////////////////////////////////////////////////////////////////////////// +// DllRegisterServer - Adds entries to the system registry + +STDAPI DllRegisterServer(void) +{ + // <<<< Addition + // InstallShield Doesn't call this for the current thread + // And if we're using the _ATL_DLL (COM Based) we need this + HRESULT hr = CoInitialize(NULL); + // End >>>> + + // registers object, typelib and all interfaces in typelib + return _Module.RegisterServer(TRUE); + + // <<<< Addition + if(SUCCEEDED(hr)) + CoUninitialize(); + + return hr; + // End >>>> + +} + +///////////////////////////////////////////////////////////////////////////// +// DllUnregisterServer - Removes entries from the system registry + +STDAPI DllUnregisterServer(void) +{ + // <<<< Addition + HRESULT hr = CoInitialize(NULL); + // End >>>> + + return _Module.UnregisterServer(TRUE); + + // <<<< Addition + if(SUCCEEDED(hr)) + CoUninitialize(); + + return S_OK; + // End >>>> +} + + diff --git a/NetCmpts/NetCmpts.def b/NetCmpts/NetCmpts.def new file mode 100644 index 0000000..4d6bb00 --- /dev/null +++ b/NetCmpts/NetCmpts.def @@ -0,0 +1,9 @@ +; NetCmpts.def : Declares the module parameters. + +LIBRARY "NetCmpts.DLL" + +EXPORTS + DllCanUnloadNow @1 PRIVATE + DllGetClassObject @2 PRIVATE + DllRegisterServer @3 PRIVATE + DllUnregisterServer @4 PRIVATE diff --git a/NetCmpts/NetCmpts.dsp b/NetCmpts/NetCmpts.dsp new file mode 100644 index 0000000..f77f50c --- /dev/null +++ b/NetCmpts/NetCmpts.dsp @@ -0,0 +1,417 @@ +# Microsoft Developer Studio Project File - Name="NetCmpts" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=NetCmpts - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "NetCmpts.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "NetCmpts.mak" CFG="NetCmpts - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "NetCmpts - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "NetCmpts - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "NetCmpts - Win32 Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "NetCmpts - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "NetCmpts - Win32 Unicode Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "NetCmpts - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "NetCmpts - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib /nologo /base:"0x67850000" /subsystem:windows /dll /debug /machine:I386 /out:"../Debug/NetCmpts.dll " /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\Debug +TargetPath=\Projects\NightSec\Debug\NetCmpts.dll +InputPath=\Projects\NightSec\Debug\NetCmpts.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x67850000" /subsystem:windows /dll /debug /machine:I386 /out:"../Debug/NetCmpts.dll" /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\DebugU +TargetPath=\Projects\NightSec\Debug\NetCmpts.dll +InputPath=\Projects\NightSec\Debug\NetCmpts.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinSize" +# PROP BASE Intermediate_Dir "ReleaseMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinSize" +# PROP Intermediate_Dir "ReleaseMinSize" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib /nologo /base:"0x67850000" /subsystem:windows /dll /machine:I386 /def:".\NetCmpts.def" /out:"../Release/NetCmpts.dll" /OPT:NOWIN98 +# SUBTRACT LINK32 /pdb:none +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinSize +TargetPath=\Projects\NightSec\Release\NetCmpts.dll +InputPath=\Projects\NightSec\Release\NetCmpts.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinDependency" +# PROP BASE Intermediate_Dir "ReleaseMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinDependency" +# PROP Intermediate_Dir "ReleaseMinDependency" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib /nologo /base:"0x67850000" /subsystem:windows /dll /machine:I386 /out:"../Release/NetCmpts.dll" +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinDependency +TargetPath=\Projects\NightSec\Release\NetCmpts.dll +InputPath=\Projects\NightSec\Release\NetCmpts.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Unicode Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinSize" +# PROP BASE Intermediate_Dir "ReleaseUMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinSize" +# PROP Intermediate_Dir "ReleaseUMinSize" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x67850000" /subsystem:windows /dll /machine:I386 /out:"../Release/NetCmpts.dll" +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinSize +TargetPath=\Projects\NightSec\Release\NetCmpts.dll +InputPath=\Projects\NightSec\Release\NetCmpts.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Unicode Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinDependency" +# PROP BASE Intermediate_Dir "ReleaseUMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinDependency" +# PROP Intermediate_Dir "ReleaseUMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x67850000" /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\NetCmpts.dll +InputPath=.\ReleaseUMinDependency\NetCmpts.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "NetCmpts - Win32 Debug" +# Name "NetCmpts - Win32 Unicode Debug" +# Name "NetCmpts - Win32 Release MinSize" +# Name "NetCmpts - Win32 Release MinDependency" +# Name "NetCmpts - Win32 Unicode Release MinSize" +# Name "NetCmpts - Win32 Unicode Release MinDependency" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\ClearInetCache.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\CmptData.cpp +# End Source File +# Begin Source File + +SOURCE=..\Interfaces\CmptIfaces.idl + +!IF "$(CFG)" == "NetCmpts - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Unicode Debug" + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Release MinSize" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Release MinDependency" + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Unicode Release MinSize" + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Unicode Release MinDependency" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\NetCmpts.cpp +# End Source File +# Begin Source File + +SOURCE=.\NetCmpts.def + +!IF "$(CFG)" == "NetCmpts - Win32 Debug" + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Unicode Debug" + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Release MinSize" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Release MinDependency" + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Unicode Release MinSize" + +!ELSEIF "$(CFG)" == "NetCmpts - Win32 Unicode Release MinDependency" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\NetCmpts.idl +# ADD MTL /tlb ".\NetCmpts.tlb" /h "NetCmpts.h" /iid "NetCmpts_i.c" /Oicf +# End Source File +# Begin Source File + +SOURCE=.\NetCmpts.rc +# End Source File +# Begin Source File + +SOURCE=.\parseurl.cpp +# End Source File +# Begin Source File + +SOURCE=.\ProgressDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\ClearInetCache.h +# End Source File +# Begin Source File + +SOURCE=..\Common\CmptData.h +# End Source File +# Begin Source File + +SOURCE=.\parseurl.h +# End Source File +# Begin Source File + +SOURCE=.\ProgressDlg.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\ClearInetCache.rgs +# End Source File +# Begin Source File + +SOURCE=.\res\ico00003.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ico00005.ico +# End Source File +# Begin Source File + +SOURCE=.\res\icon1.ico +# End Source File +# Begin Source File + +SOURCE=.\res\inetshor.ico +# End Source File +# Begin Source File + +SOURCE=.\res\new1.ico +# End Source File +# Begin Source File + +SOURCE=".\res\Night Security Worker.ico" +# End Source File +# End Group +# End Target +# End Project diff --git a/NetCmpts/NetCmpts.h b/NetCmpts/NetCmpts.h new file mode 100644 index 0000000..7c743bd --- /dev/null +++ b/NetCmpts/NetCmpts.h @@ -0,0 +1,78 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Sun Nov 07 03:01:57 1999 + */ +/* Compiler settings for E:\Projects\NightSec\NetCmpts\NetCmpts.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __NetCmpts_h__ +#define __NetCmpts_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +#ifndef __ClearInetCache_FWD_DEFINED__ +#define __ClearInetCache_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class ClearInetCache ClearInetCache; +#else +typedef struct ClearInetCache ClearInetCache; +#endif /* __cplusplus */ + +#endif /* __ClearInetCache_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "cmptifaces.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + + +#ifndef __NightSecNetCmpts_LIBRARY_DEFINED__ +#define __NightSecNetCmpts_LIBRARY_DEFINED__ + +/* library NightSecNetCmpts */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_NightSecNetCmpts; + +EXTERN_C const CLSID CLSID_ClearInetCache; + +#ifdef __cplusplus + +class DECLSPEC_UUID("34F1169B-F275-11d2-A589-0020182B97FC") +ClearInetCache; +#endif +#endif /* __NightSecNetCmpts_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/NetCmpts/NetCmpts.idl b/NetCmpts/NetCmpts.idl new file mode 100644 index 0000000..e27c5ab --- /dev/null +++ b/NetCmpts/NetCmpts.idl @@ -0,0 +1,30 @@ +// NetCmpts.idl : IDL source for NetCmpts.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (NetCmpts.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + +import "../interfaces/cmptifaces.idl"; + +[ + uuid(34F1169A-F275-11d2-A589-0020182B97FC), + version(2.5), + helpstring("NightSec Net Components 2.5") +] +library NightSecNetCmpts +{ + importlib("stdole32.tlb"); + + [ + uuid(34F1169B-F275-11d2-A589-0020182B97FC), + helpstring("Clears the Temporary Internet Files") + ] + coclass ClearInetCache + { + interface ISecureShutdownWin; + }; + +}; diff --git a/NetCmpts/NetCmpts.plg b/NetCmpts/NetCmpts.plg new file mode 100644 index 0000000..90c7215 --- /dev/null +++ b/NetCmpts/NetCmpts.plg @@ -0,0 +1,16 @@ + + +
+

Build Log

+

+--------------------Configuration: NetCmpts - Win32 Release MinSize-------------------- +

+

Command Lines

+ + + +

Results

+NetCmpts.dll - 0 error(s), 0 warning(s) +
+ + diff --git a/NetCmpts/NetCmpts.rc b/NetCmpts/NetCmpts.rc new file mode 100644 index 0000000..285bee1 --- /dev/null +++ b/NetCmpts/NetCmpts.rc @@ -0,0 +1,223 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.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 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "1 TYPELIB ""NetCmpts.tlb""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 2,5,0,1 + PRODUCTVERSION 2,5,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Network Components for Night Security Program\0" + VALUE "CompanyName", "The Family (Thailand)\0" + VALUE "FileDescription", "Night Security (Network Component Module)\0" + VALUE "FileVersion", "2, 5, 0, 1\0" + VALUE "InternalName", "Night Security NetCmpts\0" + VALUE "LegalCopyright", "Copyright (C) 1998 - 1999, The Family (Thailand)\0" + VALUE "LegalTrademarks", "\0" + VALUE "OLESelfRegister", "\0" + VALUE "OriginalFilename", "netcmpts.dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "Night Security 2.5\0" + VALUE "ProductVersion", "2, 5, 0, 1\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_CLEARINETCACHE DIALOGEX 0, 0, 200, 115 +STYLE WS_CHILD +EXSTYLE WS_EX_APPWINDOW +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "List1",IDC_SERVERURLLIST,"SysListView32",LVS_LIST | + LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_EDITLABELS | + WS_BORDER | WS_TABSTOP,4,9,170,55,WS_EX_CLIENTEDGE + PUSHBUTTON "&New URL",IDC_NEWURL,178,10,16,15,BS_ICON | BS_CENTER | + BS_VCENTER + PUSHBUTTON "&Delete",IDC_DELETE,178,27,16,15,BS_ICON | BS_CENTER | + BS_VCENTER + CONTROL "&Clear All",IDC_CLEARALLSERVERS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,134,66,41,10 + GROUPBOX "&Servers to delete from cache: ",IDC_STATIC,0,0,199,114 + CONTROL "Coo&kies",IDC_COOKIES,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,87,66,41,10 + LTEXT "Type the full URL of the server or website you want to clear (eg: http://ntserver). You can also add a URL of any object on the server.", + IDC_STATIC,33,85,164,27 + GROUPBOX "Note: ",IDC_STATIC,0,75,199,39 + ICON IDI_NOTE,IDC_STATIC,5,86,21,20 +END + +IDD_PROGRESS DIALOG DISCARDABLE 0, 0, 250, 84 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Clearing Internet Cache" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Cancel",IDCANCEL,201,63,42,14 + CONTROL "Progress2",IDC_PROGRESS2,"msctls_progress32",0x0,11,63, + 186,8 + CONTROL "Static",IDC_FILENAME,"Static",SS_LEFTNOWORDWRAP | + WS_GROUP,11,49,232,8 + ICON IDI_DELETING,IDC_STATIC,11,15,20,20 + LTEXT "Clearing files from cache...",IDC_STATIC,44,21,84,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "res\\Night Security Worker.ico" +IDI_DEL ICON DISCARDABLE "res\\new1.ico" +IDI_DELETING ICON DISCARDABLE "res\\inetshor.ico" +IDI_INETSHORTCUT ICON DISCARDABLE "res\\icon1.ico" +IDI_NEW ICON DISCARDABLE "res\\ico00005.ico" +IDI_NOTE ICON DISCARDABLE "res\\ico00003.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// + +IDR_CLEARINETCACHE REGISTRY DISCARDABLE "ClearInetCache.rgs" + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_CLEARINETCACHE, DIALOG + BEGIN + VERTGUIDE, 33 + END + + IDD_PROGRESS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 243 + TOPMARGIN, 7 + BOTTOMMARGIN, 77 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "NetCmpts" + IDS_NEWURL "http://new.server.com" + IDS_NOTVALIDURL "This isn't a valid Internet URL.\n(eg: http://www.example.com)" + IDS_INETNAME "Clear Temporary Internet Files" + IDS_INETDESC "Clears out your Temporary Internet Files folder. Used if you're on a network or don't want others to know where you've been on-line. A great space saver too." +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_INETPARAM "i" + IDS_TITLEClearInetCacheProps "Options" + IDS_HELPFILEClearInetCacheProps "nightsec.hlp" + IDS_DOCSTRINGClearInetCacheProps + "Clears out your Temporary Internet Files folder. " + IDS_EXAMPLEURL "http://example.server.com" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +1 TYPELIB "NetCmpts.tlb" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/NetCmpts/NetCmptsps.def b/NetCmpts/NetCmptsps.def new file mode 100644 index 0000000..3a9fd38 --- /dev/null +++ b/NetCmpts/NetCmptsps.def @@ -0,0 +1,11 @@ + +LIBRARY "NetCmptsPS" + +DESCRIPTION 'Proxy/Stub DLL' + +EXPORTS + DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + GetProxyDllInfo @3 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE diff --git a/NetCmpts/NetCmptsps.mk b/NetCmpts/NetCmptsps.mk new file mode 100644 index 0000000..25a13fb --- /dev/null +++ b/NetCmpts/NetCmptsps.mk @@ -0,0 +1,16 @@ + +NetCmptsps.dll: dlldata.obj NetCmpts_p.obj NetCmpts_i.obj + link /dll /out:NetCmptsps.dll /def:NetCmptsps.def /entry:DllMain dlldata.obj NetCmpts_p.obj NetCmpts_i.obj \ + kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \ + +.c.obj: + cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \ + $< + +clean: + @del NetCmptsps.dll + @del NetCmptsps.lib + @del NetCmptsps.exp + @del dlldata.obj + @del NetCmpts_p.obj + @del NetCmpts_i.obj diff --git a/NetCmpts/ProgressDlg.cpp b/NetCmpts/ProgressDlg.cpp new file mode 100644 index 0000000..f5fe559 --- /dev/null +++ b/NetCmpts/ProgressDlg.cpp @@ -0,0 +1,45 @@ +// AddingFontsDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "resource.h" +#include "ProgressDlg.h" + +///////////////////////////////////////////////////////////////////////////// +// CProgressDlg dialog + + +CProgressDlg::CProgressDlg() +{ + m_bCancel = false; +} + + +///////////////////////////////////////////////////////////////////////////// +// CProgressDlg message handlers + +LRESULT CProgressDlg::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + // Remove Window + DestroyWindow(); + + // Set Cancel Flag + m_bCancel = true; + + return 0; +} + +LRESULT CProgressDlg::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + return OnCancel(0, 0, NULL, bHandled); +} + + +LRESULT CProgressDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + m_ctlProgress = GetDlgItem(IDC_PROGRESS2); + CenterWindow(GetDesktopWindow()); + + return TRUE; // return TRUE unless you set the focus to a control +} + diff --git a/NetCmpts/ProgressDlg.h b/NetCmpts/ProgressDlg.h new file mode 100644 index 0000000..ecebaa8 --- /dev/null +++ b/NetCmpts/ProgressDlg.h @@ -0,0 +1,70 @@ +#if !defined(AFX_ADDINGFONTSDLG_H__C00DADE2_C0C4_11D1_80A7_444553540000__INCLUDED_) +#define AFX_ADDINGFONTSDLG_H__C00DADE2_C0C4_11D1_80A7_444553540000__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +// ProgressDlg.h : header file +// + +#include "resource.h" +#include +#include + +#include "../common/events.h" + +///////////////////////////////////////////////////////////////////////////// +// CProgressDlg dialog + +class CProgressDlg : + public CDialogImpl, + public IDispEventImpl<0, CProgressDlg, &DIID_DShutdownEvents, &LIBID_NightSecShutdown, 2, 5> +{ +// Construction +public: + CProgressDlg(); // standard constructor + ~CProgressDlg() + { if(IsWindow()) DestroyWindow(); } + +// Dialog Data + enum { IDD = IDD_PROGRESS }; + CProgressBarCtrl m_ctlProgress; + + +// Implementation +BEGIN_MSG_MAP(CNormalPage) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnCancel) + MESSAGE_HANDLER(WM_CLOSE, OnClose) +END_MSG_MAP() + + // Generated message map functions + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + +// Catch Cancel Events +BEGIN_SINK_MAP(CProgressDlg) + SINK_ENTRY_EX(0, DIID_DShutdownEvents, 1, OnCancelEv) +END_SINK_MAP() + +// Status + bool IsCancelled() + { return m_bCancel; } + +// Events +protected: + STDMETHOD(OnCancelEv)() + { + BOOL bHandled = TRUE; + OnCancel(0, 0, NULL, bHandled); + return S_OK; + }; + + bool m_bCancel; +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ADDINGFONTSDLG_H__C00DADE2_C0C4_11D1_80A7_444553540000__INCLUDED_) diff --git a/NetCmpts/StdAfx.cpp b/NetCmpts/StdAfx.cpp new file mode 100644 index 0000000..a5eea17 --- /dev/null +++ b/NetCmpts/StdAfx.cpp @@ -0,0 +1,12 @@ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +#ifdef _ATL_STATIC_REGISTRY +#include +#include +#endif + +#include diff --git a/NetCmpts/StdAfx.h b/NetCmpts/StdAfx.h new file mode 100644 index 0000000..d4d61e4 --- /dev/null +++ b/NetCmpts/StdAfx.h @@ -0,0 +1,38 @@ +// 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__E9C249D8_9196_11D3_BFBF_0020182B97FC__INCLUDED_) +#define AFX_STDAFX_H__E9C249D8_9196_11D3_BFBF_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define STRICT + +// Windows 95 Compatible +#undef WINVER +#define WINVER 0x0400 +#undef _WIN32_WINNT + +// Don't want our program dependant on some browser! +#undef _WIN32_IE +#define _WIN32_IE 0x0000 + +#define _ATL_APARTMENT_THREADED + +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +extern CComModule _Module; +#include +#include +#include + +#include "../common/types.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__E9C249D8_9196_11D3_BFBF_0020182B97FC__INCLUDED) diff --git a/NetCmpts/dlldata.c b/NetCmpts/dlldata.c new file mode 100644 index 0000000..6f9e7bb --- /dev/null +++ b/NetCmpts/dlldata.c @@ -0,0 +1,40 @@ +/********************************************************* + DllData file -- generated by MIDL compiler + + DO NOT ALTER THIS FILE + + This file is regenerated by MIDL on every IDL file compile. + + To completely reconstruct this file, delete it and rerun MIDL + on all the IDL files in this DLL, specifying this file for the + /dlldata command line option + +*********************************************************/ + +#define PROXY_DELEGATION + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_PROXY_FILE( CmptIfaces ) +EXTERN_PROXY_FILE( NetCmpts ) + + +PROXYFILE_LIST_START +/* Start of list */ + REFERENCE_PROXY_FILE( CmptIfaces ), + REFERENCE_PROXY_FILE( NetCmpts ), +/* End of list */ +PROXYFILE_LIST_END + + +DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID ) + +#ifdef __cplusplus +} /*extern "C" */ +#endif + +/* end of generated dlldata file */ diff --git a/NetCmpts/parseurl.cpp b/NetCmpts/parseurl.cpp new file mode 100644 index 0000000..786cc74 --- /dev/null +++ b/NetCmpts/parseurl.cpp @@ -0,0 +1,128 @@ + +#include +#include "parseurl.h" + +#ifndef _AFXDLL +#pragma comment(lib, "wininet.lib") +#endif + +///////////////////////////////////////////////////////////////////////////// +// Global Functions + +static bool _ParseURLWorker(LPCTSTR pstrURL, LPURL_COMPONENTS lpComponents, + DWORD& dwServiceType, INTERNET_PORT& nPort, DWORD dwFlags) +{ + // this function will return bogus stuff if lpComponents + // isn't set up to copy the components + ASSERT(lpComponents != NULL && pstrURL != NULL); + if (lpComponents == NULL || pstrURL == NULL) return false; + + ASSERT(lpComponents->dwHostNameLength == 0 || + lpComponents->lpszHostName != NULL); + ASSERT(lpComponents->dwUrlPathLength == 0 || + lpComponents->lpszUrlPath != NULL); + ASSERT(lpComponents->dwUserNameLength == 0 || + lpComponents->lpszUserName != NULL); + ASSERT(lpComponents->dwPasswordLength == 0 || + lpComponents->lpszPassword != NULL); + + LPTSTR pstrCanonicalizedURL; + TCHAR szCanonicalizedURL[INTERNET_MAX_URL_LENGTH]; + DWORD dwNeededLength = INTERNET_MAX_URL_LENGTH; + + bool bRetVal; + bool bMustFree = false; + DWORD dwCanonicalizeFlags = dwFlags & + (ICU_NO_ENCODE | ICU_DECODE | ICU_NO_META | + ICU_ENCODE_SPACES_ONLY | ICU_BROWSER_MODE); + DWORD dwCrackFlags = dwFlags & (ICU_ESCAPE | ICU_USERNAME); + + bRetVal = InternetCanonicalizeUrl(pstrURL, szCanonicalizedURL, &dwNeededLength, + dwCanonicalizeFlags) ? true : false; + + if(!bRetVal) + { + if(::GetLastError() != ERROR_INSUFFICIENT_BUFFER) + return false; + + pstrCanonicalizedURL = new TCHAR[dwNeededLength]; + bMustFree = true; + bRetVal = InternetCanonicalizeUrl(pstrURL, pstrCanonicalizedURL, &dwNeededLength, + dwCanonicalizeFlags) ? true : false; + if(!bRetVal) + { + delete [] pstrCanonicalizedURL; + return false; + } + } + else + pstrCanonicalizedURL = szCanonicalizedURL; + + // now that it's safely canonicalized, crack it + bRetVal = InternetCrackUrl(pstrCanonicalizedURL, 0, + dwCrackFlags, lpComponents) ? true : false; + + if (bMustFree) + delete [] pstrCanonicalizedURL; + + return bRetVal; +} + +bool ParseURLEx(LPCTSTR pstrURL, DWORD& dwServiceType, string& strServer, + string& strObject, INTERNET_PORT& nPort, string& strUsername, + string& strPassword, DWORD dwFlags/* = 0*/) +{ + ASSERT(pstrURL != NULL); + if (pstrURL == NULL) + return false; + + URL_COMPONENTS urlComponents; + memset(&urlComponents, 0, sizeof(URL_COMPONENTS)); + urlComponents.dwStructSize = sizeof(URL_COMPONENTS); + + urlComponents.dwHostNameLength = INTERNET_MAX_HOST_NAME_LENGTH; + urlComponents.lpszHostName = strServer.get_buffer(INTERNET_MAX_HOST_NAME_LENGTH + 1); + urlComponents.dwUrlPathLength = INTERNET_MAX_PATH_LENGTH; + urlComponents.lpszUrlPath = strObject.get_buffer(INTERNET_MAX_PATH_LENGTH + 1); + urlComponents.dwUserNameLength = INTERNET_MAX_USER_NAME_LENGTH; + urlComponents.lpszUserName = strUsername.get_buffer(INTERNET_MAX_USER_NAME_LENGTH + 1); + urlComponents.dwPasswordLength = INTERNET_MAX_PASSWORD_LENGTH; + urlComponents.lpszPassword = strPassword.get_buffer(INTERNET_MAX_PASSWORD_LENGTH + 1); + + bool bRetVal = _ParseURLWorker(pstrURL, &urlComponents, dwServiceType, nPort, + dwFlags); + + dwServiceType = urlComponents.nScheme; + strServer.release_buffer(); + strObject.release_buffer(); + strUsername.release_buffer(); + strPassword.release_buffer(); + + return bRetVal; +} + +bool ParseURL(LPCTSTR pstrURL, DWORD& dwServiceType, string& strServer, + string& strObject, INTERNET_PORT& nPort) +{ + ASSERT(pstrURL != NULL); + if (pstrURL == NULL) + return FALSE; + + URL_COMPONENTS urlComponents; + memset(&urlComponents, 0, sizeof(URL_COMPONENTS)); + urlComponents.dwStructSize = sizeof(URL_COMPONENTS); + + urlComponents.dwHostNameLength = INTERNET_MAX_URL_LENGTH; + urlComponents.lpszHostName = strServer.get_buffer(INTERNET_MAX_URL_LENGTH + 1); + urlComponents.dwUrlPathLength = INTERNET_MAX_URL_LENGTH; + urlComponents.lpszUrlPath = strObject.get_buffer(INTERNET_MAX_URL_LENGTH + 1); + + bool bRetVal = _ParseURLWorker(pstrURL, &urlComponents, dwServiceType, + nPort, ICU_BROWSER_MODE); + + dwServiceType = urlComponents.nScheme; + strServer.release_buffer(); + strObject.release_buffer(); + + return bRetVal; +} \ No newline at end of file diff --git a/NetCmpts/parseurl.h b/NetCmpts/parseurl.h new file mode 100644 index 0000000..cc08472 --- /dev/null +++ b/NetCmpts/parseurl.h @@ -0,0 +1,17 @@ +#ifndef __PARSEURL_H__991103 +#define __PARSEURL_H__991103 + +#include + +#ifndef _WININET_ +#include +#endif + +bool ParseURLEx(LPCTSTR pstrURL, DWORD& dwServiceType, string& strServer, + string& strObject, INTERNET_PORT& nPort, string& strUsername, + string& strPassword, DWORD dwFlags = 0); + +bool ParseURL(LPCTSTR pstrURL, DWORD& dwServiceType, string& strServer, + string& strObject, INTERNET_PORT& nPort); + +#endif //__PARSEURL_H__991103 \ No newline at end of file diff --git a/NetCmpts/res/Night Security Worker.ico b/NetCmpts/res/Night Security Worker.ico new file mode 100644 index 0000000..f1486e4 Binary files /dev/null and b/NetCmpts/res/Night Security Worker.ico differ diff --git a/NetCmpts/res/ico00003.ico b/NetCmpts/res/ico00003.ico new file mode 100644 index 0000000..9e7944d Binary files /dev/null and b/NetCmpts/res/ico00003.ico differ diff --git a/NetCmpts/res/ico00005.ico b/NetCmpts/res/ico00005.ico new file mode 100644 index 0000000..da61e8d Binary files /dev/null and b/NetCmpts/res/ico00005.ico differ diff --git a/NetCmpts/res/icon1.ico b/NetCmpts/res/icon1.ico new file mode 100644 index 0000000..53a1fd8 Binary files /dev/null and b/NetCmpts/res/icon1.ico differ diff --git a/NetCmpts/res/inetshor.ico b/NetCmpts/res/inetshor.ico new file mode 100644 index 0000000..a7c863a Binary files /dev/null and b/NetCmpts/res/inetshor.ico differ diff --git a/NetCmpts/res/new1.ico b/NetCmpts/res/new1.ico new file mode 100644 index 0000000..2027b3e Binary files /dev/null and b/NetCmpts/res/new1.ico differ diff --git a/NetCmpts/resource.h b/NetCmpts/resource.h new file mode 100644 index 0000000..a4065e0 --- /dev/null +++ b/NetCmpts/resource.h @@ -0,0 +1,41 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by NetCmpts.rc +// +#define IDS_PROJNAME 100 +#define IDS_NEWURL 102 +#define IDS_NOTVALIDURL 103 +#define IDR_CLEARINETCACHE 110 +#define IDS_INETNAME 110 +#define IDS_INETDESC 111 +#define IDS_INETPARAM 112 +#define IDS_TITLEClearInetCacheProps 113 +#define IDS_HELPFILEClearInetCacheProps 114 +#define IDS_DOCSTRINGClearInetCacheProps 115 +#define IDS_EXAMPLEURL 116 +#define IDR_MAINFRAME 128 +#define IDI_INETSHORTCUT 130 +#define IDI_NOTE 133 +#define IDI_DELETING 135 +#define IDI_NEW 201 +#define IDD_PROGRESS 201 +#define IDD_CLEARINETCACHE 202 +#define IDI_DEL 202 +#define IDC_COOKIES 211 +#define IDC_CLEARALLSERVERS 1000 +#define IDC_SERVERURLLIST 1001 +#define IDC_PROGRESS2 1004 +#define IDC_NEWURL 1005 +#define IDC_DELETE 1006 +#define IDC_FILENAME 1006 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 201 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 201 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/Night Security.dsw b/Night Security.dsw new file mode 100644 index 0000000..d087558 --- /dev/null +++ b/Night Security.dsw @@ -0,0 +1,89 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Checklist"=.\Checklist\Checklist.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "CmdLine"=.\CmdLine\CmdLine.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Interfaces"=.\Interfaces\Interfaces.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "NSCmpts"=.\NSCmpts\NSCmpts.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "NetCmpts"=.\NetCmpts\NetCmpts.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Shutdown"=.\Shutdown\Shutdown.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/Shutdown/BatchFileCmpt.cpp b/Shutdown/BatchFileCmpt.cpp new file mode 100644 index 0000000..c2823b0 --- /dev/null +++ b/Shutdown/BatchFileCmpt.cpp @@ -0,0 +1,251 @@ +// BatchFileCmpt.cpp: implementation of the CBatchFileCmpt class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "BatchFileCmpt.h" + +#include "..\Common\Defines.h" +#include "resource.h" +#include + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CBatchFileCmpt::CBatchFileCmpt() +{ + m_sName = _T("Finalize Shutdown"); + m_bBatchFile = false; +} + +CBatchFileCmpt::~CBatchFileCmpt() +{ + if(m_bBatchFile) + CallBatchFile(); +} + +////////////////////////////////////////////////////////////////// +// Calls the two helper functions below to create the batchfile +// and then run it + +HRESULT CBatchFileCmpt::DoShutdown(DWORD dwMode, HWND hWndParent) +{ + // Create the batch file + HRESULT hr = MakeBatchFile(); + + if(g_site.m_log.HasErrors()) + g_site.m_log.WaitLog(); + + // Calls the batch file from destructor + m_bBatchFile = SUCCEEDED(hr) && (hr != S_FALSE) && + (!g_site.m_dlgItems.IsCancelled()); + + return hr; +} + +////////////////////////////////////////////////////////////////// +// Creates (or modifies) the Batchfile DosMode.bat in Program Folder + +HRESULT CBatchFileCmpt::MakeBatchFile() +{ + // Get Batch File Name + string sFileName; + + sFileName.load_string(IDS_BATCHFILENAME); + sFileName = GetProgramFolder(_Module.m_hInst) + sFileName; + + // Get DOS Component Strings + string sMainBatch, sTemp; + + sTemp.load_string(IDS_STARTSECTION); + sMainBatch += sTemp; + + HRESULT hr = S_OK; + int nDOSComponents = 0; + + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + if(g_aComponents[nCnt]->GetType() == COMPONENT_DOS) + { + if(g_aComponents[nCnt]->IsEnabled()) + { + sTemp.resize(0); + hr = g_aComponents[nCnt]->GetBatchText(sTemp); + + if(SUCCEEDED(hr)) + { + sMainBatch += sTemp + "\r\n"; + nDOSComponents++; + } + + } + + } + + } + + // If there's no DOS Components then don't do a shutdown + if(!nDOSComponents) + if(!_Module.m_settings.GetInt(FORCE_SHUTDOWN_KEY, false) ? true : false) + return S_FALSE; + + sTemp.load_string(IDS_ENDSECTION); + sMainBatch += sTemp; + + // Get any additions to the batch file; + string sPreText; + string sPostText; + hr = GetCurBatchFile(sFileName, sPreText, sPostText); + + if(FAILED(hr)) + return hr; + + HANDLE fileMSModeBatch; + + // Open the File for Writing + // This time we truncate the file + // if it isn't already there then create it + if((fileMSModeBatch = CreateFile(sFileName, GENERIC_WRITE, + /*0*/FILE_SHARE_READ, NULL, OPEN_ALWAYS | TRUNCATE_EXISTING, FILE_ATTRIBUTE_NORMAL, + NULL)) == INVALID_HANDLE_VALUE) + return ReportLastError(_T("Couldn't write to the the batch file\n\n")); + + // Write All the differnet sections to the file + DWORD dwWritten = 0; + WriteFile(fileMSModeBatch, sPreText, sPreText.size(), &dwWritten, NULL); + WriteFile(fileMSModeBatch, sMainBatch, sMainBatch.size(), &dwWritten, NULL); + WriteFile(fileMSModeBatch, sPostText, sPostText.size(), &dwWritten, NULL); + + CloseHandle(fileMSModeBatch); + + return (nDOSComponents > 0) ? S_OK : S_FALSE; +} + +HRESULT CBatchFileCmpt::GetCurBatchFile(const string& sFileName, string& sPreText, string& sPostText) +{ + + // Now read in the file + HANDLE fileMSModeBatch; + + // Open the file + // if it isn't already there then create it + if((fileMSModeBatch = CreateFile(sFileName, GENERIC_READ, + 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, + NULL)) == INVALID_HANDLE_VALUE) + return ReportLastError(_T("Couldn't open the batch file\n\n")); + + // Load all our tags and search text + string sStartSearchText; sStartSearchText.load_string(IDS_STARTSEARHTEXT); + string sEndSearchText; sEndSearchText.load_string(IDS_ENDSEARCHTEXT); + string sOriginal; + + string::size_type nStartPos = string::npos; + string::size_type nEndPos = string::npos; + + // Only continue reading if there's something + if(GetFileSize(fileMSModeBatch, NULL)) + { + // Read Entire file in + DWORD dwToRead = 1024; + DWORD dwRead = 1024; + + do + { + dwToRead += dwToRead; + dwRead += dwRead; + + SetFilePointer(fileMSModeBatch, 0, NULL, FILE_BEGIN); + if(!ReadFile(fileMSModeBatch, sOriginal.get_buffer(dwToRead), dwToRead, &dwRead, NULL)) + { + HRESULT hr = ReportLastError(_T("Couldn't read from the batch file\n\n")); + CloseHandle(fileMSModeBatch); + return hr; + } + + sOriginal.release_buffer(); + sOriginal.resize(dwRead); + } + while(dwRead == dwToRead); + + + // Get the beginning of the insert + nStartPos = sOriginal.find(sStartSearchText); + // Get the beginning of the line + if(nStartPos != string::npos) + nStartPos = sOriginal.rfind(_T("\r\n"), nStartPos); + + // We found the beginning of the line skip the \r\n + if(nStartPos != string::npos) + nStartPos += 2; + // Otherwise just start from the top of the file + else + nStartPos = 0; + + // Get the Prefix Text + sPreText = sOriginal.substr(0, nStartPos); + + + + // Get the End of the Insert + nEndPos = sOriginal.find(sEndSearchText, nStartPos); + + // Try to find the next line + if(nEndPos != string::npos) + nEndPos = sOriginal.find(_T("\r\n"), nEndPos); + // Skip over that carriage return + if(nEndPos != string::npos) + nEndPos += 2; + + // If we found anything then retrieve Suffix Text + if(nEndPos != string::npos) + sPostText = sOriginal.substr(nEndPos, string::npos); + } + + // Now that we've read everything in close the file + CloseHandle(fileMSModeBatch); + + return S_OK; +} + +/////////////////////////////////////////////////////////////// +// Runs the Batchfile Created + +HRESULT CBatchFileCmpt::CallBatchFile() +{ + string sFileName; + + // Only go into DOS Mode if Windows 9x + // The different PIFs take care of that + if(::GetPlatform() == VER_PLATFORM_WIN32_NT) + sFileName.load_string(IDS_BATCHFILEPIF_NT); + else + sFileName.load_string(IDS_BATCHFILEPIF); + + + // Make Batchfile Name + string sTemp; + string sFileDir = GetProgramFolder(_Module.m_hInst); + + sFileName = sFileDir + sFileName; + +#ifndef _DEBUG + + // Run the batchfile (PIF) + if(ShellExecute(NULL, _T("open"), sFileName, NULL, sFileDir, SW_SHOWNORMAL) <= (HINSTANCE)32) + ::MessageBox(NULL, _T("Couldn't start MS-DOS mode batch file."), _T("Secure Shutdown"), MB_ICONSTOP); + +#endif // _DEBUG + + return S_OK; +} + + + +HRESULT CBatchFileCmpt::ReportLastError(string sMessage) +{ + HRESULT hr = HRESULT_FROM_WIN32(::GetLastError()); + sMessage += FormatHR(hr); + MessageBox(NULL, sMessage, _T("Secure Shutdown"), MB_ICONSTOP | MB_OK); + return hr; +} diff --git a/Shutdown/BatchFileCmpt.h b/Shutdown/BatchFileCmpt.h new file mode 100644 index 0000000..745f5fd --- /dev/null +++ b/Shutdown/BatchFileCmpt.h @@ -0,0 +1,58 @@ +////////////////////////////////////////////////////////////////// +// +// BatchFileCmpt.h: interface for the CBatchFileCmpt class. +// +// CBatchFileCmpt is a Host Implemented component only for this +// program it derives from CComponentHolder so it can fit +// into the main program array of components and then overrides +// most of the funtions. +// +// It's DoShutdown function creates the batchfile for all the DOS +// Components +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_BATCHFILECMPT_H__2DCE7A04_2D47_11D2_B2D4_0020182B97FC__INCLUDED_) +#define AFX_BATCHFILECMPT_H__2DCE7A04_2D47_11D2_B2D4_0020182B97FC__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "..\common\ComponentHolder.h" + +class CBatchFileCmpt + : public CComponentHolder +{ +public: + CBatchFileCmpt(); + virtual ~CBatchFileCmpt(); + + // Override + virtual HRESULT DoShutdown(DWORD dwMode, HWND hWndParent = NULL); + +protected: + HRESULT ReportLastError(string sMessage); + // Helper Functions + HRESULT MakeBatchFile(); + HRESULT GetCurBatchFile(const string& sFileName, string& sPreText, string& sPostText); + HRESULT CallBatchFile(); + + + bool m_bBatchFile; + + +public: + // Override these fellows to prevent problems + virtual bool IsEnabled() { return true; }; + virtual bool Enable(bool bEnable) { return bEnable; } ; + virtual int GetPos() { return 20; } ; + virtual bool SetPos(int nPos) { return false; } ; + virtual HRESULT GetBatchText(string& sBatchText) { return E_NOTIMPL; }; + virtual IUnknown* GetUnknown() { return NULL; }; + virtual UINT GetType() { return COMPONENT_WIN; }; + + +}; + +#endif // !defined(AFX_BATCHFILECMPT_H__2DCE7A04_2D47_11D2_B2D4_0020182B97FC__INCLUDED_) diff --git a/Shutdown/ItemDlg.cpp b/Shutdown/ItemDlg.cpp new file mode 100644 index 0000000..04c6264 --- /dev/null +++ b/Shutdown/ItemDlg.cpp @@ -0,0 +1,195 @@ +// ItemDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "ItemDlg.h" + + + +///////////////////////////////////////////////////////////////////////////// +// CItemDlg dialog + + +CItemDlg::CItemDlg() + : CDialogImplEx(IDD), CPersistPosWindow(_T("Item")) +{ + m_hIcon = ::LoadIcon(_Module.m_hInst, MAKEINTRESOURCE(IDR_MAINFRAME)); + m_bCancel = false; +} + + +///////////////////////////////////////////////////////////////////////////// +// CItemDlg message handlers + +////////////////////////////////////////////////////////////////// +// Since we can't really cancel the current component +// Set flag and wait till there's a chance to close + +LRESULT CItemDlg::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + g_site.Fire_Cancel(); + m_bCancel = true; + + // Give a visual indication that request has been handled + SetDlgItemText(IDCANCEL, _T("Cancelling...")); + ::EnableWindow(GetDlgItem(IDCANCEL), FALSE); + + return 0; +} + +LRESULT CItemDlg::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + OnCancel(0, 0, NULL, bHandled); + return 0; +} + +////////////////////////////////////////////////////////////////// +// InitDialog (what more can I say) + +LRESULT CItemDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Set the icon for this dialog. + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + + // Create the small icon image list. + m_ImageListSmall.Create(IDB_CHECKS, + 16, + 0, // list won't grow + RGB(255, 0, 255)); + + // Set Mask color for Image Lists + m_ImageListSmall.SetBkColor(CLR_NONE); + + m_ctlItems = GetDlgItem(IDC_ITEMS); + + // Associate the image lists with the list view control. + m_ctlItems.SetImageList(m_ImageListSmall, LVSIL_SMALL); + + + + // We need at least one bogus column since we're using + // report view + + LV_COLUMN lvC; // list view column structure + + // Now initialize the columns you will need. + // Initialize the LV_COLUMN structure. + // The mask specifies that the fmt, width, pszText, and subitem members + // of the structure are valid. + lvC.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; + lvC.fmt = LVCFMT_LEFT; // left-align column + lvC.cx = 200; // width of column in pixels + lvC.iSubItem = 0; + lvC.pszText = "Item"; + + if (m_ctlItems.InsertColumn(0, &lvC) == -1) + return true; + + + // Fill List Control + // Get Names of Windows Components + // string_array was passed in Create + // Loop through Items and get the names for Dialog box + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + + // If it's a Windows Component + if(g_aComponents[nCnt]->GetType() == COMPONENT_WIN) + + // If it's currently active + if(g_aComponents[nCnt]->IsEnabled()) + + // Add it's name + m_ctlItems.InsertItem(LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM, + nCnt, g_aComponents[nCnt]->GetName(), 0, 0, 0, nCnt); + + } + + // Try and hide the control as best we can + m_ctlItems.SetBkColor(::GetSysColor(COLOR_3DFACE)); + m_ctlItems.SetTextBkColor(::GetSysColor(COLOR_3DFACE)); + + + // Make sure the column (although hidden from dlg template) + // is the width of control + + RECT rect; + m_ctlItems.GetClientRect(&rect); + m_ctlItems.SetColumnWidth(0, rect.right); + + + // See if we can get the Window Position + if(!LoadPosition(_Module.m_settings)) + { + // Move the Window to 50, 50 + GetWindowRect(&rect); + MoveWindow(50, 50, rect.right - rect.left, rect.bottom - rect.top); + } + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +LRESULT CItemDlg::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + SavePosition(_Module.m_settings); + return 0; +} + +////////////////////////////////////////////////////////////////// +// Gives the item a pointer image and scrolls it into view + +bool CItemDlg::SetCurrentItem(int nItem) +{ + // Setup Structures + LV_ITEM lv; + + lv.mask = LVIF_IMAGE; + lv.iSubItem = 0; + lv.iItem = nItem; + lv.iImage = 1; + + + // Scroll to item + m_ctlItems.EnsureVisible(nItem, false); + + // Give the item the right image + return m_ctlItems.SetItem(&lv) ? true : false; +} + +////////////////////////////////////////////////////////////////// +// Gives the item a tick or cross image depending on bState + +bool CItemDlg::CheckOffItem(int nItem, bool bState /*= true*/) +{ + // Setup Structures + LV_ITEM lv; + + lv.mask = LVIF_IMAGE; + lv.iSubItem = 0; + lv.iItem = nItem; + lv.iImage = bState ? 2 : 3; // Image 2 is tick, 3 is cross + + // Set right image for item + return m_ctlItems.SetItem(&lv) ? true : false; + +} + +LRESULT CItemDlg::OnSetFocusItems(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + CancelItemSelection(); + return 0; +} + + +void CItemDlg::CancelItemSelection() +{ + // Deselect All + for(int nCnt = 0; nCnt < m_ctlItems.GetItemCount(); nCnt ++) + // Set right state for item + ListView_SetItemState(m_ctlItems, nCnt, 0, (UINT)-1); + + GotoDlgCtrl(GetDlgItem(IDCANCEL)); +} diff --git a/Shutdown/ItemDlg.h b/Shutdown/ItemDlg.h new file mode 100644 index 0000000..f3abab1 --- /dev/null +++ b/Shutdown/ItemDlg.h @@ -0,0 +1,81 @@ +////////////////////////////////////////////////////////////////// +// +// ItemDlg.h : header file +// +// Dialog for Shutdown. Handles different pix and strings etc.. +// +////////////////////////////////////////////////////////////////// + + +#if !defined(AFX_ITEMDLG_H__39C297A3_2DCF_11D2_B2D4_0020182B97FC__INCLUDED_) +#define AFX_ITEMDLG_H__39C297A3_2DCF_11D2_B2D4_0020182B97FC__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include +#include +#include "resource.h" + +#include "PersistPosWindow.h" + +///////////////////////////////////////////////////////////////////////////// +// CItemDlg dialog + +class CItemDlg + : public CDialogImplEx, +// : public CDialogImpl + public CPersistPosWindow + +{ +// Construction +public: + CItemDlg(); // standard constructor + ~CItemDlg() + { if(IsWindow()) DestroyWindow(); } + + // Used to tick off an item + // if bState is false means failed + bool CheckOffItem(int nItem, bool bState = true); + + // Give item a pointer next to it + bool SetCurrentItem(int nItem); + + // Has Cancel Button been pressed + bool IsCancelled() + { return m_bCancel; }; + +// Dialog Data + enum { IDD = IDD_ITEMDLG }; + CListViewCtrl m_ctlItems; + + +// Implementation +protected: + void CancelItemSelection(); + bool m_bCancel; + CImageList m_ImageListSmall; + HICON m_hIcon; + + +BEGIN_MSG_MAP(CNormalPage) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + NOTIFY_HANDLER(IDC_ITEMS, NM_SETFOCUS, OnSetFocusItems) + COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnCancel) + MESSAGE_HANDLER(WM_CLOSE, OnClose) +END_MSG_MAP() + + // Generated message map functions + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnSetFocusItems(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_ITEMDLG_H__39C297A3_2DCF_11D2_B2D4_0020182B97FC__INCLUDED_) diff --git a/Shutdown/LogDlg.cpp b/Shutdown/LogDlg.cpp new file mode 100644 index 0000000..3d94bc9 --- /dev/null +++ b/Shutdown/LogDlg.cpp @@ -0,0 +1,502 @@ +// LogDlg.cpp : Implementation of CShutdownApp and DLL registration. + +#include "stdafx.h" +#include "LogDlg.h" + +#include +using std::replace; + +_COM_SMARTPTR_TYPEDEF(INightSecErrorFix, __uuidof(INightSecErrorFix)); + +#include +#include + +#define IMAGE_OKAY 0 +#define IMAGE_ERROR 1 + +///////////////////////////////////////////////////////////////////////////// +// +LRESULT CLogDlg::OnHide(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + // We use this event to keep the program open + // when the user is looking at the log + if(m_hEvent) + SetEvent(m_hEvent); + + ShowWindow(SW_HIDE); + return 0; +} + +LRESULT CLogDlg::OnSave(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + // I think this is good enough. ie: saving on the desktop. + if(IDYES == MessageBox(_T("The log will be saved on your desktop. Continue?"), _T("Save Log"), MB_YESNO | MB_ICONQUESTION)) + SaveLog(); + + return 0; +} + +LRESULT CLogDlg::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + OnHide(0, 0, NULL, bHandled); + return 0; +} + +/*LRESULT CLogDlg::OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + return 0; +} +*/ +////////////////////////////////////////////////////////////////// +// InitDialog (what more can I say) + +LRESULT CLogDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + m_hIcon = ::LoadIcon(_Module.m_hInst, MAKEINTRESOURCE(IDI_ERR)); + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // Create the small icon image list. + m_ImageListSmall.Create(IDB_ERRORS, + 16, + 0, // list won't grow + RGB(255, 0, 255)); + + // Set Mask color for Image Lists + m_ImageListSmall.SetBkColor(CLR_NONE); + + m_ctlErrors = GetDlgItem(IDC_ERROR_LOG); + + // Associate the image lists with the list view control. + m_ctlErrors.SetImageList(m_ImageListSmall, LVSIL_SMALL); + + // This sets the sizing of the dialog + SetMin(IDC_MINSIZE); + SetControlSizing(ID_SAVE, SD_HORZ | SD_MOVING); + SetControlSizing(ID_HIDE, SD_HORZ | SD_MOVING); + SetControlSizing(IDC_ERROR_LOG, SD_HORZ | SD_VERT | SD_SIZING); + + // We need at least one bogus column since we're using + // report view + LV_COLUMN lvC; // list view column structure + + // Now initialize the columns you will need. + // Initialize the LV_COLUMN structure. + // The mask specifies that the fmt, width, pszText, and subitem members + // of the structure are valid. + lvC.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; + lvC.fmt = LVCFMT_LEFT; // left-align column + lvC.cx = 200; // width of column in pixels + lvC.iSubItem = 0; + lvC.pszText = _T("Errors"); + + if (m_ctlErrors.InsertColumn(0, &lvC) == -1) + return true; + + // Make sure the column is the width of control + RECT rect; + m_ctlErrors.GetClientRect(&rect); + m_ctlErrors.SetColumnWidth(0, rect.right); + + // Move Window to previous position + if(!LoadPosition(_Module.m_settings)) + // If fails then Center it on the desktop + CenterWindow(GetDesktopWindow()); + + // This event gets set when we're hidden + m_hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + +LRESULT CLogDlg::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Clear All Items (which also releases the COM Objects) + while(m_ctlErrors.GetItemCount()) + RemoveItem(0); + + // Just in case set the event + if(m_hEvent) + SetEvent(m_hEvent); + + // Put window position in registry for next time + SavePosition(_Module.m_settings); + + return 0; +} + +////////////////////////////////////////////////////////////////// +// Gives the item a tick or cross image depending on bState + +bool CLogDlg::AddItem(INightSecError* pError) +{ + USES_CONVERSION; + + if(!pError) + return false; + + // Get the Description of the Error + BSTR bsTemp; + HRESULT hr = pError->get_Description(&bsTemp); + + if(FAILED(hr)) + return false; + + // Clean up any new lines + replace(bsTemp, bsTemp + SysStringLen(bsTemp), L'\n', L' '); + replace(bsTemp, bsTemp + SysStringLen(bsTemp), L'\r', L' '); + + // Make sure object stays around + pError->AddRef(); + + // Create or Show the Log Window + ShowLog(); + + // Setup Structures + LV_ITEM lv; + lv.mask = LVIF_IMAGE | LVIF_TEXT | LVIF_PARAM; + lv.iSubItem = 0; + lv.iItem = m_ctlErrors.GetItemCount(); + lv.iImage = 1; + lv.lParam = (LPARAM)pError; + lv.pszText = OLE2T(bsTemp); + + // Set right image for item + return m_ctlErrors.InsertItem(&lv) ? true : false; +} + +void CLogDlg::ShowLog() +{ + // If not created then Create + if(!IsWindow()) + Create(m_hWndParent, NULL); + + // Make sure it's Visible + if(!IsWindowVisible()) + ShowWindow(SW_SHOW); + + // Make sure event is not signalled so we don't just close by self + ResetEvent(m_hEvent); +} + +void CLogDlg::WaitLog() +{ + // Prompt the user + UINT nRet = MessageBoxTimeout(g_site.m_log, _T("There were errors during Secure Shutdown. \n\nWould you like to pause a moment before continuing?"), _T("Secure Shutdown"), MB_YESNO | MB_ICONQUESTION, 10000, 5000); + + if(nRet == IDYES) + { + // Display the Log Window + ShowLog(); + + // Wait for the Event + if(m_hEvent) + WaitForAndIdle(1, &m_hEvent, INFINITE); + } + + // If we time out then save the log on the desktop + else if(nRet == IDTIMEOUT) + if(!_Module.m_settings.GetInt(NO_LOG_KEY, false)) + SaveLog(); +} + +HRESULT CLogDlg::SaveLog(/*const string& sFile*/) +{ + string sFile; + LPITEMIDLIST pidl; + HRESULT hr; + + // Get Desktop PIDL + hr = SHGetSpecialFolderLocation(*this, CSIDL_DESKTOPDIRECTORY, &pidl); + + if(FAILED(hr)) + return 0; + + // Get the Folder from That + if(!SHGetPathFromIDList(pidl, sFile.get_buffer(MAX_PATH))) + return 0; + + sFile.release_buffer(); + + // This is the file name + // LIMITATION: Can't be changed + sFile += _T("\\Secure Shutdown Log.txt"); + + // Open the File + HANDLE hFile = NULL; + if((hFile = CreateFile(sFile, GENERIC_WRITE, FILE_SHARE_READ, + NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, + NULL)) == INVALID_HANDLE_VALUE) + return HRESULT_FROM_WIN32(::GetLastError()); + + int nPos = -1; + DWORD dwWritten; + + // Always use ANSI here + // LIMITATION: Only errors up to 1K in length + char* szText = new char[1024]; + + // Write Header + char* szTemp = "SECURE SHUTDOWN ERROR LOG\r\n\r\n"; + WriteFile(hFile, szTemp, strlen(szTemp), &dwWritten, NULL); + + LVITEMA lvi; + memset(&lvi, 0, sizeof(LVITEMA)); + + while((nPos = m_ctlErrors.GetNextItem(nPos, 0)) != -1) + { + // We need all this crazy code here to make sure + // We get ANSI text in UNICODE Builds. + lvi.mask = LVIF_TEXT | LVIF_IMAGE; + lvi.iItem = nPos; + lvi.iSubItem = 0; + lvi.cchTextMax = 1024; + lvi.pszText = szText; + lvi.iImage = 0; + + ::SendMessageA(m_ctlErrors, LVM_GETITEMA, 0, (LPARAM)&lvi); + + // Only write errors (No Fixed) + if(lvi.iImage != IMAGE_OKAY) + { + // Write it to the file + WriteFile(hFile, szText, strlen(szText), &dwWritten, NULL); + WriteFile(hFile, "\r\n", 2, &dwWritten, NULL); + } + } + + // Close the File + CloseHandle(hFile); + + return S_OK; +} + +bool CLogDlg::HasErrors() +{ + if(!IsWindow()) + return false; + + // If we're created then we've got errors + int nPos = -1; + LV_ITEM lv; + while((nPos = m_ctlErrors.GetNextItem(nPos, LVNI_ALL)) != -1) + { + lv.mask = LVIF_IMAGE; + lv.iItem = nPos; + lv.iSubItem = 0; + m_ctlErrors.GetItem(&lv); + + if(lv.iImage == IMAGE_ERROR) + return true; + } + + return false; +} + +LRESULT CLogDlg::OnListRClick(int idCtrl, LPNMHDR pnmh, BOOL& bHandled) +{ + // First of all get the mouse incase we move (unlikely) + POINT ptMouse; + ::GetCursorPos(&ptMouse); + + LVHITTESTINFO lvHit; + lvHit.pt = ptMouse; + lvHit.flags = LVHT_ONITEM; + + m_ctlErrors.ScreenToClient(&lvHit.pt); + int nIndex = m_ctlErrors.HitTest(&lvHit); + + // If we didn't click on an item then... + if(nIndex == -1) + { + // ...Deselect All + for(int nCnt = 0; nCnt < m_ctlErrors.GetItemCount(); nCnt ++) + // Set right state for item + ListView_SetItemState(m_ctlErrors, nCnt, 0, (UINT)-1); + + return 0; + } + + // Focus on Current Item + ListView_SetItemState(m_ctlErrors, nIndex, LVIS_SELECTED | LVIS_FOCUSED, + LVIS_STATEIMAGEMASK); + + // Load the Menu + HMENU hMenu = ::LoadMenu(_Module.m_hInstResource, MAKEINTRESOURCE(IDR_ERROR_MENU)); + if (!hMenu) return 0; + + HMENU hSubMenu = GetSubMenu(hMenu, 0); + if (!hSubMenu) + { + DestroyMenu(hMenu); + return 0; + } + + // Get a COM Pointer to the current Error + INightSecErrorFixPtr pFix = (INightSecError*)m_ctlErrors.GetItemData(nIndex); + + if(pFix) + { + // Check if Fixable + BOOL bFixable = FALSE; + if(SUCCEEDED(pFix->get_Fixable(&bFixable)) && bFixable) + ::EnableMenuItem(hSubMenu, ID_ERROR_FIX, MF_BYCOMMAND | MF_ENABLED); + + // Check if Retryable + BOOL bRetryable = FALSE; + if(SUCCEEDED(pFix->get_Retryable(&bRetryable)) && bRetryable) + ::EnableMenuItem(hSubMenu, ID_ERROR_RETRY, MF_BYCOMMAND | MF_ENABLED); + } + + // Make the default (same as double-click) Retry + SetMenuDefaultItem(hSubMenu, ID_ERROR_RETRY, FALSE); + + // Show the Menu + ::TrackPopupMenu(hSubMenu, 0, ptMouse.x, ptMouse.y, 0, m_hWnd, NULL); + ::PostMessage(m_hWnd, WM_USER, 0, 0); + return 0; +} + +LRESULT CLogDlg::OnErrorFix(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + // Fix all selected items + int nPos = -1; + while((nPos = m_ctlErrors.GetNextItem(nPos, LVIS_SELECTED)) != -1) + FixItem(nPos); + + return 0; +} + +LRESULT CLogDlg::OnErrorRetry(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + // Retry all selected Items + int nPos = -1; + while((nPos = m_ctlErrors.GetNextItem(nPos, LVIS_SELECTED)) != -1) + RetryItem(nPos); + + return 0; +} + +LRESULT CLogDlg::OnErrorDelete(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) +{ + // Delete all selected items + int nPos = -1; + while((nPos = m_ctlErrors.GetNextItem(nPos, LVIS_SELECTED)) != -1) + RemoveItem(nPos); + + return 0; +} + +HRESULT CLogDlg::FixItem(int nIndex) +{ + USES_CONVERSION; + + // Extract COM Pointer from ListCtrl + INightSecErrorFixPtr pFix = (INightSecError*)m_ctlErrors.GetItemData(nIndex); + + if(pFix == NULL) + return 0; + + // Check if actually fixable + BOOL bFixable = FALSE; + if(FAILED(pFix->get_Fixable(&bFixable)) || !bFixable) + return 0; + + // Fix it + HCURSOR hOldCursor = ::SetCursor(::LoadCursor(NULL, IDC_WAIT)); + + HRESULT hr = pFix->Fix(); + + ::SetCursor(hOldCursor); + + INightSecErrorPtr pError = pFix; + + if(pError == NULL) + return 0; + + // Get New Error Messages + BSTR bsTemp; + pError->get_Description(&bsTemp); + + // Clean up newlines + replace(bsTemp, bsTemp + SysStringLen(bsTemp), L'\n', L' '); + replace(bsTemp, bsTemp + SysStringLen(bsTemp), L'\r', L' '); + + // Set Image and Text + LV_ITEM lv; + lv.mask = LVIF_IMAGE | LVIF_TEXT; + lv.iSubItem = 0; + lv.iItem = nIndex; + lv.pszText = OLE2T(bsTemp); + lv.iImage = SUCCEEDED(hr) ? 0 : 1; + + // Set right image and text for item + m_ctlErrors.SetItem(&lv); + + return hr; +} + +HRESULT CLogDlg::RetryItem(int nIndex) +{ + USES_CONVERSION; + + // Extract COM Pointer from List Ctrl + INightSecErrorFixPtr pFix = (INightSecError*)m_ctlErrors.GetItemData(nIndex); + + if(pFix == NULL) + return 0; + + // Check if we can actually Retry + BOOL bRetryable = FALSE; + if(FAILED(pFix->get_Retryable(&bRetryable)) || !bRetryable) + return 0; + + // Retry it + HCURSOR hOldCursor = ::SetCursor(::LoadCursor(NULL, IDC_WAIT)); + + HRESULT hr = pFix->Retry(); + + ::SetCursor(hOldCursor); + + INightSecErrorPtr pError = pFix; + + if(pError == NULL) + return 0; + + // Get new Error Messages + BSTR bsTemp; + pError->get_Description(&bsTemp); + + // Clean up newlines + replace(bsTemp, bsTemp + SysStringLen(bsTemp), L'\n', L' '); + replace(bsTemp, bsTemp + SysStringLen(bsTemp), L'\r', L' '); + + // Set Image and Text + LV_ITEM lv; + lv.mask = LVIF_IMAGE | LVIF_TEXT; + lv.iSubItem = 0; + lv.iItem = nIndex; + lv.pszText = OLE2T(bsTemp); + lv.iImage = SUCCEEDED(hr) ? IMAGE_OKAY : IMAGE_ERROR; + + // Set right image and text for item + m_ctlErrors.SetItem(&lv); + + return hr; +} + +bool CLogDlg::RemoveItem(int nIndex) +{ + // Release COM Ptr + INightSecError* pError = (INightSecError*)m_ctlErrors.GetItemData(nIndex); + if(pError) pError->Release(); + + // Remove it + return m_ctlErrors.DeleteItem(nIndex) ? true : false; +} + +void CLogDlg::Init(HWND hWndParent) +{ + m_hWndParent = hWndParent; +} diff --git a/Shutdown/LogDlg.h b/Shutdown/LogDlg.h new file mode 100644 index 0000000..ac174b4 --- /dev/null +++ b/Shutdown/LogDlg.h @@ -0,0 +1,102 @@ +// LogDlg.h: Definition of the CLogDlg class +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_LOGDLG_H__F3AF1F46_93A1_11D3_BFC3_0020182B97FC__INCLUDED_) +#define AFX_LOGDLG_H__F3AF1F46_93A1_11D3_BFC3_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "resource.h" // main symbols +#include +#include +#include + +#include "SizingDialog.h" +#include "PersistPosWindow.h" + +///////////////////////////////////////////////////////////////////////////// +// CLogDlg + +class CLogDlg + : public CDialogImplEx, +// : public CDialogImpl, + public CSizingDialog, + public CPersistPosWindow, + public CContextHelp +{ +public: + CLogDlg() : CDialogImplEx(IDD), CPersistPosWindow(_T("Log")) + { + m_hWndParent = NULL; + m_hEvent = NULL; + m_hIcon = NULL; + } + + ~CLogDlg() + { + if(IsWindow()) + DestroyWindow(); + + if(m_hEvent) + CloseHandle(m_hEvent); + } + +// Dialog Data +protected: + enum { IDD = IDD_LOG }; + CListViewCtrl m_ctlErrors; + CImageList m_ImageListSmall; + HWND m_hWndParent; + HICON m_hIcon; + HANDLE m_hEvent; + +public: +BEGIN_MSG_MAP(CLogDlg) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + MESSAGE_HANDLER(WM_CLOSE, OnClose) +// MESSAGE_HANDLER(WM_TIMER, OnTimer) + NOTIFY_HANDLER(IDC_ERROR_LOG, NM_RCLICK, OnListRClick) + COMMAND_HANDLER(ID_HIDE, BN_CLICKED, OnHide) + COMMAND_HANDLER(ID_SAVE, BN_CLICKED, OnSave) + COMMAND_ID_HANDLER(ID_ERROR_FIX, OnErrorFix) + COMMAND_ID_HANDLER(ID_ERROR_RETRY, OnErrorRetry) + COMMAND_ID_HANDLER(ID_ERROR_DELETE, OnErrorDelete) + CHAIN_MSG_MAP(CSizingDialog) + CHAIN_MSG_MAP(CContextHelp) +END_MSG_MAP() + +BEGIN_HELP_MAP("nightsec.hlp") + HELP_ID(IDC_ERROR_LOG, 5003) + HELP_ID(ID_HIDE, 5002) + HELP_ID(ID_SAVE, 5001) +END_HELP_MAP + + // Generated message map functions + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); +// LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnListRClick(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); + LRESULT OnHide(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnSave(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnErrorFix(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnErrorRetry(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + LRESULT OnErrorDelete(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); + +public: + void Init(HWND hWndParent); + bool RemoveItem(int nIndex); + HRESULT FixItem(int nIndex); + HRESULT RetryItem(int nIndex); + bool AddItem(INightSecError* pError); + bool HasErrors(); + void ShowLog(); + HRESULT SaveLog(/*const string& sFile*/); + void WaitLog(); +}; + +#endif // !defined(AFX_LOGDLG_H__F3AF1F46_93A1_11D3_BFC3_0020182B97FC__INCLUDED_) diff --git a/Shutdown/LogDlg.rgs b/Shutdown/LogDlg.rgs new file mode 100644 index 0000000..5c5c83b --- /dev/null +++ b/Shutdown/LogDlg.rgs @@ -0,0 +1,21 @@ +HKCR +{ + Shutdown.LogDlg.1 = s 'LogDlg Class' + { + CLSID = s '{F3AF1F45-93A1-11D3-BFC3-0020182B97FC}' + } + Shutdown.LogDlg = s 'LogDlg Class' + { + CLSID = s '{F3AF1F45-93A1-11D3-BFC3-0020182B97FC}' + } + NoRemove CLSID + { + ForceRemove {F3AF1F45-93A1-11D3-BFC3-0020182B97FC} = s 'LogDlg Class' + { + ProgID = s 'Shutdown.LogDlg.1' + VersionIndependentProgID = s 'Shutdown.LogDlg' + val AppID = s '{936DD342-8FF9-11D3-BFBD-0020182B97FC}' + LocalServer32 = s '%Module%' + } + } +} diff --git a/Shutdown/PersistPosWindow.cpp b/Shutdown/PersistPosWindow.cpp new file mode 100644 index 0000000..131a236 --- /dev/null +++ b/Shutdown/PersistPosWindow.cpp @@ -0,0 +1,11 @@ +// PersistPosWindow.cpp: implementation of the CPersistPosWindow class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "PersistPosWindow.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + diff --git a/Shutdown/PersistPosWindow.h b/Shutdown/PersistPosWindow.h new file mode 100644 index 0000000..74aff51 --- /dev/null +++ b/Shutdown/PersistPosWindow.h @@ -0,0 +1,112 @@ +// PersistPosWindow.h: interface for the CPersistPosWindow class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_PERSISTPOSWINDOW_H__7D209B81_ED68_11D3_8378_0020182B97FC__INCLUDED_) +#define AFX_PERSISTPOSWINDOW_H__7D209B81_ED68_11D3_8378_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include + +template +class CPersistPosWindow +{ +public: + CPersistPosWindow(LPCTSTR szPrefix) + { m_szPrefix = szPrefix; }; + + bool LoadPosition(CRegSettings& settings); + bool SavePosition(CRegSettings& settings); + +protected: + LPCTSTR m_szPrefix; // Prefix for Registry Entries +}; + +template +bool CPersistPosWindow::LoadPosition(CRegSettings& settings) +{ + // Pointer to the Window Class + T* pThis = (T*)this; + + // Init WINDOWPLACEMENT Structure + WINDOWPLACEMENT wp; + wp.length = sizeof(WINDOWPLACEMENT); + wp.flags = 0; + wp.showCmd = SW_SHOWNA; + // Not worrying about these for now + // Probably okay + wp.ptMaxPosition.x = wp.ptMaxPosition.y = 0; + wp.ptMinPosition.x = wp.ptMinPosition.y = 0; + + + // This prefix is used before each Registry Entry + string sPrefix(m_szPrefix); + + // Load the Window Position from the registry + wp.rcNormalPosition.top = settings.GetInt(sPrefix + _T("_top"), -1); + wp.rcNormalPosition.left = settings.GetInt(sPrefix + _T("_left"), -1); + wp.rcNormalPosition.bottom = settings.GetInt(sPrefix + _T("_bottom"), -1); + wp.rcNormalPosition.right = settings.GetInt(sPrefix + _T("_right"), -1); + + // Make sure each of them got a value from the Registry + // If not don't proceed + if(wp.rcNormalPosition.top != -1 && + wp.rcNormalPosition.left != -1 && + wp.rcNormalPosition.bottom != -1 && + wp.rcNormalPosition.right != -1) + { + + // Check if on screen or not + WINDOWPLACEMENT wpScreen; + wpScreen.length = sizeof(WINDOWPLACEMENT); + wpScreen.flags = 0; + + GetWindowPlacement(GetDesktopWindow(), &wpScreen); + + // See if Desktop Window and our Window Intersect + // If not don't proceed + RECT rcTemp; + if(IntersectRect(&rcTemp, &wpScreen.rcNormalPosition, + &wp.rcNormalPosition)) + { + + // Move and Size the actual Window + SetWindowPlacement(*pThis, &wp); + return true; + + } + } + + return false; +} + +template +bool CPersistPosWindow::SavePosition(CRegSettings& settings) +{ + // Pointer to our Window Class + T* pThis = (T*)this; + + WINDOWPLACEMENT wp; + wp.length = sizeof(WINDOWPLACEMENT); + wp.flags = 0; + + // Get the Current Placement + GetWindowPlacement(*pThis, &wp); + + // This goes in front of each Registry Entry + string sPrefix(m_szPrefix); + + // Write to the registry + settings.WriteInt(sPrefix + _T("_top"), wp.rcNormalPosition.top); + settings.WriteInt(sPrefix + _T("_left"), wp.rcNormalPosition.left); + settings.WriteInt(sPrefix + _T("_bottom"), wp.rcNormalPosition.bottom); + settings.WriteInt(sPrefix + _T("_right"), wp.rcNormalPosition.right); + + return true; +} + + +#endif // !defined(AFX_PERSISTPOSWINDOW_H__7D209B81_ED68_11D3_8378_0020182B97FC__INCLUDED_) diff --git a/Shutdown/Shutdown.cpp b/Shutdown/Shutdown.cpp new file mode 100644 index 0000000..e06992f --- /dev/null +++ b/Shutdown/Shutdown.cpp @@ -0,0 +1,118 @@ +// Shutdown.cpp : Implementation of WinMain + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f Shutdownps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include +#include "Shutdown.h" + +#include "Shutdown_i.c" + +#include "../common/Interfaces.cpp" + +CShutdownApp _Module; +CComObjectGlobal g_site; + +/* +BEGIN_OBJECT_MAP(ObjectMap) +END_OBJECT_MAP() +*/ + +const DWORD dwPause = 1000; // time to wait for threads to finish up + +LPCTSTR FindOneOf(LPCTSTR p1, LPCTSTR p2) +{ + while (p1 != NULL && *p1 != NULL) + { + LPCTSTR p = p2; + while (p != NULL && *p != NULL) + { + if (*p1 == *p) + return CharNext(p1); + p = CharNext(p); + } + p1 = CharNext(p1); + } + return NULL; +} + +///////////////////////////////////////////////////////////////////////////// +// +extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, + HINSTANCE /*hPrevInstance*/, LPTSTR lpCmdLine, int /*nShowCmd*/) +{ + lpCmdLine = GetCommandLine(); //this line necessary for _ATL_MIN_CRT + +#if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED) + HRESULT hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED); +#else + HRESULT hRes = CoInitialize(NULL); +#endif + _ASSERTE(SUCCEEDED(hRes)); + _Module.Init(NULL/*ObjectMap*/, hInstance, &LIBID_SHUTDOWNLib); +// _Module.dwThreadID = GetCurrentThreadId(); + TCHAR szTokens[] = _T("-/"); + + int nRet = 0; + BOOL bRun = TRUE; + LPCTSTR lpszToken = FindOneOf(lpCmdLine, szTokens); + while (lpszToken != NULL) + { + if (lstrcmpi(lpszToken, _T("UnregServer"))==0) + { +// _Module.UpdateRegistryFromResource(IDR_Shutdown, FALSE); +// nRet = _Module.UnregisterServer(TRUE); + bRun = FALSE; + break; + } + if (lstrcmpi(lpszToken, _T("RegServer"))==0) + { + _Module.RegisterDlls(); + +// _Module.UpdateRegistryFromResource(IDR_Shutdown, TRUE); +// nRet = _Module.RegisterServer(TRUE); + bRun = FALSE; + break; + } + lpszToken = FindOneOf(lpszToken, szTokens); + } + + if (bRun) + { +// _Module.StartMonitor(); +#if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED) +// hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, +// REGCLS_MULTIPLEUSE | REGCLS_SUSPENDED); +// _ASSERTE(SUCCEEDED(hRes)); +// hRes = CoResumeClassObjects(); +#else +// hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, +// REGCLS_MULTIPLEUSE); +#endif +// _ASSERTE(SUCCEEDED(hRes)); + + if(_Module.InitInstance()) + { + + MSG msg; + while (GetMessage(&msg, 0, 0, 0)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + +// _Module.RevokeClassObjects(); +// Sleep(dwPause); //wait for any threads to finish + } + + _Module.ExitInstance(); + } + + _Module.Term(); + CoUninitialize(); + return nRet; +} diff --git a/Shutdown/Shutdown.dsp b/Shutdown/Shutdown.dsp new file mode 100644 index 0000000..e324fb2 --- /dev/null +++ b/Shutdown/Shutdown.dsp @@ -0,0 +1,455 @@ +# Microsoft Developer Studio Project File - Name="Shutdown" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Shutdown - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Shutdown.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Shutdown.mak" CFG="Shutdown - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Shutdown - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Shutdown - Win32 Unicode Debug" (based on "Win32 (x86) Application") +!MESSAGE "Shutdown - Win32 Release MinSize" (based on "Win32 (x86) Application") +!MESSAGE "Shutdown - Win32 Release MinDependency" (based on "Win32 (x86) Application") +!MESSAGE "Shutdown - Win32 Unicode Release MinSize" (based on "Win32 (x86) Application") +!MESSAGE "Shutdown - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Shutdown - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../Debug/Shutdown.exe" /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\Debug +TargetPath=\Projects\NightSec\Debug\Shutdown.exe +InputPath=\Projects\NightSec\Debug\Shutdown.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + +# End Custom Build + +!ELSEIF "$(CFG)" == "Shutdown - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"../Debug/Shutdown.exe" /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\DebugU +TargetPath=\Projects\NightSec\Debug\Shutdown.exe +InputPath=\Projects\NightSec\Debug\Shutdown.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + goto end + :NOTNT + echo Warning : Cannot register Unicode EXE on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "Shutdown - Win32 Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinSize" +# PROP BASE Intermediate_Dir "ReleaseMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinSize" +# PROP Intermediate_Dir "ReleaseMinSize" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_DLL" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib /nologo /subsystem:windows /machine:I386 /out:"../Release/Shutdown.exe" /OPT:NOWIN98 +# SUBTRACT LINK32 /pdb:none +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinSize +TargetPath=\Projects\NightSec\Release\Shutdown.exe +InputPath=\Projects\NightSec\Release\Shutdown.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + +# End Custom Build + +!ELSEIF "$(CFG)" == "Shutdown - Win32 Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinDependency" +# PROP BASE Intermediate_Dir "ReleaseMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinDependency" +# PROP Intermediate_Dir "ReleaseMinDependency" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /machine:I386 /out:"../Release/Shutdown.exe" +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinDependency +TargetPath=\Projects\NightSec\Release\Shutdown.exe +InputPath=\Projects\NightSec\Release\Shutdown.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + +# End Custom Build + +!ELSEIF "$(CFG)" == "Shutdown - Win32 Unicode Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinSize" +# PROP BASE Intermediate_Dir "ReleaseUMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinSize" +# PROP Intermediate_Dir "ReleaseUMinSize" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"../Release/Shutdown.exe" +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinSize +TargetPath=\Projects\NightSec\Release\Shutdown.exe +InputPath=\Projects\NightSec\Release\Shutdown.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + goto end + :NOTNT + echo Warning : Cannot register Unicode EXE on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "Shutdown - Win32 Unicode Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinDependency" +# PROP BASE Intermediate_Dir "ReleaseUMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinDependency" +# PROP Intermediate_Dir "ReleaseUMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\Shutdown.exe +InputPath=.\ReleaseUMinDependency\Shutdown.exe +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + "$(TargetPath)" /RegServer + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + echo Server registration done! + goto end + :NOTNT + echo Warning : Cannot register Unicode EXE on Windows 95 + :end + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "Shutdown - Win32 Debug" +# Name "Shutdown - Win32 Unicode Debug" +# Name "Shutdown - Win32 Release MinSize" +# Name "Shutdown - Win32 Release MinDependency" +# Name "Shutdown - Win32 Unicode Release MinSize" +# Name "Shutdown - Win32 Unicode Release MinDependency" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\Include\src\appmisc.cpp +# End Source File +# Begin Source File + +SOURCE=.\BatchFileCmpt.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\ComponentArray.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\ComponentData.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\ComponentHolder.cpp +# End Source File +# Begin Source File + +SOURCE=.\ItemDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\LogDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\Common\NightSecApp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\Include\src\path.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\Include\src\RegSvr.cpp +# End Source File +# Begin Source File + +SOURCE=.\Shutdown.cpp +# End Source File +# Begin Source File + +SOURCE=.\Shutdown.idl + +!IF "$(CFG)" == "Shutdown - Win32 Debug" + +# ADD MTL /tlb "Shutdown.tlb" + +!ELSEIF "$(CFG)" == "Shutdown - Win32 Unicode Debug" + +!ELSEIF "$(CFG)" == "Shutdown - Win32 Release MinSize" + +!ELSEIF "$(CFG)" == "Shutdown - Win32 Release MinDependency" + +!ELSEIF "$(CFG)" == "Shutdown - Win32 Unicode Release MinSize" + +!ELSEIF "$(CFG)" == "Shutdown - Win32 Unicode Release MinDependency" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\Shutdown.rc +# End Source File +# Begin Source File + +SOURCE=.\ShutdownApp.cpp +# End Source File +# Begin Source File + +SOURCE=.\ShutdownSite.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\Include\appmisc.h +# End Source File +# Begin Source File + +SOURCE=.\BatchFileCmpt.h +# End Source File +# Begin Source File + +SOURCE=.\ItemDlg.h +# End Source File +# Begin Source File + +SOURCE=.\LogDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\Include\path.h +# End Source File +# Begin Source File + +SOURCE=.\PersistPosWindow.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\ShutdownApp.h +# End Source File +# Begin Source File + +SOURCE=.\ShutdownCP.h +# End Source File +# Begin Source File + +SOURCE=.\ShutdownSite.h +# End Source File +# Begin Source File + +SOURCE=.\SizingDialog.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\checks1.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\icon1.ico +# End Source File +# Begin Source File + +SOURCE=.\LogDlg.rgs +# End Source File +# Begin Source File + +SOURCE=.\res\LogDlg.rgs +# End Source File +# Begin Source File + +SOURCE=".\res\Night Security Shutdown.ico" +# End Source File +# Begin Source File + +SOURCE=".\res\Night Security Stub.ico" +# End Source File +# Begin Source File + +SOURCE=.\Shutdown.rgs +# End Source File +# End Group +# End Target +# End Project diff --git a/Shutdown/Shutdown.h b/Shutdown/Shutdown.h new file mode 100644 index 0000000..c2964c7 --- /dev/null +++ b/Shutdown/Shutdown.h @@ -0,0 +1,57 @@ +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + +/* File created by MIDL compiler version 5.01.0164 */ +/* at Wed Nov 03 10:32:26 1999 + */ +/* Compiler settings for E:\Projects\NightSec\Shutdown\Shutdown.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __Shutdown_h__ +#define __Shutdown_h__ + +#ifdef __cplusplus +extern "C"{ +#endif + +/* Forward Declarations */ + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + + +#ifndef __SHUTDOWNLib_LIBRARY_DEFINED__ +#define __SHUTDOWNLib_LIBRARY_DEFINED__ + +/* library SHUTDOWNLib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_SHUTDOWNLib; +#endif /* __SHUTDOWNLib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Shutdown/Shutdown.idl b/Shutdown/Shutdown.idl new file mode 100644 index 0000000..273ac87 --- /dev/null +++ b/Shutdown/Shutdown.idl @@ -0,0 +1,38 @@ +// Shutdown.idl : IDL source for Shutdown.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (Shutdown.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; + + [ + uuid(409C4B06-9310-11d3-BFC1-0020182B97FC), + helpstring("Buddy Events") + ] + dispinterface DShutdownEvents + { + properties: + methods: + [id(1)] HRESULT Cancel(); + }; + +[ + uuid(409C4B07-9310-11d3-BFC1-0020182B97FC), + version(2.5), + helpstring("Night Security Shutdown 2.5") +] +library NightSecShutdown +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + [ + uuid(409C4B08-9310-11d3-BFC1-0020182B97FC) + ] + coclass Shutdown + { + [default, source] dispinterface DShutdownEvents; + }; +}; diff --git a/Shutdown/Shutdown.rc b/Shutdown/Shutdown.rc new file mode 100644 index 0000000..8b65ba7 --- /dev/null +++ b/Shutdown/Shutdown.rc @@ -0,0 +1,236 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.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 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "1 TYPELIB ""Shutdown.tlb""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 2,5,0,1 + PRODUCTVERSION 2,5,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Part of the Night Security Program\0" + VALUE "CompanyName", "The Family (Thailand)\0" + VALUE "FileDescription", "Night Security (Shutdown Module)\0" + VALUE "FileVersion", "2, 5, 0, 1\0" + VALUE "InternalName", "Night Security Shutdown\0" + VALUE "LegalCopyright", "Copyright (C) 1998 - 1999, The Family (Thailand)\0" + VALUE "LegalTrademarks", "\0" + VALUE "OLESelfRegister", "\0" + VALUE "OriginalFilename", "Shutdown.exe\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "Night Security 2.5\0" + VALUE "ProductVersion", "2, 5, 0, 1\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// + +IDR_Shutdown REGISTRY MOVEABLE PURE "Shutdown.rgs" + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_CHECKS BITMAP DISCARDABLE "res\\bitmap1.bmp" +IDB_ERRORS BITMAP DISCARDABLE "res\\checks1.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ITEMDLG DIALOG DISCARDABLE 0, 0, 169, 119 +STYLE DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Secure Shutdown" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Cancel",IDCANCEL,117,98,45,14 + CONTROL "List1",IDC_ITEMS,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_NOLABELWRAP | LVS_NOCOLUMNHEADER | + LVS_NOSORTHEADER,32,7,130,83 + CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,6,92,156,1 + ICON IDR_NIGHTSEC,IDC_STATIC,6,7,20,20 +END + +IDD_LOG DIALOGEX 0, 0, 330, 158 +STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +EXSTYLE WS_EX_CONTEXTHELP +CAPTION "Secure Shutdown Errors" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Hide",ID_HIDE,281,6,42,14 + CONTROL "List1",IDC_ERROR_LOG,"SysListView32",LVS_REPORT | + LVS_AUTOARRANGE | LVS_NOSORTHEADER | WS_TABSTOP,7,26,316, + 125,WS_EX_CLIENTEDGE + LTEXT "There were errors during the Shutdown process.", + IDC_STATIC,7,6,160,18 + CONTROL "",IDC_MINSIZE,"Static",SS_GRAYRECT | NOT WS_VISIBLE,0,0, + 272,119 + PUSHBUTTON "Save",ID_SAVE,234,6,42,14 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "res\\Night Security Shutdown.ico" +IDR_NIGHTSEC ICON DISCARDABLE "res\\Night Security Stub.ico" +IDI_ERR ICON DISCARDABLE "res\\icon1.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ITEMDLG, DIALOG + BEGIN + LEFTMARGIN, 6 + RIGHTMARGIN, 162 + TOPMARGIN, 7 + BOTTOMMARGIN, 112 + END + + IDD_LOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 323 + TOPMARGIN, 6 + BOTTOMMARGIN, 151 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_ERROR_MENU MENU DISCARDABLE +BEGIN + POPUP "Error" + BEGIN + MENUITEM "Retry", ID_ERROR_RETRY, GRAYED + MENUITEM "Fix", ID_ERROR_FIX, GRAYED + MENUITEM "Clear", ID_ERROR_DELETE + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "Shutdown" + IDS_LOGDLG_DESC "LogDlg Class" + IDS_ABOUTBOX "&About Night Security Shutdown..." + IDS_BATCHFILENAME "DOSmode.bat" + IDS_STARTSECTION "REM *** START *** (Night Security Additions Start Here)\r\nREM DO NOT REMOVE OR MODIFY THE ABOVE LINE\r\nREM ADDITIONS WILL GO TO THE BOTTOM OF THIS BATCH FILE IF NOT FOUND\r\n\r\n" + IDS_BATCHFILEPIF "DOSmode.pif" + IDS_ENDSECTION "\r\n\r\nREM DO NOT REMOVE OR MODIFY THE LINE BELOW\r\nREM ANYTHING BELOW START WILL BE REMOVED IF NOT FOUND\r\nREM *** END *** (Night Security Additions End Here)\r\n" + IDS_STARTSEARHTEXT "*** START ***" + IDS_ENDSEARCHTEXT "*** END ***" + IDS_BATCHFILEPIF_NT "DOSmode.bat" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +1 TYPELIB "Shutdown.tlb" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Shutdown/Shutdown.rgs b/Shutdown/Shutdown.rgs new file mode 100644 index 0000000..e8cf570 --- /dev/null +++ b/Shutdown/Shutdown.rgs @@ -0,0 +1,11 @@ +HKCR +{ + NoRemove AppID + { + {936DD342-8FF9-11D3-BFBD-0020182B97FC} = s 'Shutdown' + 'Shutdown.EXE' + { + val AppID = s {936DD342-8FF9-11D3-BFBD-0020182B97FC} + } + } +} diff --git a/Shutdown/ShutdownApp.cpp b/Shutdown/ShutdownApp.cpp new file mode 100644 index 0000000..714fe55 --- /dev/null +++ b/Shutdown/ShutdownApp.cpp @@ -0,0 +1,128 @@ +// ShutdownApp.cpp: implementation of the CShutdownApp class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "ShutdownApp.h" + +#include + +#include "batchfilecmpt.h" +#include +#include "itemdlg.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CShutdownApp::CShutdownApp() + : CNightSecApp(_T("Secure Shutdown"), _T("NightSecurity.SecureShutdown.{2ED9B360-F6EF-11d2-A5A1-0020182B97FC}")) +{ } + +CShutdownApp::~CShutdownApp() +{ } + +bool CShutdownApp::InitInstance() +{ + // If more than one instance bail out early + if(m_oneInstance.IsAlreadyLoaded()) + { + m_oneInstance.FindAndActivate(_T("#32770"), _T("Secure Shutdown")); + return false; + } + + if(!CNightSecApp::InitInstance()) + return false; + + // If the checklist hasn't been run all the way through yet + // then... + if(!m_settings.GetInt(IS_SETUP_KEY, 0)) + { + // Ask if they'd like to fill it out + if(::MessageBox(NULL, _T("You haven't filled out the Night Security checklist yet. Would you like to do that now?."), _T("Secure Shutdown"), MB_ICONQUESTION | MB_YESNO) == IDYES) + { + // Start the Checklist Program + if(ShellExecute(NULL, _T("open"), string(GetProgramFolder(_Module.m_hInst) + _T("Checklist.exe")), NULL, "", SW_SHOWNORMAL) <= (HINSTANCE)32) + ::MessageBox(NULL, _T("Couldn't start Night Security Checklist. Make sure it's installed properly."), _T("Secure Shutdown"), MB_ICONSTOP); + + return false; + } + + // Only ask'm once. If they answer 'no' then don't bother'm + // again + m_settings.WriteInt(IS_SETUP_KEY, 1); + + } + + g_site.SetSite(); + + // Do the actual shutdown + DoShutdown(NULL); + + // If any components changed data + g_aComponents.SaveComponentData(); + + g_site.ClearSite(); + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return false; +} + +HRESULT CShutdownApp::DoShutdown(HWND hwndParent, long lOptions) +{ + // ... Add Entry for Batchfile Creation Components (host based) + // into array + g_aComponents.push_back(new CBatchFileCmpt); + + // Create Progress Dialog + g_site.m_dlgItems.Create(NULL); + + g_site.m_log.Init(g_site.m_dlgItems); + + // Now comes the real stuff + HRESULT hr = S_OK; + MSG msg; + + int nCurPos = 0; + + // Call Do Shutdown for All Windows Components + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + // If it's a Windows Component + if(g_aComponents[nCnt]->GetType() == COMPONENT_WIN) + { + // If it's currently active + if(g_aComponents[nCnt]->IsEnabled()) + { + // Make Entry Active + g_site.m_dlgItems.SetCurrentItem(nCurPos); + + PEEK_ALL_MESSAGES(msg); + + // Call Shutdown + hr = g_aComponents[nCnt]->DoShutdown(lOptions, g_site.m_dlgItems); + + // Was Component Cancelled? + // All nicely behaved components return E_ABORT + // on cancel + if(hr == E_ABORT) + return E_ABORT; + + // Check it off + // (Check it with a false if failed) + g_site.m_dlgItems.CheckOffItem(nCurPos, SUCCEEDED(hr)); + + PEEK_ALL_MESSAGES(msg); + + // Is Dialog Cancelled? + if(g_site.m_dlgItems.IsCancelled()) + return E_ABORT; + + nCurPos++; + } + } + } + + return S_OK; +} \ No newline at end of file diff --git a/Shutdown/ShutdownApp.h b/Shutdown/ShutdownApp.h new file mode 100644 index 0000000..65dbdac --- /dev/null +++ b/Shutdown/ShutdownApp.h @@ -0,0 +1,25 @@ +// ShutdownApp.h: interface for the CShutdownApp class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_ShutdownApp_H__19178A46_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_) +#define AFX_ShutdownApp_H__19178A46_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "..\common\NightSecApp.h" + +class CShutdownApp : public CNightSecApp +{ +public: + CShutdownApp(); + virtual ~CShutdownApp(); + + virtual bool InitInstance(); + HRESULT DoShutdown(HWND hwndParent, long lOptions = 0); + +}; + +#endif // !defined(AFX_ShutdownApp_H__19178A46_7FDB_11D3_BF9E_0020182B97FC__INCLUDED_) diff --git a/Shutdown/ShutdownCP.h b/Shutdown/ShutdownCP.h new file mode 100644 index 0000000..cbccd51 --- /dev/null +++ b/Shutdown/ShutdownCP.h @@ -0,0 +1,36 @@ +#ifndef _SITEIFACESCP_H_ +#define _SITEIFACESCP_H_ + +#include "../common/events.h" + +template +class CProxyDShutdownEvents : public IConnectionPointImpl +{ + //Warning this class may be recreated by the wizard. +public: + HRESULT Fire_Cancel() + { + CComVariant varResult; + T* pT = static_cast(this); + int nConnectionIndex; + int nConnections = m_vec.GetSize(); + + for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++) + { + pT->Lock(); + CComPtr sp = m_vec.GetAt(nConnectionIndex); + pT->Unlock(); + IDispatch* pDispatch = reinterpret_cast(sp.p); + if (pDispatch != NULL) + { + VariantClear(&varResult); + DISPPARAMS disp = { NULL, NULL, 0, 0 }; + pDispatch->Invoke(0x1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL); + } + } + + return varResult.scode; + } +}; + +#endif \ No newline at end of file diff --git a/Shutdown/ShutdownSite.cpp b/Shutdown/ShutdownSite.cpp new file mode 100644 index 0000000..45dcdd9 --- /dev/null +++ b/Shutdown/ShutdownSite.cpp @@ -0,0 +1,78 @@ +// ShutdownSite.cpp: implementation of the CShutdownSite class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "ShutdownSite.h" + +_COM_SMARTPTR_TYPEDEF(INightSecErrorFix, __uuidof(INightSecErrorFix)); + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CShutdownSite::CShutdownSite() +{ + +} + +CShutdownSite::~CShutdownSite() +{ + +} + +void CShutdownSite::SetSite() +{ + IUnknown* pUnk = NULL; + IObjectWithSitePtr pWithSite; + + IUnknown* pUnkMe = GetUnknown(); + + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + if(SUCCEEDED(pUnk = g_aComponents[nCnt]->GetUnknown()) && pUnk != NULL) + { + pWithSite = pUnk; + if(pWithSite != NULL) + pWithSite->SetSite(pUnkMe); + + pUnk->Release(); + } + } + +} + +void CShutdownSite::ClearSite() +{ + IUnknown* pUnk = NULL; + IObjectWithSitePtr pWithSite; + + for(int nCnt = 0; nCnt < g_aComponents.size(); nCnt++) + { + if(SUCCEEDED(pUnk = g_aComponents[nCnt]->GetUnknown()) && pUnk != NULL) + { + pWithSite = pUnk; + if(pWithSite != NULL) + pWithSite->SetSite(NULL); + + pUnk->Release(); + } + } +} + + +STDMETHODIMP CShutdownSite::AddError(/*[in]*/ IUnknown* pUnk) +{ + INightSecErrorPtr pErr = pUnk; + + if(pErr) + return m_log.AddItem(pErr) ? S_OK : E_FAIL; + + return E_NOINTERFACE; +} + +STDMETHODIMP CShutdownSite::HasErrors(/*[out, retval]*/ BOOL* pbRet) +{ + *pbRet = m_log.HasErrors() ? TRUE : FALSE; + return S_OK; +} diff --git a/Shutdown/ShutdownSite.h b/Shutdown/ShutdownSite.h new file mode 100644 index 0000000..599ebb2 --- /dev/null +++ b/Shutdown/ShutdownSite.h @@ -0,0 +1,64 @@ +// ShutdownSite.h: interface for the CShutdownSite class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_SHUTDOWNSITE_H__F3AF1F43_93A1_11D3_BFC3_0020182B97FC__INCLUDED_) +#define AFX_SHUTDOWNSITE_H__F3AF1F43_93A1_11D3_BFC3_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "shutdown.h" +#include "../common/interfaces.h" + +#include "logdlg.h" +#include "ItemDlg.h" +#include "ShutdownCP.h" + +class ATL_NO_VTABLE CShutdownSite : + public CComObjectRootEx, + public IDispatchImpl, + public INightSecErrorLog, + public CProxyDShutdownEvents, + public IConnectionPointContainerImpl +{ +public: + CShutdownSite(); + virtual ~CShutdownSite(); + + void SetSite(); + void ClearSite(); + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CShutdownSite) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(INightSecSiteInfo) + COM_INTERFACE_ENTRY(INightSecErrorLog) + COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer) +END_COM_MAP() + +BEGIN_CONNECTION_POINT_MAP(CShutdownSite) + CONNECTION_POINT_ENTRY(DIID_DShutdownEvents) +END_CONNECTION_POINT_MAP() + + +// INightSecSiteInfo + STDMETHOD(get_Info)(/*[in]*/ NightSecSiteInfo nsItem, /*[out, retval]*/ VARIANT* pvVal) + { + ::VariantClear(pvVal); + return S_FALSE; + } + +// INightSecErrorLog + STDMETHOD(AddError)(/*[in]*/ IUnknown* pUnk); + STDMETHOD(HasErrors)(/*[out, retval]*/ BOOL* pbRet); + +// Data +public: + CLogDlg m_log; + CItemDlg m_dlgItems; +}; + +#endif // !defined(AFX_SHUTDOWNSITE_H__F3AF1F43_93A1_11D3_BFC3_0020182B97FC__INCLUDED_) diff --git a/Shutdown/Shutdownps.def b/Shutdown/Shutdownps.def new file mode 100644 index 0000000..ee41a99 --- /dev/null +++ b/Shutdown/Shutdownps.def @@ -0,0 +1,11 @@ + +LIBRARY "ShutdownPS" + +DESCRIPTION 'Proxy/Stub DLL' + +EXPORTS + DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + GetProxyDllInfo @3 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE diff --git a/Shutdown/Shutdownps.mk b/Shutdown/Shutdownps.mk new file mode 100644 index 0000000..caf5e22 --- /dev/null +++ b/Shutdown/Shutdownps.mk @@ -0,0 +1,16 @@ + +Shutdownps.dll: dlldata.obj Shutdown_p.obj Shutdown_i.obj + link /dll /out:Shutdownps.dll /def:Shutdownps.def /entry:DllMain dlldata.obj Shutdown_p.obj Shutdown_i.obj \ + kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \ + +.c.obj: + cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \ + $< + +clean: + @del Shutdownps.dll + @del Shutdownps.lib + @del Shutdownps.exp + @del dlldata.obj + @del Shutdown_p.obj + @del Shutdown_i.obj diff --git a/Shutdown/SizingDialog.cpp b/Shutdown/SizingDialog.cpp new file mode 100644 index 0000000..f45e303 --- /dev/null +++ b/Shutdown/SizingDialog.cpp @@ -0,0 +1,20 @@ +// SizingDialog.cpp: implementation of the CSizingDialog class. +// +////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "SizingDialog.h" + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CSizingDialog::CSizingDialog() +{ + +} + +CSizingDialog::~CSizingDialog() +{ + +} diff --git a/Shutdown/SizingDialog.h b/Shutdown/SizingDialog.h new file mode 100644 index 0000000..d6e351a --- /dev/null +++ b/Shutdown/SizingDialog.h @@ -0,0 +1,171 @@ +// SizingDialog.h: interface for the CSizingDialog class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_SIZINGDIALOG_H__5C154C94_9FEF_11D3_82D8_0020182B97FC__INCLUDED_) +#define AFX_SIZINGDIALOG_H__5C154C94_9FEF_11D3_82D8_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +//#define SD_TOP 0x00000001 +#define SD_HORZ 0x00000002 +//#define SD_LEFT 0x00000010 +#define SD_VERT 0x00000020 +#define SD_MOVING 0x00010000 +#define SD_SIZING 0x00020000 + +#define RECT_WIPE(rc) (rc.left = rc.top = rc.right = rc.bottom = 0) +#define IS_RECT_EMPTY(rc) ((rc.left == 0) && (rc.top == 0) && (rc.right == 0) && (rc.bottom == 0)) +#define POINT_WIPE(pt) (pt.x = pt.y = 0) +#define IS_POINT_EMPTY(pt) ((pt.x == 0) && (pt.y == 0)) + +template +class CSizingDialog +{ +public: + CSizingDialog() + { POINT_WIPE(m_ptMin); } + + bool SetMin(UINT nID); + bool SetMin(LPPOINT pt); + + bool SetControlSizing(UINT nID, DWORD dwLocation); + +BEGIN_MSG_MAP(CSizingDialog) + MESSAGE_HANDLER(WM_SIZE, OnSize) + MESSAGE_HANDLER(WM_GETMINMAXINFO, OnGetMinMaxInfo) +END_MSG_MAP() + +protected: +// LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnGetMinMaxInfo(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + + struct POS_DATA + { + DWORD dwLocation; + UINT nID; + RECT rcOffsets; + }; + + typedef vector pos_array; + pos_array m_aPositions; + POINT m_ptMin; +}; + +template +bool CSizingDialog::SetMin(LPPOINT pt) +{ + m_ptMin.x = pt.x; + m_ptMin.y = pt.y; + return true; +} +template +bool CSizingDialog::SetControlSizing(UINT nID, DWORD dwLocation) +{ + T* pThis = (T*)this; + ASSERT(dwLocation); + ASSERT(pThis->GetDlgItem(nID)); + + POS_DATA ps; + ps.dwLocation = dwLocation; + ps.nID = nID; + + RECT rcDlg; + if(!pThis->GetClientRect(&rcDlg)) + return false; + + RECT rcCtl; + if(!::GetWindowRect(pThis->GetDlgItem(nID), &rcCtl)) + return false; + + if(!pThis->ScreenToClient(&rcCtl)) + return false; + + ps.rcOffsets.left = rcCtl.left - rcDlg.left; + ps.rcOffsets.top = rcCtl.top - rcDlg.top; + ps.rcOffsets.right = rcDlg.right - rcCtl.right; + ps.rcOffsets.bottom = rcDlg.bottom - rcCtl.bottom; + + m_aPositions.push_back(ps); + + return true; +} + +template +bool CSizingDialog::SetMin(UINT nID) +{ + T* pThis = (T*)this; + + ASSERT(pThis->GetDlgItem(nID)); + RECT rcCtl; + if(!::GetWindowRect(pThis->GetDlgItem(nID), &rcCtl)) + return false; + + RECT rcDlg; + if(!pThis->GetWindowRect(&rcDlg)) + return false; + + m_ptMin.x = rcCtl.right - rcDlg.left; + m_ptMin.y = rcCtl.bottom - rcDlg.top; + + return true; +} + + +template +LRESULT CSizingDialog::OnGetMinMaxInfo(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + if(IS_POINT_EMPTY(m_ptMin)) + return 0; + + LPMINMAXINFO lpmmi = (LPMINMAXINFO) lParam; // address of structure + lpmmi->ptMinTrackSize = m_ptMin; + return 0; +} + +template +LRESULT CSizingDialog::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + T* pThis = (T*)this; + UINT nWidth = LOWORD(lParam); // width of client area + UINT nHeight = HIWORD(lParam); // height of client area + + for(pos_array::iterator iter = m_aPositions.begin(); iter != m_aPositions.end(); iter++) + { + RECT rc; + if(!::GetWindowRect(pThis->GetDlgItem(iter->nID), &rc)) + continue; + if(!pThis->ScreenToClient(&rc)) + continue; + + if(iter->dwLocation & SD_MOVING) + { + ::SetWindowPos(pThis->GetDlgItem(iter->nID), NULL, + (iter->dwLocation & SD_HORZ) ? + nWidth - iter->rcOffsets.right - rc.right + rc.left : + rc.left, + (iter->dwLocation & SD_VERT) ? + nHeight - iter->rcOffsets.bottom - rc.bottom + rc.top : + rc.top, + 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_DEFERERASE); + } + else if(iter->dwLocation & SD_SIZING) + { + ::SetWindowPos(pThis->GetDlgItem(iter->nID), NULL, 0, 0, + (iter->dwLocation & SD_HORZ) ? + nWidth - iter->rcOffsets.right - rc.left : + rc.right - rc.left, + (iter->dwLocation & SD_VERT) ? + nHeight - iter->rcOffsets.bottom - rc.top : + rc.bottom - rc.top, + SWP_NOMOVE | SWP_NOZORDER | SWP_DEFERERASE); + } + } + + return 0; +} + +#endif // !defined(AFX_SIZINGDIALOG_H__5C154C94_9FEF_11D3_82D8_0020182B97FC__INCLUDED_) diff --git a/Shutdown/StdAfx.cpp b/Shutdown/StdAfx.cpp new file mode 100644 index 0000000..a5eea17 --- /dev/null +++ b/Shutdown/StdAfx.cpp @@ -0,0 +1,12 @@ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +#ifdef _ATL_STATIC_REGISTRY +#include +#include +#endif + +#include diff --git a/Shutdown/StdAfx.h b/Shutdown/StdAfx.h new file mode 100644 index 0000000..0bf2b0a --- /dev/null +++ b/Shutdown/StdAfx.h @@ -0,0 +1,48 @@ +// 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__936DD344_8FF9_11D3_BFBD_0020182B97FC__INCLUDED_) +#define AFX_STDAFX_H__936DD344_8FF9_11D3_BFBD_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define STRICT + +// Windows 95 Compatible +#undef WINVER +#define WINVER 0x0400 +#undef _WIN32_WINNT + +// Don't want our program dependant on some browser! +#undef _WIN32_IE +#define _WIN32_IE 0x0000 + +#define _ATL_APARTMENT_THREADED + +#include +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +#include "../common/types.h" + +#include "shutdownapp.h" + +extern CShutdownApp _Module; +#include +#include +#include + +#include "../common/componentarray.h" +extern CComponentArray g_aComponents; + +#include "ShutdownSite.h" +extern CComObjectGlobal g_site; + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__936DD344_8FF9_11D3_BFBD_0020182B97FC__INCLUDED) diff --git a/Shutdown/res/LogDlg.rgs b/Shutdown/res/LogDlg.rgs new file mode 100644 index 0000000..5c5c83b --- /dev/null +++ b/Shutdown/res/LogDlg.rgs @@ -0,0 +1,21 @@ +HKCR +{ + Shutdown.LogDlg.1 = s 'LogDlg Class' + { + CLSID = s '{F3AF1F45-93A1-11D3-BFC3-0020182B97FC}' + } + Shutdown.LogDlg = s 'LogDlg Class' + { + CLSID = s '{F3AF1F45-93A1-11D3-BFC3-0020182B97FC}' + } + NoRemove CLSID + { + ForceRemove {F3AF1F45-93A1-11D3-BFC3-0020182B97FC} = s 'LogDlg Class' + { + ProgID = s 'Shutdown.LogDlg.1' + VersionIndependentProgID = s 'Shutdown.LogDlg' + val AppID = s '{936DD342-8FF9-11D3-BFBD-0020182B97FC}' + LocalServer32 = s '%Module%' + } + } +} diff --git a/Shutdown/res/Night Security Shutdown.ico b/Shutdown/res/Night Security Shutdown.ico new file mode 100644 index 0000000..e7451cd Binary files /dev/null and b/Shutdown/res/Night Security Shutdown.ico differ diff --git a/Shutdown/res/Night Security Stub.ico b/Shutdown/res/Night Security Stub.ico new file mode 100644 index 0000000..2b50f8a Binary files /dev/null and b/Shutdown/res/Night Security Stub.ico differ diff --git a/Shutdown/res/bitmap1.bmp b/Shutdown/res/bitmap1.bmp new file mode 100644 index 0000000..82879b3 Binary files /dev/null and b/Shutdown/res/bitmap1.bmp differ diff --git a/Shutdown/res/checks1.bmp b/Shutdown/res/checks1.bmp new file mode 100644 index 0000000..edf808d Binary files /dev/null and b/Shutdown/res/checks1.bmp differ diff --git a/Shutdown/res/icon1.ico b/Shutdown/res/icon1.ico new file mode 100644 index 0000000..3fad43c Binary files /dev/null and b/Shutdown/res/icon1.ico differ diff --git a/Shutdown/resource.h b/Shutdown/resource.h new file mode 100644 index 0000000..75fde58 --- /dev/null +++ b/Shutdown/resource.h @@ -0,0 +1,42 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Shutdown.rc +// +#define IDS_PROJNAME 100 +#define IDR_Shutdown 100 +#define IDS_LOGDLG_DESC 101 +#define IDS_ABOUTBOX 102 +#define IDS_BATCHFILENAME 103 +#define IDS_STARTSECTION 104 +#define IDS_BATCHFILEPIF 105 +#define IDS_ENDSECTION 106 +#define IDS_STARTSEARHTEXT 107 +#define IDS_ENDSEARCHTEXT 108 +#define IDS_BATCHFILEPIF_NT 109 +#define IDR_MAINFRAME 128 +#define IDR_NIGHTSEC 130 +#define IDB_CHECKS 131 +#define IDD_ITEMDLG 131 +#define IDB_ERRORS 132 +#define IDD_LOG 201 +#define ID_HIDE 201 +#define IDR_ERROR_MENU 201 +#define IDC_ERROR_LOG 202 +#define IDI_ERR 202 +#define IDC_MINSIZE 203 +#define ID_SAVE 204 +#define IDC_ITEMS 1004 +#define ID_ERROR_DELETE 32769 +#define ID_ERROR_FIX 32771 +#define ID_ERROR_RETRY 32772 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 203 +#define _APS_NEXT_COMMAND_VALUE 32773 +#define _APS_NEXT_CONTROL_VALUE 204 +#define _APS_NEXT_SYMED_VALUE 111 +#endif +#endif -- cgit v1.2.3