--- /dev/null
+\r
+Microsoft Visual Studio Solution File, Format Version 11.00\r
+# Visual Studio 2010\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShellExtension", "ShellExtension\ShellExtension.vcxproj", "{75175CC6-2219-443D-A70E-84D6A86B3245}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompleteEraser", "CompleteEraser\CompleteEraser.csproj", "{96FE14DF-32CB-4826-A6D8-304AD554BAA6}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|Mixed Platforms = Debug|Mixed Platforms\r
+ Debug|Win32 = Debug|Win32\r
+ Debug|x64 = Debug|x64\r
+ Debug|x86 = Debug|x86\r
+ Release|Mixed Platforms = Release|Mixed Platforms\r
+ Release|Win32 = Release|Win32\r
+ Release|x64 = Release|x64\r
+ Release|x86 = Release|x86\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Debug|Mixed Platforms.Build.0 = Debug|Win32\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Debug|Win32.Build.0 = Debug|Win32\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Debug|x64.ActiveCfg = Debug|x64\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Debug|x64.Build.0 = Debug|x64\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Debug|x86.ActiveCfg = Debug|x64\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Release|Mixed Platforms.ActiveCfg = Release|x64\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Release|Mixed Platforms.Build.0 = Release|x64\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Release|Win32.ActiveCfg = Release|Win32\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Release|Win32.Build.0 = Release|Win32\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Release|x64.ActiveCfg = Release|x64\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Release|x64.Build.0 = Release|x64\r
+ {75175CC6-2219-443D-A70E-84D6A86B3245}.Release|x86.ActiveCfg = Release|x64\r
+ {96FE14DF-32CB-4826-A6D8-304AD554BAA6}.Debug|Mixed Platforms.ActiveCfg = Debug|x86\r
+ {96FE14DF-32CB-4826-A6D8-304AD554BAA6}.Debug|Mixed Platforms.Build.0 = Debug|x86\r
+ {96FE14DF-32CB-4826-A6D8-304AD554BAA6}.Debug|Win32.ActiveCfg = Debug|x86\r
+ {96FE14DF-32CB-4826-A6D8-304AD554BAA6}.Debug|x64.ActiveCfg = Debug|x86\r
+ {96FE14DF-32CB-4826-A6D8-304AD554BAA6}.Debug|x86.ActiveCfg = Debug|x86\r
+ {96FE14DF-32CB-4826-A6D8-304AD554BAA6}.Debug|x86.Build.0 = Debug|x86\r
+ {96FE14DF-32CB-4826-A6D8-304AD554BAA6}.Release|Mixed Platforms.ActiveCfg = Release|x86\r
+ {96FE14DF-32CB-4826-A6D8-304AD554BAA6}.Release|Mixed Platforms.Build.0 = Release|x86\r
+ {96FE14DF-32CB-4826-A6D8-304AD554BAA6}.Release|Win32.ActiveCfg = Release|x86\r
+ {96FE14DF-32CB-4826-A6D8-304AD554BAA6}.Release|x64.ActiveCfg = Release|x86\r
+ {96FE14DF-32CB-4826-A6D8-304AD554BAA6}.Release|x86.ActiveCfg = Release|x86\r
+ {96FE14DF-32CB-4826-A6D8-304AD554BAA6}.Release|x86.Build.0 = Release|x86\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+EndGlobal\r
--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+using System.Runtime.InteropServices;\r
+using System.IO;\r
+\r
+namespace CompleteEraser\r
+{\r
+ class BreakRecyleBin : IOperation\r
+ {\r
+ [DllImport("shell32.dll")]\r
+ static extern int SHEmptyRecycleBin(IntPtr hWnd, string pszRootPath,uint dwFlags);\r
+ // No dialog box confirming the deletion of the objects will be displayed.\r
+ const uint SHERB_NOCONFIRMATION = 0x00000001;\r
+ // No dialog box indicating the progress will be displayed.\r
+ const uint SHERB_NOPROGRESSUI = 0x00000002;\r
+ // No sound will be played when the operation is complete.\r
+ const uint SHERB_NOSOUND = 0x00000004; \r
+\r
+ public event ProgressingEventHandler Progressing;\r
+ public event ProgressedEventHandler Progressed;\r
+\r
+ public void Execute(IEnumerable<string> files)\r
+ {\r
+ foreach (string file in files)\r
+ {\r
+ Progressing(this, new ProgressingEventArgs(file));\r
+\r
+ try\r
+ {\r
+ FileBreaker.BreakFileOrFolder(file);\r
+ }\r
+ catch(IOException){\r
+ //ゴミ箱の中にフォルダーがあるとIOErrorがでるので握りつぶす\r
+ }\r
+\r
+ Progressed(this, new ProgressedEventArgs(file,null));\r
+ }\r
+\r
+ Progressing(this, new ProgressingEventArgs(null));\r
+ SHEmptyRecycleBin(IntPtr.Zero, "", SHERB_NOCONFIRMATION | SHERB_NOPROGRESSUI);\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>\r
+ <ProductVersion>8.0.30703</ProductVersion>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectGuid>{96FE14DF-32CB-4826-A6D8-304AD554BAA6}</ProjectGuid>\r
+ <OutputType>WinExe</OutputType>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <RootNamespace>CompleteEraser</RootNamespace>\r
+ <AssemblyName>CompleteEraser</AssemblyName>\r
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>\r
+ <FileAlignment>512</FileAlignment>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">\r
+ <PlatformTarget>x86</PlatformTarget>\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <OutputPath>bin\Debug\</OutputPath>\r
+ <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">\r
+ <PlatformTarget>x86</PlatformTarget>\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <OutputPath>bin\Release\</OutputPath>\r
+ <DefineConstants>TRACE</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ </PropertyGroup>\r
+ <ItemGroup>\r
+ <Reference Include="System" />\r
+ <Reference Include="System.Data" />\r
+ <Reference Include="System.Data.Linq" />\r
+ <Reference Include="System.Drawing" />\r
+ <Reference Include="System.Windows.Forms" />\r
+ <Reference Include="System.XML" />\r
+ <Reference Include="System.Xml.Linq" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Compile Include="BreakRecyleBin.cs" />\r
+ <Compile Include="FileBreaker.cs" />\r
+ <Compile Include="IOperation.cs" />\r
+ <Compile Include="MainForm.cs">\r
+ <SubType>Form</SubType>\r
+ </Compile>\r
+ <Compile Include="MainForm.Designer.cs">\r
+ <DependentUpon>MainForm.cs</DependentUpon>\r
+ </Compile>\r
+ <Compile Include="Program.cs" />\r
+ <Compile Include="Properties\AssemblyInfo.cs" />\r
+ <Compile Include="RecyleBinCollection.cs" />\r
+ <Compile Include="SharedInfo.cs" />\r
+ <Compile Include="ShrredFiles.cs" />\r
+ <EmbeddedResource Include="MainForm.resx">\r
+ <DependentUpon>MainForm.cs</DependentUpon>\r
+ </EmbeddedResource>\r
+ <EmbeddedResource Include="Properties\Resources.resx">\r
+ <Generator>ResXFileCodeGenerator</Generator>\r
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>\r
+ <SubType>Designer</SubType>\r
+ </EmbeddedResource>\r
+ <Compile Include="Properties\Resources.Designer.cs">\r
+ <AutoGen>True</AutoGen>\r
+ <DependentUpon>Resources.resx</DependentUpon>\r
+ <DesignTime>True</DesignTime>\r
+ </Compile>\r
+ <None Include="app.config" />\r
+ <None Include="Properties\Settings.settings">\r
+ <Generator>SettingsSingleFileGenerator</Generator>\r
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>\r
+ </None>\r
+ <Compile Include="Properties\Settings.Designer.cs">\r
+ <AutoGen>True</AutoGen>\r
+ <DependentUpon>Settings.settings</DependentUpon>\r
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>\r
+ </Compile>\r
+ </ItemGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+</Project>
\ No newline at end of file
--- /dev/null
+using System;\r
+using System.Text;\r
+using System.Collections.Generic;\r
+using System.IO;\r
+using System.Security.AccessControl;\r
+using System.Security.Principal;\r
+using System.Linq;\r
+using CompleteEraser.Properties;\r
+\r
+namespace CompleteEraser\r
+{\r
+ class FileBreaker\r
+ {\r
+\r
+ public static void BreakFileOrFolder(string path)\r
+ {\r
+ if (Directory.Exists(path))\r
+ BreakFolder(path);\r
+ else if (File.Exists(path))\r
+ BreakFile(path);\r
+ }\r
+\r
+ public static void BreakFile(string file)\r
+ {\r
+ FileAttributes attr = File.GetAttributes(file);\r
+ if ((attr & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)\r
+ File.SetAttributes(file, attr & ~FileAttributes.ReadOnly);\r
+\r
+ string ext = Path.GetExtension(file);\r
+\r
+ if (Settings.Default.AlwaysSlowSpeed || Settings.Default.SlowSpeedExt.IndexOf(ext) != -1)\r
+ BreakFileSlowSpeed(file);\r
+ else\r
+ BreakFileHiSpeed(file);\r
+ \r
+ string newFile = GenerateRandoName(Path.GetDirectoryName(file), file.Length);\r
+ File.Move(file, newFile);\r
+ \r
+ File.Delete(newFile);\r
+ }\r
+\r
+ private static void BreakFileSlowSpeed(string file)\r
+ {\r
+ FileStream fs = new FileStream(file, FileMode.Open);\r
+ fs.Seek(0, SeekOrigin.Begin);\r
+ for (long i = 0; i < fs.Length; i++)\r
+ fs.WriteByte(0);\r
+ fs.Close();\r
+ }\r
+\r
+ private static void BreakFileHiSpeed(string file)\r
+ {\r
+ FileStream fs = new FileStream(file, FileMode.Open);\r
+ fs.Seek(0, SeekOrigin.Begin);\r
+\r
+ byte[] data = new byte[Settings.Default.FillLengthAtHiSpeed];\r
+ fs.Write(data, 0, data.Length);\r
+ fs.Seek(-data.Length, SeekOrigin.End);\r
+ fs.Write(data, 0, data.Length);\r
+ fs.Close();\r
+ }\r
+\r
+ public static void BreakFolder(string folder)\r
+ {\r
+ IEnumerable<string> files = Directory.GetFiles(folder, "*.+", SearchOption.AllDirectories);\r
+ foreach (string file in files)\r
+ BreakFile(file);\r
+ string newName = GenerateRandoName(Path.GetDirectoryName(folder), Path.GetFileName(folder).Length);\r
+ if ((FileAccessPermissionHelper.GetCurrentAccessRule(folder).FileSystemRights & FileSystemRights.Modify) == FileSystemRights.Modify)\r
+ Directory.Move(folder, newName);\r
+ else\r
+ throw new UnauthorizedAccessException();\r
+ Directory.Delete(newName, true);\r
+ }\r
+\r
+ private static string GenerateRandoName(string dirpath, int length)\r
+ {\r
+ string list = "abcdefghijklmnopqrstuvwxyz0123456789";\r
+ Random rnd = new Random();\r
+ StringBuilder output = new StringBuilder();\r
+ for (int i = 0; i < length; i++)\r
+ output.Append(list[rnd.Next(list.Length - 1)]);\r
+ return dirpath + "\\" + output.ToString();\r
+ }\r
+ }\r
+\r
+ public static class FileAccessPermissionHelper\r
+ {\r
+ // 書き込み権限持ってる?\r
+ public static bool IsGotPermission(string path)\r
+ {\r
+ var rule = GetCurrentAccessRule(path);\r
+ return ((rule != null) && ((rule.FileSystemRights & FileSystemRights.Write) == FileSystemRights.Write));\r
+ }\r
+\r
+ // 現在のユーザーが持っている指定パスのFileSystemAccessRuleを得る\r
+ public static FileSystemAccessRule GetCurrentAccessRule(string path)\r
+ {\r
+ var fileSecurity = File.GetAccessControl(path);\r
+ var rules = fileSecurity.GetAccessRules(true, true, typeof(SecurityIdentifier)).OfType<FileSystemAccessRule>();\r
+ var currentIdentity = WindowsIdentity.GetCurrent();\r
+ var sids = new[] { currentIdentity.User }.Concat(currentIdentity.Groups);\r
+\r
+ // アクセスルール内にユーザーSIDがある?無ければグループSIDも探す\r
+ return rules.FirstOrDefault(rule => sids.Contains(rule.IdentityReference));\r
+ }\r
+ }\r
+}\r
--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+\r
+namespace CompleteEraser\r
+{\r
+ class ProgressingEventArgs : EventArgs\r
+ {\r
+ public string fileName;\r
+ public ProgressingEventArgs(string filename)\r
+ {\r
+ this.fileName = filename;\r
+ }\r
+ }\r
+ class ProgressedEventArgs : EventArgs\r
+ {\r
+ public string fileName;\r
+ public bool breaked;\r
+ public bool retry;\r
+ public Exception ex;\r
+ public ProgressedEventArgs(string filename, Exception ex)\r
+ {\r
+ this.fileName = filename;\r
+ this.ex = ex;\r
+ this.breaked = false;\r
+ this.retry = false;\r
+ }\r
+ }\r
+\r
+ delegate void ProgressingEventHandler(object sender, ProgressingEventArgs e);\r
+ delegate void ProgressedEventHandler(object sender, ProgressedEventArgs e);\r
+ \r
+ interface IOperation\r
+ {\r
+ event ProgressingEventHandler Progressing;\r
+ event ProgressedEventHandler Progressed;\r
+ void Execute(IEnumerable<string> targets);\r
+ }\r
+}\r
--- /dev/null
+namespace CompleteEraser\r
+{\r
+ partial class MainForm\r
+ {\r
+ /// <summary>\r
+ /// Required designer variable.\r
+ /// </summary>\r
+ private System.ComponentModel.IContainer components = null;\r
+\r
+ /// <summary>\r
+ /// Clean up any resources being used.\r
+ /// </summary>\r
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+ protected override void Dispose(bool disposing)\r
+ {\r
+ if (disposing && (components != null))\r
+ {\r
+ components.Dispose();\r
+ }\r
+ base.Dispose(disposing);\r
+ }\r
+\r
+ #region Windows Form Designer generated code\r
+\r
+ /// <summary>\r
+ /// Required method for Designer support - do not modify\r
+ /// the contents of this method with the code editor.\r
+ /// </summary>\r
+ private void InitializeComponent()\r
+ {\r
+ this.label1 = new System.Windows.Forms.Label();\r
+ this.progressBar1 = new System.Windows.Forms.ProgressBar();\r
+ this.button1 = new System.Windows.Forms.Button();\r
+ this.label2 = new System.Windows.Forms.Label();\r
+ this.SuspendLayout();\r
+ // \r
+ // label1\r
+ // \r
+ this.label1.AutoSize = true;\r
+ this.label1.Location = new System.Drawing.Point(21, 13);\r
+ this.label1.Name = "label1";\r
+ this.label1.Size = new System.Drawing.Size(106, 14);\r
+ this.label1.TabIndex = 0;\r
+ this.label1.Text = "ファイルを削除中です";\r
+ // \r
+ // progressBar1\r
+ // \r
+ this.progressBar1.Location = new System.Drawing.Point(12, 62);\r
+ this.progressBar1.Name = "progressBar1";\r
+ this.progressBar1.Size = new System.Drawing.Size(266, 23);\r
+ this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;\r
+ this.progressBar1.TabIndex = 1;\r
+ // \r
+ // button1\r
+ // \r
+ this.button1.Location = new System.Drawing.Point(113, 102);\r
+ this.button1.Name = "button1";\r
+ this.button1.Size = new System.Drawing.Size(64, 23);\r
+ this.button1.TabIndex = 2;\r
+ this.button1.Text = "キャンセル";\r
+ this.button1.UseVisualStyleBackColor = true;\r
+ this.button1.Click += new System.EventHandler(this.button1_Click);\r
+ // \r
+ // label2\r
+ // \r
+ this.label2.AutoSize = true;\r
+ this.label2.Location = new System.Drawing.Point(21, 36);\r
+ this.label2.Name = "label2";\r
+ this.label2.Size = new System.Drawing.Size(40, 14);\r
+ this.label2.TabIndex = 3;\r
+ this.label2.Text = "Status";\r
+ // \r
+ // MainForm\r
+ // \r
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);\r
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+ this.ClientSize = new System.Drawing.Size(290, 147);\r
+ this.Controls.Add(this.label2);\r
+ this.Controls.Add(this.button1);\r
+ this.Controls.Add(this.progressBar1);\r
+ this.Controls.Add(this.label1);\r
+ this.Name = "MainForm";\r
+ this.Text = "MainForm";\r
+ this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed);\r
+ this.Shown += new System.EventHandler(this.MainForm_Shown);\r
+ this.ResumeLayout(false);\r
+ this.PerformLayout();\r
+\r
+ }\r
+\r
+ #endregion\r
+\r
+ private System.Windows.Forms.Label label1;\r
+ private System.Windows.Forms.ProgressBar progressBar1;\r
+ private System.Windows.Forms.Button button1;\r
+ private System.Windows.Forms.Label label2;\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+using System;\r
+using System.IO;\r
+using System.Text;\r
+using System.Threading;\r
+using System.Threading.Tasks;\r
+using System.Collections.Generic;\r
+using System.Windows.Forms;\r
+using System.Diagnostics;\r
+using System.Linq;\r
+using CompleteEraser.Properties;\r
+\r
+namespace CompleteEraser\r
+{\r
+ public partial class MainForm : Form\r
+ {\r
+ CancellationTokenSource tokenSource;\r
+ Task task;\r
+ SharedInfo info;\r
+ IEnumerable<string> files;\r
+ IOperation op;\r
+\r
+ public MainForm()\r
+ {\r
+ InitializeComponent();\r
+ }\r
+\r
+ public MainForm(string[] args) : this()\r
+ {\r
+ if (args.Length == 0)\r
+ {\r
+ try\r
+ {\r
+ this.info = new SharedInfo();\r
+ this.files = this.info;\r
+ this.progressBar1.Maximum = this.files.Count();\r
+ this.op = new ShrredFiles();\r
+ }\r
+ catch (IOException)\r
+ {\r
+ MessageBox.Show("ファイルかフォルダーを指定してください");\r
+ return;\r
+ }\r
+ }\r
+ else if (args[0] == "/recylebin")\r
+ {\r
+ this.op = new BreakRecyleBin();\r
+ this.files = new RecyleBinCollection();\r
+ }else{\r
+ this.op = new ShrredFiles();\r
+ this.files = args;\r
+ }\r
+ this.op.Progressing += new ProgressingEventHandler(op_Progressing);\r
+ this.op.Progressed += new ProgressedEventHandler(op_Progressed);\r
+ }\r
+\r
+ private void MainForm_Shown(object sender, EventArgs e)\r
+ {\r
+ if (op == null)\r
+ {\r
+ this.Close();\r
+ return;\r
+ }\r
+\r
+ this.tokenSource = new CancellationTokenSource();\r
+\r
+ this.progressBar1.Maximum = 1000;\r
+ this.task = Task.Factory.StartNew(() =>\r
+ {\r
+ op.Execute(this.files);\r
+ });\r
+ this.task.ContinueWith((t) =>\r
+ {\r
+ this.Invoke(new Action(() =>\r
+ {\r
+ this.Close();\r
+ }));\r
+ });\r
+ }\r
+\r
+ void op_Progressing(object sender, ProgressingEventArgs e)\r
+ {\r
+ this.Invoke(new Action(() =>\r
+ {\r
+ if (e.fileName == null)\r
+ this.label2.Text = Resources.FINAL_PROCESS;\r
+ else\r
+ this.label2.Text = string.Format(Resources.FILE_PROCESS, this.TrimFullPath(e.fileName));\r
+ }));\r
+ }\r
+\r
+ void op_Progressed(object sender, ProgressedEventArgs e)\r
+ {\r
+ CancellationToken token = this.tokenSource.Token;\r
+ if (token.IsCancellationRequested)\r
+ token.ThrowIfCancellationRequested();\r
+\r
+ if (e.ex == null)\r
+ {\r
+ this.Invoke(new Action(() => { if (this.progressBar1.Value < this.progressBar1.Maximum) this.progressBar1.Value++; }));\r
+ }else if(e.ex is IOException){\r
+ DialogResult result = MessageBox.Show(e.ex.Message, "", MessageBoxButtons.AbortRetryIgnore);\r
+ switch (result)\r
+ {\r
+ case System.Windows.Forms.DialogResult.Abort:\r
+ e.breaked = true;\r
+ break;\r
+ case System.Windows.Forms.DialogResult.Retry:\r
+ e.retry = true;\r
+ break;\r
+ }\r
+ }\r
+ else if (e.ex is UnauthorizedAccessException)\r
+ {\r
+ if (MessageBox.Show(string.Format(Resources.CONFIRMRUNAS, e.fileName), "", MessageBoxButtons.YesNo) == DialogResult.Yes)\r
+ {\r
+ ProcessStartInfo info = new ProcessStartInfo(Application.ExecutablePath);\r
+ info.Verb = "runas";\r
+ info.UseShellExecute = true;\r
+ Process.Start(info);\r
+ this.Hide();\r
+ Thread.Sleep(1000);\r
+ e.breaked = true;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ MessageBox.Show(e.ex.Message);\r
+ e.breaked = true;\r
+ }\r
+ }\r
+\r
+ private void button1_Click(object sender, EventArgs e)\r
+ {\r
+ tokenSource.Cancel();\r
+ }\r
+\r
+ private void MainForm_FormClosed(object sender, FormClosedEventArgs e)\r
+ {\r
+ if(tokenSource != null)\r
+ tokenSource.Cancel();\r
+ if (this.info != null)\r
+ this.info.Dispose();\r
+ }\r
+\r
+ public string TrimFullPath(string filepath)\r
+ {\r
+ if (filepath == null || filepath == "")\r
+ return string.Empty;\r
+ string DirectoryPart = Path.GetDirectoryName(filepath);\r
+ string FilenamePart = Path.GetFileName(filepath);\r
+ string[] slice = DirectoryPart.Split('\\');\r
+ if (slice.Length > 3)\r
+ {\r
+ DirectoryPart = slice[0] + "\\..\\" + slice[slice.Length - 1];\r
+ return DirectoryPart + "\\" + FilenamePart;\r
+ }\r
+ else\r
+ return filepath;\r
+ }\r
+\r
+ }\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+ <!-- \r
+ Microsoft ResX Schema \r
+ \r
+ Version 2.0\r
+ \r
+ The primary goals of this format is to allow a simple XML format \r
+ that is mostly human readable. The generation and parsing of the \r
+ various data types are done through the TypeConverter classes \r
+ associated with the data types.\r
+ \r
+ Example:\r
+ \r
+ ... ado.net/XML headers & schema ...\r
+ <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+ <resheader name="version">2.0</resheader>\r
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+ <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+ </data>\r
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+ <comment>This is a comment</comment>\r
+ </data>\r
+ \r
+ There are any number of "resheader" rows that contain simple \r
+ name/value pairs.\r
+ \r
+ Each data row contains a name, and value. The row also contains a \r
+ type or mimetype. Type corresponds to a .NET class that support \r
+ text/value conversion through the TypeConverter architecture. \r
+ Classes that don't support this are serialized and stored with the \r
+ mimetype set.\r
+ \r
+ The mimetype is used for serialized objects, and tells the \r
+ ResXResourceReader how to depersist the object. This is currently not \r
+ extensible. For a given mimetype the value must be set accordingly:\r
+ \r
+ Note - application/x-microsoft.net.object.binary.base64 is the format \r
+ that the ResXResourceWriter will generate, however the reader can \r
+ read any of the formats listed below.\r
+ \r
+ mimetype: application/x-microsoft.net.object.binary.base64\r
+ value : The object must be serialized with \r
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+ : and then encoded with base64 encoding.\r
+ \r
+ mimetype: application/x-microsoft.net.object.soap.base64\r
+ value : The object must be serialized with \r
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+ : and then encoded with base64 encoding.\r
+\r
+ mimetype: application/x-microsoft.net.object.bytearray.base64\r
+ value : The object must be serialized into a byte array \r
+ : using a System.ComponentModel.TypeConverter\r
+ : and then encoded with base64 encoding.\r
+ -->\r
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+ <xsd:element name="root" msdata:IsDataSet="true">\r
+ <xsd:complexType>\r
+ <xsd:choice maxOccurs="unbounded">\r
+ <xsd:element name="metadata">\r
+ <xsd:complexType>\r
+ <xsd:sequence>\r
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+ </xsd:sequence>\r
+ <xsd:attribute name="name" use="required" type="xsd:string" />\r
+ <xsd:attribute name="type" type="xsd:string" />\r
+ <xsd:attribute name="mimetype" type="xsd:string" />\r
+ <xsd:attribute ref="xml:space" />\r
+ </xsd:complexType>\r
+ </xsd:element>\r
+ <xsd:element name="assembly">\r
+ <xsd:complexType>\r
+ <xsd:attribute name="alias" type="xsd:string" />\r
+ <xsd:attribute name="name" type="xsd:string" />\r
+ </xsd:complexType>\r
+ </xsd:element>\r
+ <xsd:element name="data">\r
+ <xsd:complexType>\r
+ <xsd:sequence>\r
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+ </xsd:sequence>\r
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+ <xsd:attribute ref="xml:space" />\r
+ </xsd:complexType>\r
+ </xsd:element>\r
+ <xsd:element name="resheader">\r
+ <xsd:complexType>\r
+ <xsd:sequence>\r
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+ </xsd:sequence>\r
+ <xsd:attribute name="name" type="xsd:string" use="required" />\r
+ </xsd:complexType>\r
+ </xsd:element>\r
+ </xsd:choice>\r
+ </xsd:complexType>\r
+ </xsd:element>\r
+ </xsd:schema>\r
+ <resheader name="resmimetype">\r
+ <value>text/microsoft-resx</value>\r
+ </resheader>\r
+ <resheader name="version">\r
+ <value>2.0</value>\r
+ </resheader>\r
+ <resheader name="reader">\r
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+ </resheader>\r
+ <resheader name="writer">\r
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+ </resheader>\r
+</root>
\ No newline at end of file
--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+using System.Windows.Forms;\r
+\r
+namespace CompleteEraser\r
+{\r
+ static class Program\r
+ {\r
+ /// <summary>\r
+ /// アプリケーションのメイン エントリ ポイントです。\r
+ /// </summary>\r
+ [STAThread]\r
+ static void Main(string[] args)\r
+ {\r
+ Application.Run(new MainForm(args));\r
+ }\r
+ }\r
+}\r
--- /dev/null
+using System.Reflection;\r
+using System.Runtime.CompilerServices;\r
+using System.Runtime.InteropServices;\r
+\r
+// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。\r
+// アセンブリに関連付けられている情報を変更するには、\r
+// これらの属性値を変更してください。\r
+[assembly: AssemblyTitle("CompleteEraser")]\r
+[assembly: AssemblyDescription("")]\r
+[assembly: AssemblyConfiguration("")]\r
+[assembly: AssemblyCompany("Microsoft")]\r
+[assembly: AssemblyProduct("CompleteEraser")]\r
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]\r
+[assembly: AssemblyTrademark("")]\r
+[assembly: AssemblyCulture("")]\r
+\r
+// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから \r
+// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、\r
+// その型の ComVisible 属性を true に設定してください。\r
+[assembly: ComVisible(false)]\r
+\r
+// 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です\r
+[assembly: Guid("2959740f-cde7-445c-88d1-3cc3f9ad1dc9")]\r
+\r
+// アセンブリのバージョン情報は、以下の 4 つの値で構成されています:\r
+//\r
+// Major Version\r
+// Minor Version \r
+// Build Number\r
+// Revision\r
+//\r
+// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を \r
+// 既定値にすることができます:\r
+// [assembly: AssemblyVersion("1.0.*")]\r
+[assembly: AssemblyVersion("1.9.0.0")]\r
+[assembly: AssemblyFileVersion("1.9.0.0")]\r
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// このコードはツールによって生成されました。\r
+// ランタイム バージョン:4.0.30319.468\r
+//\r
+// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、\r
+// コードが再生成されるときに損失したりします。\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace CompleteEraser.Properties {\r
+ using System;\r
+ \r
+ \r
+ /// <summary>\r
+ /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。\r
+ /// </summary>\r
+ // このクラスは StronglyTypedResourceBuilder クラスが ResGen\r
+ // または Visual Studio のようなツールを使用して自動生成されました。\r
+ // メンバーを追加または削除するには、.ResX ファイルを編集して、/str オプションと共に\r
+ // ResGen を実行し直すか、または VS プロジェクトをビルドし直します。\r
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]\r
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
+ internal class Resources {\r
+ \r
+ private static global::System.Resources.ResourceManager resourceMan;\r
+ \r
+ private static global::System.Globalization.CultureInfo resourceCulture;\r
+ \r
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]\r
+ internal Resources() {\r
+ }\r
+ \r
+ /// <summary>\r
+ /// このクラスで使用されているキャッシュされた ResourceManager インスタンスを返します。\r
+ /// </summary>\r
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r
+ internal static global::System.Resources.ResourceManager ResourceManager {\r
+ get {\r
+ if (object.ReferenceEquals(resourceMan, null)) {\r
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CompleteEraser.Properties.Resources", typeof(Resources).Assembly);\r
+ resourceMan = temp;\r
+ }\r
+ return resourceMan;\r
+ }\r
+ }\r
+ \r
+ /// <summary>\r
+ /// 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、\r
+ /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。\r
+ /// </summary>\r
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r
+ internal static global::System.Globalization.CultureInfo Culture {\r
+ get {\r
+ return resourceCulture;\r
+ }\r
+ set {\r
+ resourceCulture = value;\r
+ }\r
+ }\r
+ \r
+ /// <summary>\r
+ /// {0}を削除するには管理者権限が必要なようです。昇格しますか に類似しているローカライズされた文字列を検索します。\r
+ /// </summary>\r
+ internal static string CONFIRMRUNAS {\r
+ get {\r
+ return ResourceManager.GetString("CONFIRMRUNAS", resourceCulture);\r
+ }\r
+ }\r
+ \r
+ /// <summary>\r
+ /// {0}を処理中 に類似しているローカライズされた文字列を検索します。\r
+ /// </summary>\r
+ internal static string FILE_PROCESS {\r
+ get {\r
+ return ResourceManager.GetString("FILE_PROCESS", resourceCulture);\r
+ }\r
+ }\r
+ \r
+ /// <summary>\r
+ /// 最終処理中 に類似しているローカライズされた文字列を検索します。\r
+ /// </summary>\r
+ internal static string FINAL_PROCESS {\r
+ get {\r
+ return ResourceManager.GetString("FINAL_PROCESS", resourceCulture);\r
+ }\r
+ }\r
+ \r
+ /// <summary>\r
+ /// {0}を削除することができません に類似しているローカライズされた文字列を検索します。\r
+ /// </summary>\r
+ internal static string IOERROR {\r
+ get {\r
+ return ResourceManager.GetString("IOERROR", resourceCulture);\r
+ }\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+ <!-- \r
+ Microsoft ResX Schema \r
+ \r
+ Version 2.0\r
+ \r
+ The primary goals of this format is to allow a simple XML format \r
+ that is mostly human readable. The generation and parsing of the \r
+ various data types are done through the TypeConverter classes \r
+ associated with the data types.\r
+ \r
+ Example:\r
+ \r
+ ... ado.net/XML headers & schema ...\r
+ <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+ <resheader name="version">2.0</resheader>\r
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+ <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+ </data>\r
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+ <comment>This is a comment</comment>\r
+ </data>\r
+ \r
+ There are any number of "resheader" rows that contain simple \r
+ name/value pairs.\r
+ \r
+ Each data row contains a name, and value. The row also contains a \r
+ type or mimetype. Type corresponds to a .NET class that support \r
+ text/value conversion through the TypeConverter architecture. \r
+ Classes that don't support this are serialized and stored with the \r
+ mimetype set.\r
+ \r
+ The mimetype is used for serialized objects, and tells the \r
+ ResXResourceReader how to depersist the object. This is currently not \r
+ extensible. For a given mimetype the value must be set accordingly:\r
+ \r
+ Note - application/x-microsoft.net.object.binary.base64 is the format \r
+ that the ResXResourceWriter will generate, however the reader can \r
+ read any of the formats listed below.\r
+ \r
+ mimetype: application/x-microsoft.net.object.binary.base64\r
+ value : The object must be serialized with \r
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+ : and then encoded with base64 encoding.\r
+ \r
+ mimetype: application/x-microsoft.net.object.soap.base64\r
+ value : The object must be serialized with \r
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+ : and then encoded with base64 encoding.\r
+\r
+ mimetype: application/x-microsoft.net.object.bytearray.base64\r
+ value : The object must be serialized into a byte array \r
+ : using a System.ComponentModel.TypeConverter\r
+ : and then encoded with base64 encoding.\r
+ -->\r
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+ <xsd:element name="root" msdata:IsDataSet="true">\r
+ <xsd:complexType>\r
+ <xsd:choice maxOccurs="unbounded">\r
+ <xsd:element name="metadata">\r
+ <xsd:complexType>\r
+ <xsd:sequence>\r
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+ </xsd:sequence>\r
+ <xsd:attribute name="name" use="required" type="xsd:string" />\r
+ <xsd:attribute name="type" type="xsd:string" />\r
+ <xsd:attribute name="mimetype" type="xsd:string" />\r
+ <xsd:attribute ref="xml:space" />\r
+ </xsd:complexType>\r
+ </xsd:element>\r
+ <xsd:element name="assembly">\r
+ <xsd:complexType>\r
+ <xsd:attribute name="alias" type="xsd:string" />\r
+ <xsd:attribute name="name" type="xsd:string" />\r
+ </xsd:complexType>\r
+ </xsd:element>\r
+ <xsd:element name="data">\r
+ <xsd:complexType>\r
+ <xsd:sequence>\r
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+ </xsd:sequence>\r
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+ <xsd:attribute ref="xml:space" />\r
+ </xsd:complexType>\r
+ </xsd:element>\r
+ <xsd:element name="resheader">\r
+ <xsd:complexType>\r
+ <xsd:sequence>\r
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+ </xsd:sequence>\r
+ <xsd:attribute name="name" type="xsd:string" use="required" />\r
+ </xsd:complexType>\r
+ </xsd:element>\r
+ </xsd:choice>\r
+ </xsd:complexType>\r
+ </xsd:element>\r
+ </xsd:schema>\r
+ <resheader name="resmimetype">\r
+ <value>text/microsoft-resx</value>\r
+ </resheader>\r
+ <resheader name="version">\r
+ <value>2.0</value>\r
+ </resheader>\r
+ <resheader name="reader">\r
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+ </resheader>\r
+ <resheader name="writer">\r
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+ </resheader>\r
+ <data name="CONFIRMRUNAS" xml:space="preserve">\r
+ <value>{0}を削除するには管理者権限が必要なようです。昇格しますか</value>\r
+ <comment>{0}は削除しないでください</comment>\r
+ </data>\r
+ <data name="FILE_PROCESS" xml:space="preserve">\r
+ <value>{0}を処理中</value>\r
+ <comment>{0}は削除しないでください</comment>\r
+ </data>\r
+ <data name="FINAL_PROCESS" xml:space="preserve">\r
+ <value>最終処理中</value>\r
+ </data>\r
+ <data name="IOERROR" xml:space="preserve">\r
+ <value>{0}を削除することができません</value>\r
+ <comment>{0}は削除しないでください</comment>\r
+ </data>\r
+</root>
\ No newline at end of file
--- /dev/null
+//------------------------------------------------------------------------------\r
+// <auto-generated>\r
+// このコードはツールによって生成されました。\r
+// ランタイム バージョン:4.0.30319.235\r
+//\r
+// このファイルへの変更は、以下の状況下で不正な動作の原因になったり、\r
+// コードが再生成されるときに損失したりします。\r
+// </auto-generated>\r
+//------------------------------------------------------------------------------\r
+\r
+namespace CompleteEraser.Properties {\r
+ \r
+ \r
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]\r
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\r
+ \r
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\r
+ \r
+ public static Settings Default {\r
+ get {\r
+ return defaultInstance;\r
+ }\r
+ }\r
+ \r
+ [global::System.Configuration.UserScopedSettingAttribute()]\r
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+ [global::System.Configuration.DefaultSettingValueAttribute(".txt;.html;.htm;.xml;.ini;")]\r
+ public string SlowSpeedExt {\r
+ get {\r
+ return ((string)(this["SlowSpeedExt"]));\r
+ }\r
+ set {\r
+ this["SlowSpeedExt"] = value;\r
+ }\r
+ }\r
+ \r
+ [global::System.Configuration.UserScopedSettingAttribute()]\r
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]\r
+ public bool AlwaysSlowSpeed {\r
+ get {\r
+ return ((bool)(this["AlwaysSlowSpeed"]));\r
+ }\r
+ set {\r
+ this["AlwaysSlowSpeed"] = value;\r
+ }\r
+ }\r
+ \r
+ [global::System.Configuration.UserScopedSettingAttribute()]\r
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+ [global::System.Configuration.DefaultSettingValueAttribute("512")]\r
+ public int FillLengthAtHiSpeed {\r
+ get {\r
+ return ((int)(this["FillLengthAtHiSpeed"]));\r
+ }\r
+ set {\r
+ this["FillLengthAtHiSpeed"] = value;\r
+ }\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<?xml version='1.0' encoding='utf-8'?>\r
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="CompleteEraser.Properties" GeneratedClassName="Settings">\r
+ <Profiles />\r
+ <Settings>\r
+ <Setting Name="SlowSpeedExt" Type="System.String" Scope="User">\r
+ <Value Profile="(Default)">.txt;.html;.htm;.xml;.ini;</Value>\r
+ </Setting>\r
+ <Setting Name="AlwaysSlowSpeed" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">False</Value>\r
+ </Setting>\r
+ <Setting Name="FillLengthAtHiSpeed" Type="System.Int32" Scope="User">\r
+ <Value Profile="(Default)">512</Value>\r
+ </Setting>\r
+ </Settings>\r
+</SettingsFile>
\ No newline at end of file
--- /dev/null
+using System;\r
+using System.IO;\r
+using System.Collections.Generic;\r
+\r
+namespace CompleteEraser\r
+{\r
+ class RecyleBinCollection : IEnumerable<string>\r
+ {\r
+ public IEnumerator<string> GetEnumerator()\r
+ {\r
+ string[] rootDirectory = new string[] {\r
+ "$RECYCLE.BIN",\r
+ "RECYCLER"\r
+ };\r
+ string userSid = System.Security.Principal.WindowsIdentity.GetCurrent().\r
+ User.ToString();\r
+\r
+ List<string> result = new List<string>();\r
+\r
+ foreach (DriveInfo drive in DriveInfo.GetDrives())\r
+ {\r
+ foreach (string rootDir in rootDirectory)\r
+ {\r
+ string dir = Path.Combine(Path.Combine(drive.Name, rootDir), userSid);\r
+ if (Directory.Exists(dir) == false)\r
+ continue;\r
+\r
+ foreach (string file in Directory.GetFiles(dir, "*.*",SearchOption.AllDirectories))\r
+ {\r
+ if (file.IndexOf("desktop.ini") == -1)\r
+ yield return file;\r
+ }\r
+ foreach (string file in Directory.GetDirectories(dir,"*.*"))\r
+ {\r
+ yield return file;\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()\r
+ {\r
+ throw new NotImplementedException();\r
+ }\r
+ }\r
+}\r
--- /dev/null
+using System;\r
+using System.Text;\r
+using System.IO;\r
+using System.IO.MemoryMappedFiles;\r
+using System.Collections.Generic;\r
+\r
+namespace CompleteEraser\r
+{\r
+ class SharedInfo : IEnumerable<string>, IDisposable\r
+ {\r
+ MemoryMappedFile mmf;\r
+ public SharedInfo()\r
+ {\r
+ mmf = MemoryMappedFile.OpenExisting("CompleteEraser.MemMap");\r
+ }\r
+\r
+ public IEnumerator<string> GetEnumerator()\r
+ {\r
+ MemoryMappedViewStream mms = mmf.CreateViewStream();\r
+ StreamReader sr = new StreamReader(mms, Encoding.Unicode);\r
+ try\r
+ {\r
+ while (sr.EndOfStream == false)\r
+ {\r
+ string s = sr.ReadLine();\r
+ yield return s;\r
+ }\r
+ }\r
+ finally\r
+ {\r
+ sr.Close();\r
+ mms.Close();\r
+ }\r
+ }\r
+\r
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()\r
+ {\r
+ throw new NotImplementedException();\r
+ }\r
+\r
+ public void Dispose()\r
+ {\r
+ GC.SuppressFinalize(this);\r
+ mmf.Dispose();\r
+ }\r
+ }\r
+}\r
--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+using System.IO;\r
+\r
+namespace CompleteEraser\r
+{\r
+ class ShrredFiles : IOperation\r
+ {\r
+ public event ProgressingEventHandler Progressing;\r
+ public event ProgressedEventHandler Progressed;\r
+\r
+ public void Execute(IEnumerable<string> files)\r
+ {\r
+ foreach (string file in files)\r
+ {\r
+ Progressing(this,new ProgressingEventArgs(file));\r
+\r
+ RETRY:\r
+ ProgressedEventArgs e = new ProgressedEventArgs(file,null);\r
+\r
+ try\r
+ {\r
+ FileBreaker.BreakFileOrFolder(file);\r
+ }\r
+ catch (UnauthorizedAccessException uae)\r
+ {\r
+ e.ex = uae;\r
+ }\r
+ catch (IOException ie)\r
+ {\r
+ e.ex = ie;\r
+ }\r
+ Progressed(this, e);\r
+ if (e.retry)\r
+ goto RETRY;\r
+ if (e.breaked)\r
+ break;\r
+ }\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>\r
+<configuration>\r
+ <configSections>\r
+ <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >\r
+ <section name="CompleteEraser.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />\r
+ </sectionGroup>\r
+ </configSections>\r
+ <userSettings>\r
+ <CompleteEraser.Properties.Settings>\r
+ <setting name="SlowSpeedExt" serializeAs="String">\r
+ <value>.txt;.html;.htm;.xml;.ini;</value>\r
+ </setting>\r
+ <setting name="AlwaysSlowSpeed" serializeAs="String">\r
+ <value>False</value>\r
+ </setting>\r
+ <setting name="FillLengthAtHiSpeed" serializeAs="String">\r
+ <value>512</value>\r
+ </setting>\r
+ </CompleteEraser.Properties.Settings>\r
+ </userSettings>\r
+</configuration>
\ No newline at end of file
--- /dev/null
+\8aT\97v\r
+\83t\83@\83C\83\8b\82ð\8a®\91S\82É\8dí\8f\9c\82·\82é\82½\82ß\82Ì\83c\81[\83\8b\82Å\82·\r
+\94C\88Ó\82Ì\83t\83@\83C\83\8b\82à\82µ\82\82Í\83t\83H\83\8b\83_\81[\82ð\89E\83N\83\8a\83b\83N\82µ\81A\81u\8a®\91S\82É\8dí\8f\9c\81v\82ð\91I\91ð\82·\82é\82±\82Æ\82Å\8eÀ\8ds\82Å\82«\82Ü\82·\r
+\82Ü\82½\81A\83S\83~\94 \82ð\89E\83N\83\8a\83b\83N\82µ\81A\81u\8a®\91S\82É\8bó\82É\82·\82é\81v\82ð\91I\91ð\82·\82é\82±\82Æ\82Å\82à\8eÀ\8ds\82Å\82«\82Ü\82·\r
+\r
+\r
+\83A\83\8b\83S\83\8a\83Y\83\80\r
+\83t\83@\83C\83\8b\82ð\8a®\91S\82É\8dí\8f\9c\82µ\82½\82¢\8fê\8d\87\81A\83t\83@\83C\83\8b\82Ì\93à\97e\82ð\93K\93\96\82È\95¶\8e\9a\82Å\96\84\82ß\82Ä\82µ\82Ü\82¤\82Ì\82ª\88ê\94Ê\93I\82Å\82·\r
+\82Å\82·\82ª\81A\82»\82Ì\95û\96@\82É\82Í\8e\9e\8aÔ\82ª\82©\82©\82é\82Æ\82¢\82¤\8c\87\93_\82ª\82 \82è\82Ü\82·\r
+\82±\82Ì\83\\83t\83g\82Å\82ÍJPG\82È\82Ç\82Ì\83o\83C\83i\83\8a\81[\83t\83@\83C\83\8b\82Å\82Í\90æ\93ª\95\94\95ª\82Æ\8cã\94¼\95\94\95ª\82ð\94j\89ó\82µ\82Ä\82µ\82Ü\82¦\82Î\83A\83N\83Z\83X\82Å\82«\82È\82\82È\82é\82Æ\82¢\82¤\82±\82Æ\82É\92\85\96Ú\82µ\81A\r
+\82 \82¦\82Ä\8eè\82ð\94²\82¢\82Ä\82¢\82Ü\82·\r
+\81i\83X\83\8d\81[\83\82\81[\83h\82Å\8eÀ\8ds\82µ\82½\8fê\8d\87\82Í\88ê\94Ê\93I\82È\95û\96@\82Å\93®\8dì\82µ\82Ü\82·\81j\r
+\r
+\90Ý\92è\r
+SlowSpeedExt\81@\83X\83\8d\81[\83\82\81[\83h\82Å\8eÀ\8ds\82·\82é\83t\83@\83C\83\8b\96¼\r
+AlwaysSlowSpeed \82Â\82Ë\82É\83X\83\8d\81[\83\82\81[\83h\82Å\8eÀ\8ds\82·\82é\r
+FillLengthAtHiSpeed \8d\82\91¬\83\82\81[\83h\82É\8f\91\82«\8d\9e\82Þ\92·\82³\r
+\r
+\97\9a\97ð\r
+1.9\r
+\81E\8f\88\97\9d\8fó\8bµ\82ð\95\\8e¦\82·\82é\82æ\82¤\82É\82µ\82½\r
+1.8\r
+\81E\91½\90\94\82Ì\83t\83@\83C\83\8b\82ð\8ew\92è\82·\82é\82Æ\83G\83N\83X\83v\83\8d\81[\83\89\82ª\97\8e\82¿\82é\83o\83O\82ª\8e¡\82Á\82Ä\82¢\82È\82©\82Á\82½\82Ì\82Å\8dÄ\8fC\90³\r
+1.7\r
+\81E\83\8a\81[\83h\83I\83\93\83\8a\81[\82Ì\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82µ\82æ\82¤\82Æ\82µ\82½\8fê\8d\87\81A\93r\92\86\82Å\8e~\82Ü\82Á\82Ä\82µ\82Ü\82¤\83o\83O\82ð\8fC\90³\82µ\82½\r
+\81E\91½\90\94\82Ì\83t\83@\83C\83\8b\82ð\8ew\92è\82·\82é\82Æ\83G\83N\83X\83v\83\8d\81[\83\89\82ª\97\8e\82¿\82é\83o\83O\82ð\8fC\90³\82µ\82½\r
+1.6\r
+\81E\83t\83@\83C\83\8b\82ð\8a®\91S\82É\8dí\8f\9c\82µ\82æ\82¤\82Æ\82·\82é\82Æ\83G\83\89\81[\83\81\83b\83Z\81[\83W\82ª\8fo\82é\83o\83O\82ð\8fC\90³\82µ\82½\r
+1.5\r
+\81E\8b\90\91å\82È\83t\83@\83C\83\8b\82ð\8ew\92è\82·\82é\82Æ\83t\83\8a\81[\83Y\82µ\82Ä\82µ\82Ü\82¤\93_\82ð\8fC\90³\82µ\82½\r
+1.4\r
+\81E\83S\83~\94 \82ð\8a®\91S\82É\8bó\82É\82·\82é\8b@\94\\82ð\92Ç\89Á\r
+1.0\r
+\8f\89\8cö\8aJ\r
+\r
+FAQ\r
+Q.\82È\82º\81A\83O\81[\83g\83}\83\93\90\84\8f§\95û\8e®\82È\82Ç\82Ì\82Ù\82¤\82ª\88À\91S\82È\82Ì\82É\82»\82ê\82ð\97p\82¢\82È\82¢\82Ì\82Å\82·\82©\r
+A.2001\94N\93x\88È\8d~\82Ì\83n\81[\83h\83f\83B\83X\83N\82Å\82Í\8ec\97¯\8e¥\8bC\92T\8dõ\82ð\8ds\82Á\82Ä\82à\83f\81[\83^\82ð\8eæ\82è\8fo\82·\82±\82Æ\82ª\95s\89Â\94\\82É\8bß\82\81A\82Ç\82Ì\95û\96@\82Å\8ds\82Á\82Ä\82à\91å\8d·\82È\82¢\82©\82ç\82Å\82·\r
+(\8eQ\8fÆ.wikipedia \83f\81[\83^\81[\82Ì\8a®\91S\8dí\8f\9c\81j\r
+\r
+\98A\97\8d\90æ\r
+\83o\83O\82ð\94\8c©\82µ\82½\8dÛ\82Í\88È\89º\82Ì\83A\83h\83\8c\83X\82Ü\82Å\98A\97\8d\82ð\82\82¾\82³\82¢\81B\89Â\94\\82È\8cÀ\82è\8fC\90³\82µ\82Ü\82·\r
+jbh03215@hotmail.co.jp\r
--- /dev/null
+{\rtf1\adeflang1025\ansi\ansicpg932\uc2\adeff0\deff0\stshfdbch11\stshfloch21\stshfhich21\stshfbi0\deflang1033\deflangfe1041{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}\r
+{\f11\froman\fcharset128\fprq1{\*\panose 02020609040205080304}\'82\'6c\'82\'72 \'96\'be\'92\'a9{\*\falt MS Mincho};}{\f21\froman\fcharset0\fprq2{\*\panose 02040604050505020304}Century;}\r
+{\f37\froman\fcharset128\fprq1{\*\panose 02020609040205080304}@\'82\'6c\'82\'72 \'96\'be\'92\'a9;}{\f38\froman\fcharset238\fprq2 Times New Roman CE;}{\f39\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f41\froman\fcharset161\fprq2 Times New Roman Greek;}\r
+{\f42\froman\fcharset162\fprq2 Times New Roman Tur;}{\f43\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f44\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f45\froman\fcharset186\fprq2 Times New Roman Baltic;}\r
+{\f46\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f150\froman\fcharset0\fprq1 MS Mincho Western{\*\falt MS Mincho};}{\f148\froman\fcharset238\fprq1 MS Mincho CE{\*\falt MS Mincho};}\r
+{\f149\froman\fcharset204\fprq1 MS Mincho Cyr{\*\falt MS Mincho};}{\f151\froman\fcharset161\fprq1 MS Mincho Greek{\*\falt MS Mincho};}{\f152\froman\fcharset162\fprq1 MS Mincho Tur{\*\falt MS Mincho};}\r
+{\f155\froman\fcharset186\fprq1 MS Mincho Baltic{\*\falt MS Mincho};}{\f248\froman\fcharset238\fprq2 Century CE;}{\f249\froman\fcharset204\fprq2 Century Cyr;}{\f251\froman\fcharset161\fprq2 Century Greek;}{\f252\froman\fcharset162\fprq2 Century Tur;}\r
+{\f255\froman\fcharset186\fprq2 Century Baltic;}{\f410\froman\fcharset0\fprq1 @\'82\'6c\'82\'72 \'96\'be\'92\'a9 Western;}{\f408\froman\fcharset238\fprq1 @\'82\'6c\'82\'72 \'96\'be\'92\'a9 CE;}\r
+{\f409\froman\fcharset204\fprq1 @\'82\'6c\'82\'72 \'96\'be\'92\'a9 Cyr;}{\f411\froman\fcharset161\fprq1 @\'82\'6c\'82\'72 \'96\'be\'92\'a9 Greek;}{\f412\froman\fcharset162\fprq1 @\'82\'6c\'82\'72 \'96\'be\'92\'a9 Tur;}\r
+{\f415\froman\fcharset186\fprq1 @\'82\'6c\'82\'72 \'96\'be\'92\'a9 Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\r
+\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\r
+\qj \li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs21\lang1033\langfe1041\kerning2\loch\f21\hich\af21\dbch\af11\cgrid\langnp1033\langfenp1041 \snext0 Normal;}{\*\cs10 \r
+\additive \ssemihidden Default Paragraph Font;}{\*\r
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \r
+\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}\r
+{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\listtable{\list\listtemplateid1333663050\listsimple{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01*;}{\levelnumbers;}}{\listname \r
+;}\listid-2}}{\*\listoverridetable{\listoverride\listid-2\listoverridecount1{\lfolevel\listoverrideformat{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat0\levelold\levelspace0\levelindent0{\leveltext\r
+\'01{\uc1\u-3913 ?};}{\levelnumbers;}\f3\fbias0 }}\ls1}}{\*\rsidtbl \rsid12022518}{\*\generator Microsoft Word 11.0.0000;}{\info{\operator rirufa}{\creatim\yr2011\mo4\dy23\hr17\min25}{\revtim\yr2011\mo4\dy23\hr17\min25}{\version2}{\edmins0}{\nofpages1}\r
+{\nofwords105}{\nofchars600}{\nofcharsws704}{\vern24615}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1701\margr1701\margt1985\margb1701\gutter0\ltrsect \r
+\ftnbj\aenddoc\donotembedsysfont0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\r
+\jcompress\viewkind4\viewscale100\rsidroot12022518 \fet0{\*\wgrffmtfilter 013f}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl2\r
+\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \dbch )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}\r
+{\pntxta \dbch )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}\r
+{\pntxta \dbch )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \r
+\fs21\lang1033\langfe1041\kerning2\loch\af21\hich\af21\dbch\af11\cgrid\langnp1033\langfenp1041 {\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \hich\af21\dbch\af11\loch\f11 \r
+Copyright (c) 2010, FooProject\r
+\par \hich\af21\dbch\af11\loch\f11 All rights reserved.\r
+\par \r
+\par }{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \loch\af11\hich\af21\dbch\f11 \'83\'5c\'81\'5b\'83\'58\'83\'52\'81\'5b\'83\'68\'8c\'60\'8e\'ae\'82\'a9\'83\'6f\'83\'43\'83\'69\'83\'8a\'8c\'60\r
+\'8e\'ae\'82\'a9\'81\'41\'95\'cf\'8d\'58\'82\'b7\'82\'e9\'82\'a9\'82\'b5\'82\'c8\'82\'a2\'82\'a9\'82\'f0\'96\'e2\'82\'ed\'82\'b8\'81\'41\'88\'c8\'89\'ba\'82\'cc\'8f\'f0\'8c\'8f\'82\'f0\'96\'9e\'82\'bd\'82\'b7\'8f\'ea\'8d\'87\'82\'c9\'8c\'c0\'82\'e8\r
+\'81\'41\'8d\'c4\'94\'d0\'95\'7a\'82\'a8\'82\'e6\'82\'d1\'8e\'67\'97\'70\'82\'aa\'8b\'96\'89\'c2\'82\'b3\'82\'ea\'82\'dc\'82\'b7\'81\'42}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \r
+\hich\af21\dbch\af11\loch\f11 \r
+\par \r
+\par {\pntext\pard\plain\ltrpar \rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \f3\fs22\lang17\langfe1041\langnp17 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault{\*\pn \pnlvlblt\ilvl0\ls1\pnrnot0\pnf3 \r
+{\pntxtb \hich \'b7}}\faauto\ls1\rin0\lin720\itap0\pararsid12022518 {\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \loch\af11\hich\af21\dbch\f11 \'83\'5c\'81\'5b\'83\'58\'83\'52\'81\'5b\'83\'68\r
+\'82\'f0\'8d\'c4\'94\'d0\'95\'7a\'82\'b7\'82\'e9\'8f\'ea\'8d\'87\'81\'41\'8f\'e3\'8b\'4c\'82\'cc\'92\'98\'8d\'ec\'8c\'a0\'95\'5c\'8e\'a6\'81\'41\'96\'7b\'8f\'f0\'8c\'8f\'88\'ea\'97\'97\'81\'41\'82\'a8\'82\'e6\'82\'d1\'89\'ba\'8b\'4c\'96\'c6\'90\'d3\r
+\'8f\'f0\'8d\'80\'82\'f0\'8a\'dc\'82\'df\'82\'e9\'82\'b1\'82\'c6\'81\'42}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \r
+\par {\pntext\pard\plain\ltrpar \rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \f3\fs22\lang17\langfe1041\langnp17 \loch\af3\dbch\af11\hich\f3 \'b7\tab}\hich\af21\dbch\af11\loch\f11 }{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \r
+\fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \loch\af11\hich\af21\dbch\f11 \'83\'6f\'83\'43\'83\'69\'83\'8a\'8c\'60\'8e\'ae\'82\'c5\'8d\'c4\'94\'d0\'95\'7a\'82\'b7\'82\'e9\'8f\'ea\'8d\'87\'81\'41\'94\'d0\'95\'7a\'95\'a8\'82\'c9\r
+\'95\'74\'91\'ae\'82\'cc\'83\'68\'83\'4c\'83\'85\'83\'81\'83\'93\'83\'67\'93\'99\'82\'cc\'8e\'91\'97\'bf\'82\'c9\'81\'41\'8f\'e3\'8b\'4c\'82\'cc\'92\'98\'8d\'ec\'8c\'a0\'95\'5c\'8e\'a6\'81\'41\'96\'7b\'8f\'f0\'8c\'8f\'88\'ea\'97\'97\'81\'41\'82\'a8\r
+\'82\'e6\'82\'d1\'89\'ba\'8b\'4c\'96\'c6\'90\'d3\'8f\'f0\'8d\'80\'82\'f0\'8a\'dc\'82\'df\'82\'e9\'82\'b1\'82\'c6\'81\'42}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \r
+\hich\af21\dbch\af11\loch\f11 \r
+\par {\pntext\pard\plain\ltrpar \rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \f3\fs22\lang17\langfe1041\langnp17 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \r
+\loch\af11\hich\af21\dbch\f11 \'8f\'91\'96\'ca\'82\'e2\'83\'81\'81\'5b\'83\'8b\'82\'c8\'82\'c7\'82\'c9\'82\'e6\'82\'e9\'93\'c1\'95\'ca\'82\'cc\'8b\'96\loch\af11\hich\af21\dbch\f11 \'89\'c2\'82\'c8\'82\'b5\'82\'c9\'81\'41\'96\'7b\'83\'5c\'83\'74\'83\'67\r
+\'83\'45\'83\'46\'83\'41\'82\'a9\'82\'e7\'94\'68\'90\'b6\'82\'b5\'82\'bd\'90\'bb\'95\'69\'82\'cc\'90\'e9\'93\'60\'82\'dc\'82\'bd\'82\'cd\'94\'cc\'94\'84\'91\'a3\'90\'69\'82\'c9\'81\'41}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \r
+\fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \hich\af21\dbch\af11\loch\f11 FooProject}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \loch\af11\hich\af21\dbch\f11 \'82\'cc\r
+\'96\'bc\'91\'4f\'82\'dc\'82\'bd\'82\'cd\'83\'52\'83\'93\'83\'67\'83\'8a\'83\'72\'83\'85\'81\'5b\'83\'5e\'81\'5b\'82\'cc\'96\'bc\'91\'4f\'82\'f0\'8e\'67\'97\'70\'82\'b5\'82\'c4\'82\'cd\'82\'c8\'82\'e7\'82\'c8\'82\'a2\'81\'42}{\rtlch\fcs1 \af11\afs22 \r
+\ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \hich\af21\dbch\af11\loch\f11 \r
+\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \loch\af11\hich\af21\dbch\f11 \'96\'7b\'83\'5c\'83\'74\r
+\'83\'67\'83\'45\'83\'46\'83\'41\'82\'cd\'81\'41\'92\'98\'8d\'ec\'8c\'a0\'8e\'d2\'82\'a8\'82\'e6\'82\'d1\'83\'52\'83\'93\'83\'67\'83\'8a\'83\'72\'83\'85\'81\'5b\'83\'5e\'81\'5b\'82\'c9\'82\'e6\'82\'c1\'82\'c4\'81\'75\'8c\'bb\'8f\'f3\'82\'cc\'82\'dc\r
+\'82\'dc\'81\'76\'92\'f1\'8b\'9f\'82\'b3\'82\'ea\'82\'c4\'82\'a8\'82\'e8\'81\'41\'96\'be\'8e\'a6\'96\'d9\'8e\'a6\'82\'f0\'96\'e2\'82\'ed\'82\'b8\'81\'41\'8f\'a4\'8b\'c6\'93\'49\'82\'c8\'8e\'67\'97\'70\'89\'c2\'94\'5c\'90\'ab\'81\'41\'82\'a8\'82\'e6\r
+\'82\'d1\'93\'c1\'92\'e8\'82\'cc\'96\'da\'93\'49\'82\'c9\'91\'ce\'82\'b7\'82\'e9\'93\'4b\'8d\'87\'90\'ab\'82\'c9\'8a\'d6\'82\'b7\'82\'e9\'88\'c3\'96\'d9\'82\'cc\'95\'db\'8f\'d8\'82\'e0\'8a\'dc\'82\'df\'81\'41\'82\'dc\'82\'bd\'82\'bb\'82\'ea\'82\'c9\r
+\'8c\'c0\'92\'e8\'82\'b3\'82\'ea\'82\'c8\'82\'a2\'81\'41\'82\'a2\'82\'a9\'82\'c8\'82\'e9\'95\'db\'8f\'d8\'82\'e0\'82\'a0\'82\'e8\'82\'dc\'82\'b9\'82\'f1\'81\'42\'92\'98\'8d\'ec\'8c\'a0\'8e\'d2\'82\'e0\'83\'52\'83\'93\'83\'67\'83\'8a\'83\'72\'83\'85\r
+\'81\'5b\'83\'5e\'81\'5b\'82\'e0\'81\'41\'8e\'96\'97\'52\'82\'cc\'82\'a2\'82\'a9\'82\'f1\'82\'f0\'96\'e2\'82\'ed\'82\'b8\'81\'41}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \r
+\hich\af21\dbch\af11\loch\f11 }{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \loch\af11\hich\af21\dbch\f11 \'91\'b9\'8a\'51\'94\'ad\'90\'b6\'82\'cc\'8c\'b4\'88\'f6\'82\'a2\'82\'a9\'82\'f1\'82\'f0\r
+\'96\'e2\'82\'ed\'82\'b8\'81\'41\'82\'a9\'82\'c2\'90\'d3\'94\'43\'82\'cc\'8d\'aa\'8b\'92\'82\'aa\'8c\'5f\'96\'f1\'82\'c5\'82\'a0\'82\'e9\'82\'a9\'8c\'b5\'8a\'69\'90\'d3\'94\'43\'82\'c5\'82\'a0\'82\'e9\'82\'a9\'81\'69\'89\'df\loch\af11\hich\af21\dbch\f11 \r
+\'8e\'b8\'82\'bb\'82\'cc\'91\'bc\'82\'cc\'81\'6a\'95\'73\'96\'40\'8d\'73\'88\'d7\'82\'c5\'82\'a0\'82\'e9\'82\'a9\'82\'f0\'96\'e2\'82\'ed\'82\'b8\'81\'41\'89\'bc\'82\'c9\'82\'bb\'82\'cc\'82\'e6\'82\'a4\'82\'c8\'91\'b9\'8a\'51\'82\'aa\'94\'ad\'90\'b6\r
+\'82\'b7\'82\'e9\'89\'c2\'94\'5c\'90\'ab\'82\'f0\'92\'6d\'82\'e7\'82\'b3\'82\'ea\'82\'c4\'82\'a2\'82\'bd\'82\'c6\'82\'b5\'82\'c4\'82\'e0\'81\'41\'96\'7b\'83\'5c\'83\'74\'83\'67\'83\'45\'83\'46\'83\'41\'82\'cc\'8e\'67\'97\'70\'82\'c9\'82\'e6\'82\'c1\r
+\'82\'c4\'94\'ad\'90\'b6\'82\'b5\'82\'bd\'81\'69\'91\'e3\'91\'d6\'95\'69\'82\'dc\'82\'bd\'82\'cd\'91\'e3\'97\'70\'83\'54\'81\'5b\'83\'72\'83\'58\'82\'cc\'92\'b2\'92\'42\'81\'41\'8e\'67\'97\'70\'82\'cc\'91\'72\'8e\'b8\'81\'41\'83\'66\'81\'5b\'83\'5e\r
+\'82\'cc\'91\'72\'8e\'b8\'81\'41\'97\'98\'89\'76\'82\'cc\'91\'72\'8e\'b8\'81\'41\'8b\'c6\'96\'b1\'82\'cc\'92\'86\'92\'66\'82\'e0\'8a\'dc\'82\'df\'81\'41\'82\'dc\'82\'bd\'82\'bb\'82\'ea\'82\'c9\'8c\'c0\'92\'e8\'82\'b3\'82\'ea\'82\'c8\'82\'a2\'81\'6a\r
+\'92\'bc\'90\'da\'91\'b9\'8a\'51\'81\'41\'8a\'d4\'90\'da\'91\'b9\'8a\'51\'81\'41\'8b\'f4\'94\'ad\'93\'49\'82\'c8\'91\'b9\'8a\'51\'81\'41\'93\'c1\'95\'ca\'91\'b9\'8a\'51\'81\'41\'92\'a6\'94\'b1\'93\'49\'91\'b9\'8a\'51\'81\'41\'82\'dc\'82\'bd\'82\'cd\r
+\'8c\'8b\'89\'ca\'91\'b9\'8a\'51\'82\'c9\'82\'c2\'82\'a2\'82\'c4\'81\'41\'88\'ea\'90\'d8\'90\'d3\'94\'43\'82\'f0\'95\'89\'82\'ed\'82\'c8\'82\'a2\'82\'e0\'82\'cc\'82\'c6\'82\'b5\'82\'dc\'82\'b7\'81\'42}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \r
+\fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \hich\af21\dbch\af11\loch\f11 \r
+\par \r
+\par }{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \loch\af11\hich\af21\dbch\f11 \'8d\'c5\'8f\'49\'8d\'58\'90\'56\'8e\'9e\'8d\'8f\'81\'46}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \r
+\fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \hich\af21\dbch\af11\loch\f11 2011}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \loch\af11\hich\af21\dbch\f11 \'94\'4e}{\r
+\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \hich\af21\dbch\af11\loch\f11 4}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \r
+\loch\af11\hich\af21\dbch\f11 \'8c\'8e}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \hich\af21\dbch\af11\loch\f11 22}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \r
+\fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \loch\af11\hich\af21\dbch\f11 \'93\'fa}{\rtlch\fcs1 \af11\afs22 \ltrch\fcs0 \fs22\lang17\langfe1041\kerning0\loch\af11\langnp17\insrsid12022518 \r
+\par }}
\ No newline at end of file
--- /dev/null
+setlocal\r
+\r
+set WIX_PATH=C:\Program Files (x86)\Windows Installer XML v3.5\bin\r
+set OUTPUTX86=completeeraer_setup_x86.msi\r
+set OUTPUTX64=completeeraer_setup_x64.msi\r
+set TYPE=%1\r
+set IDE_PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\r
+\r
+if "%1"=="" set TYPE=Release\r
+\r
+"%IDE_PATH%\devenv" /build %TYPE% ..\CompleteEraser.sln\r
+\r
+md dist\r
+copy ..\ShellExtension\%TYPE%\Win32\ShellExtension.dll .\dist\ShellExtension.x86.dll\r
+copy ..\ShellExtension\%TYPE%\x64\ShellExtension.dll .\dist\ShellExtension.x64.dll\r
+copy ..\CompleteEraser\bin\%TYPE%\CompleteEraser.exe .\dist\r
+copy ..\CompleteEraser\bin\%TYPE%\CompleteEraser.exe.config .\dist\r
+copy ..\Document\help.txt .\dist\r
+\r
+"%WIX_PATH%\candle.exe" installer.xml\r
+"%WIX_PATH%\light.exe" -cultures:ja-jp -ext WiXNetFxExtension -ext WixUIExtension installer.wixobj -out "%OUTPUTX86%"\r
+\r
+"%WIX_PATH%\candle.exe" installer.xml -arch x64\r
+"%WIX_PATH%\light.exe" -cultures:ja-jp -ext WiXNetFxExtension -ext WixUIExtension installer.wixobj -out "%OUTPUTX64%"\r
+\r
+endlocal\r
+pause\r
+\r
--- /dev/null
+build Debug
\ No newline at end of file
--- /dev/null
+rd dist /s /q\r
+del completeeraer_setup_x86.wixpdb\r
+del completeeraer_setup_x64.wixpdb\r
+del installer.wixobj\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"\r
+ xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">\r
+\r
+ <Product Name="CompleteEraser"\r
+ Id="47B6D9D1-FF2F-4ED8-ABFB-9E3F697956FC"\r
+ UpgradeCode="ABE07AF2-98D1-44B2-A05F-E2A94271F7A7"\r
+ Language="1041" Codepage="932"\r
+ Version="1.7.0" Manufacturer="FooProject">\r
+\r
+ <Package Id="*" Keywords="Installer"\r
+ Description="CompleteEraserインストーラー"\r
+ Comments="ファイルを復元不能にしてから削除します"\r
+ Manufacturer="FooProject" InstallerVersion="300"\r
+ Languages="1041" Compressed="yes" SummaryCodepage="932" />\r
+ <Media Id="1" Cabinet="Product.cab" EmbedCab="yes" />\r
+\r
+ <PropertyRef Id="NETFRAMEWORK40FULL"/>\r
+ <Condition Message="このアプリケーションを実行するには.NET Framework4.0が必要です">\r
+ <![CDATA[Installed OR NETFRAMEWORK40FULL]]>\r
+ </Condition>\r
+\r
+ <Directory Id="TARGETDIR" Name="SourceDir">\r
+ <?if $(sys.BUILDARCH) = "x64"?>\r
+ <Directory Id="ProgramFiles64Folder">\r
+ <Directory Id="PFFolder" />\r
+ </Directory>\r
+ <?else?>\r
+ <Directory Id="ProgramFilesFolder">\r
+ <Directory Id="PFFolder" />\r
+ </Directory>\r
+ <?endif?>\r
+ </Directory>\r
+\r
+ <DirectoryRef Id="PFFolder">\r
+ <Directory Id="FooProject" Name="FooProject">\r
+ <Directory Id="INSTALLDIR" Name="CompleteEraser">\r
+ <Component Id="RegistryEntries" Guid="0B8DCAC5-6CB0-402A-9D39-66E63A886656" KeyPath="yes">\r
+ <RegistryKey Root="HKLM"\r
+ Key="Software\Classes\CLSID\{112143A6-62C1-4478-9E8F-872699255E2E}"\r
+ Action="createAndRemoveOnUninstall">\r
+ <RegistryValue Type="string" Value="ShellExtension Sample"/>\r
+ </RegistryKey>\r
+ <RegistryKey Root="HKLM"\r
+ Key="Software\Classes\CLSID\{112143A6-62C1-4478-9E8F-872699255E2E}\InprocServer32"\r
+ Action="createAndRemoveOnUninstall">\r
+ <RegistryValue Type="string" Value="[!File1]"/>\r
+ <RegistryValue Type="string" Name="ThreadingModel" Value="Apartment"/>\r
+ </RegistryKey>\r
+ <RegistryKey Root="HKLM"\r
+ Key="Software\Classes\*\shellex\ContextMenuHandlers\{112143A6-62C1-4478-9E8F-872699255E2E}"\r
+ Action="createAndRemoveOnUninstall">\r
+ </RegistryKey>\r
+ <RegistryKey Root="HKLM"\r
+ Key="Software\Classes\Directory\shellex\ContextMenuHandlers\{112143A6-62C1-4478-9E8F-872699255E2E}"\r
+ Action="createAndRemoveOnUninstall">\r
+ </RegistryKey>\r
+ <RegistryKey Root="HKLM"\r
+ Key="Software\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shellex\ContextMenuHandlers\{112143A6-62C1-4478-9E8F-872699255E2E}"\r
+ Action="createAndRemoveOnUninstall">\r
+ </RegistryKey>\r
+ </Component>\r
+\r
+ <Component Id="Main"\r
+ Guid="C32A3290-9F3B-44BE-9248-A92898846E82" KeyPath="yes">\r
+ <?if $(sys.BUILDARCH) = "x64"?>\r
+ <File Id="File1" Name="ShellExtension.dll"\r
+ DiskId="1" Source="dist\ShellExtension.x64.dll"/>\r
+ <?else?>\r
+ <File Id="File1" Name="ShellExtension.dll"\r
+ DiskId="1" Source="dist\ShellExtension.x86.dll"/>\r
+ <?endif?>\r
+ <File Id="File2" Name="CompleteEraser.exe"\r
+ DiskId="1" Source="dist\CompleteEraser.exe"/>\r
+ <File Id="File3" Name="help.txt"\r
+ DiskId="1" Source="dist\help.txt"/>\r
+ <File Id="File4" Name="CompleteEraser.exe.config"\r
+ DiskId="1" Source="dist\CompleteEraser.exe.config"/>\r
+ </Component>\r
+ </Directory>\r
+ </Directory>\r
+ </DirectoryRef>\r
+\r
+ <Feature Id="Complete" Title="CompleteEraser" Description="ファイルを復元不能にしてから削除します"\r
+ Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR">\r
+ <Feature Id="MainProgram" Title="MainProgram"\r
+ Description="必須となるコンポーネント" Level="1" AllowAdvertise="no">\r
+ <ComponentRef Id="Main" />\r
+ <ComponentRef Id="RegistryEntries" />\r
+ </Feature>\r
+ </Feature>\r
+\r
+ <UIRef Id="WixUI_Mondo" />\r
+ <UIRef Id="WixUI_ErrorProgressText" />\r
+\r
+ <WixVariable Id="WixUILicenseRtf" Value="License.rtf" />\r
+\r
+ </Product>\r
+</Wix>\r
--- /dev/null
+#include "DllMain.h"\r
+#include "ClassFactory.h"\r
+#include "ContextMenu.h"\r
+\r
+STDMETHODIMP CClassFactory::QueryInterface(REFIID riid, void **ppvObject)\r
+{\r
+ *ppvObject = NULL;\r
+\r
+ if (IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IClassFactory))\r
+ *ppvObject = static_cast<IClassFactory *>(this);\r
+ else\r
+ return E_NOINTERFACE;\r
+\r
+ AddRef();\r
+ \r
+ return S_OK;\r
+}\r
+\r
+STDMETHODIMP_(ULONG) CClassFactory::AddRef()\r
+{\r
+ LockModule(TRUE);\r
+\r
+ return 2;\r
+}\r
+\r
+STDMETHODIMP_(ULONG) CClassFactory::Release()\r
+{\r
+ LockModule(FALSE);\r
+\r
+ return 1;\r
+}\r
+\r
+STDMETHODIMP CClassFactory::CreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObject)\r
+{\r
+ CContextMenu *p;\r
+ HRESULT hr;\r
+ \r
+ *ppvObject = NULL;\r
+\r
+ if (pUnkOuter != NULL)\r
+ return CLASS_E_NOAGGREGATION;\r
+\r
+ p = new CContextMenu();\r
+ if (p == NULL)\r
+ return E_OUTOFMEMORY;\r
+\r
+ hr = p->QueryInterface(riid, ppvObject);\r
+ p->Release();\r
+\r
+ return hr;\r
+}\r
+\r
+STDMETHODIMP CClassFactory::LockServer(BOOL fLock)\r
+{\r
+ LockModule(fLock);\r
+\r
+ return S_OK;\r
+}\r
+\r
--- /dev/null
+#pragma once\r
+#include "DllMain.h"\r
+\r
+class CClassFactory : public IClassFactory\r
+{\r
+public:\r
+ STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject);\r
+ STDMETHODIMP_(ULONG) AddRef();\r
+ STDMETHODIMP_(ULONG) Release();\r
+ \r
+ STDMETHODIMP CreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObject);\r
+ STDMETHODIMP LockServer(BOOL fLock);\r
+};\r
--- /dev/null
+#include "ContextMenu.h"\r
+#include "resource.h"\r
+\r
+#define EXEPATH L"CompleteEraser.EXE"\r
+\r
+HANDLE CContextMenu::m_hMapping;\r
+\r
+CContextMenu::CContextMenu()\r
+{\r
+ m_cRef = 1;\r
+\r
+ WCHAR wszLocale[MAX_PATH];\r
+ GetLocaleInfoW(GetThreadLocale(),\r
+ LOCALE_SABBREVLANGNAME,wszLocale,MAX_PATH);\r
+ _wsetlocale(LC_ALL,wszLocale);\r
+\r
+ LockModule(TRUE);\r
+}\r
+\r
+CContextMenu::~CContextMenu()\r
+{\r
+ LockModule(FALSE);\r
+}\r
+\r
+STDMETHODIMP_(ULONG) CContextMenu::AddRef()\r
+{\r
+ return InterlockedIncrement(&m_cRef);\r
+}\r
+\r
+STDMETHODIMP_(ULONG) CContextMenu::Release()\r
+{\r
+ if (InterlockedDecrement(&m_cRef) == 0) { \r
+ delete this;\r
+ return 0;\r
+ }\r
+\r
+ return m_cRef;\r
+}\r
+\r
+STDMETHODIMP CContextMenu::QueryInterface(REFIID riid, void **ppvObject)\r
+{\r
+ *ppvObject = NULL;\r
+\r
+ if (IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IContextMenu))\r
+ *ppvObject = static_cast<IContextMenu *>(this);\r
+ else if (IsEqualIID(riid, IID_IShellExtInit))\r
+ *ppvObject = static_cast<IShellExtInit *>(this);\r
+ else\r
+ return E_NOINTERFACE;\r
+\r
+ AddRef();\r
+\r
+ return S_OK;\r
+}\r
+\r
+STDMETHODIMP CContextMenu::Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID)\r
+{\r
+ WCHAR* temp;\r
+ DWORD size;\r
+ ::RegQueryValueEx(hkeyProgID,L"",NULL,NULL,NULL,&size);\r
+ temp = new WCHAR[size];\r
+ ::RegQueryValueEx(hkeyProgID,L"",NULL,NULL,(LPBYTE)temp,&size);\r
+ std::wstring value(temp);\r
+\r
+ if(value == L"Recycle Bin")\r
+ {\r
+ menutype = ClearRecyleBin;\r
+ return S_OK;\r
+ }\r
+\r
+ FORMATETC fetc = {CF_HDROP, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };\r
+\r
+ STGMEDIUM medium;\r
+ HRESULT hr = pdtobj->GetData(&fetc, &medium);\r
+ if(FAILED(hr))\r
+ return hr;\r
+\r
+ HDROP DropData = (HDROP)GlobalLock(medium.hGlobal); //\83\8d\83b\83N\82µ\82È\82¢\82Æ\97\8e\82¿\82é\82±\82Æ\82ª\82 \82é\r
+\r
+ UINT count = DragQueryFile(DropData,0xFFFFFFFF,NULL,0);\r
+\r
+ for(UINT i = 0; i < count; i++)\r
+ {\r
+ WCHAR file[_MAX_PATH];\r
+ DragQueryFile((HDROP)medium.hGlobal, i, file, sizeof(file));\r
+ this->strs.append(file);\r
+ this->strs.append(L"\n");\r
+ }\r
+\r
+ GlobalUnlock(DropData);\r
+\r
+ ReleaseStgMedium(&medium);\r
+\r
+ menutype = ClearFileNames;\r
+\r
+ return S_OK;\r
+}\r
+\r
+STDMETHODIMP CContextMenu::QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)\r
+{\r
+ MENUITEMINFO mii;\r
+ \r
+ if (uFlags & CMF_DEFAULTONLY)\r
+ return MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_NULL, 0);\r
+\r
+ mii.cbSize = sizeof(MENUITEMINFO);\r
+ mii.fMask = MIIM_ID | MIIM_TYPE;\r
+ mii.fType = MFT_STRING;\r
+ mii.wID = idCmdFirst;\r
+\r
+ if(menutype == ClearFileNames)\r
+ {\r
+ std::wstring str;\r
+ MyLoadString(str,MENUITEMNAME);\r
+ mii.dwTypeData = const_cast<LPWSTR>(str.c_str());\r
+ InsertMenuItem(hmenu, indexMenu, TRUE, &mii);\r
+ }else if(menutype == ClearRecyleBin){\r
+ std::wstring str;\r
+ MyLoadString(str,MENUITEMNAME_RECYLEBIN);\r
+ mii.dwTypeData = const_cast<LPWSTR>(str.c_str());\r
+\r
+ SHQUERYRBINFO sqrbi;\r
+ ZeroMemory(&sqrbi, sizeof(sqrbi));\r
+ sqrbi.cbSize = sizeof(sqrbi);\r
+ if(SUCCEEDED(SHQueryRecycleBin(NULL, &sqrbi)))\r
+ {\r
+ mii.fState |= (sqrbi.i64NumItems != 0) ? MFS_ENABLED : MFS_DISABLED;\r
+ }\r
+\r
+ InsertMenuItem(hmenu, indexMenu, TRUE, &mii);\r
+ }\r
+ \r
+ return MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_NULL, 2);\r
+}\r
+\r
+STDMETHODIMP CContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO pici)\r
+{\r
+ UINT idCmd = LOWORD(pici->lpVerb);\r
+\r
+ if (HIWORD(pici->lpVerb) != 0)\r
+ return E_INVALIDARG;\r
+\r
+ if (idCmd != 0)\r
+ return S_OK;\r
+\r
+ std::wstring str;\r
+ MyLoadString(str,CONFIRMDELETE);\r
+ if(MessageBoxW(NULL,str.c_str(),NULL,MB_YESNO) == IDNO)\r
+ return S_OK;\r
+\r
+ if (menutype == ClearFileNames)\r
+ {\r
+ UINT mapSize = this->strs.length() * 2;\r
+\r
+ m_hMapping = ::CreateFileMappingW(INVALID_HANDLE_VALUE,\r
+ NULL,\r
+ PAGE_READWRITE,\r
+ 0,\r
+ mapSize,\r
+ L"CompleteEraser.MemMap");\r
+ if(m_hMapping == NULL)\r
+ return E_FAIL;\r
+\r
+ void *m_pMappingView = MapViewOfFile(m_hMapping, FILE_MAP_ALL_ACCESS, 0, 0, 0);\r
+ if(m_pMappingView == NULL)\r
+ return E_FAIL;\r
+\r
+ ::wcscat_s((LPWSTR)m_pMappingView,mapSize,this->strs.c_str());\r
+\r
+ UnmapViewOfFile(m_pMappingView);\r
+\r
+ DWORD dwID;\r
+ CreateThread(NULL , 0 , ThreadFunc , (LPVOID)this , 0 , &dwID);\r
+ }\r
+ else if (menutype == ClearRecyleBin)\r
+ {\r
+ RunCompleteEraer(L"/recylebin");\r
+ }\r
+\r
+ return S_OK;\r
+}\r
+\r
+STDMETHODIMP CContextMenu::GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT *pwReserved, LPSTR pszName, UINT cchMax)\r
+{\r
+ if (idCmd == 0) {\r
+ std::wstring str;\r
+ if (uFlags == GCS_HELPTEXTW)\r
+ {\r
+ MyLoadString(str,MENUHELPMSG);\r
+ ::wcscpy_s((LPWSTR)pszName,cchMax,str.c_str());\r
+ }\r
+ else if (uFlags == GCS_VERBW)\r
+ {\r
+ MyLoadString(str,MENUITEMNAME);\r
+ ::wcscpy_s((LPWSTR)pszName,cchMax,str.c_str());\r
+ }\r
+ }\r
+ else\r
+ return E_FAIL;\r
+\r
+ return S_OK;\r
+}\r
+\r
+DWORD WINAPI CContextMenu::ThreadFunc(LPVOID pParam)\r
+{\r
+ HANDLE hProcess = RunCompleteEraer(L"");\r
+\r
+ WaitForSingleObject(hProcess,INFINITE);\r
+\r
+ CloseHandle(m_hMapping);\r
+\r
+ return 0;\r
+}\r
+\r
+HANDLE CContextMenu::RunCompleteEraer(LPTSTR cmdline)\r
+{\r
+ WCHAR modPath[_MAX_PATH];\r
+ GetModulePath(modPath,_MAX_PATH);\r
+\r
+ SHELLEXECUTEINFO info = {0};\r
+ info.cbSize = sizeof(info);\r
+ info.hwnd = NULL;\r
+ info.nShow = SW_SHOWNORMAL;\r
+ info.fMask = SEE_MASK_NOCLOSEPROCESS;\r
+ info.lpDirectory = modPath;\r
+ info.lpFile = EXEPATH;\r
+ info.lpParameters = cmdline;\r
+ ShellExecuteEx(&info);\r
+\r
+ return info.hProcess;\r
+}\r
--- /dev/null
+#pragma once\r
+#include "DllMain.h"\r
+#include <string>\r
+\r
+#define ID_ITEM 500\r
+\r
+enum CContextType\r
+{\r
+ ClearRecyleBin,\r
+ ClearFileNames,\r
+};\r
+\r
+class CContextMenu : public IContextMenu, public IShellExtInit\r
+{\r
+public:\r
+ STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject);\r
+ STDMETHODIMP_(ULONG) AddRef();\r
+ STDMETHODIMP_(ULONG) Release();\r
+\r
+ STDMETHODIMP QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);\r
+ STDMETHODIMP GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT *pwReserved, LPSTR pszName, UINT cchMax);\r
+ STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO pici);\r
+\r
+ STDMETHODIMP Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID);\r
+ \r
+ CContextMenu();\r
+ ~CContextMenu();\r
+\r
+private:\r
+ static DWORD WINAPI ThreadFunc(LPVOID pParam);\r
+ static HANDLE m_hMapping;\r
+ static HANDLE RunCompleteEraer(LPTSTR cmdline);\r
+ std::wstring strs;\r
+ LONG m_cRef;\r
+ CContextType menutype;\r
+};\r
--- /dev/null
+#include "DllMain.h"\r
+#include "ClassFactory.h"\r
+#include "ContextMenu.h"\r
+\r
+const CLSID CLSID_ContextMenuSample = {0x112143a6, 0x62c1, 0x4478, {0x9e, 0x8f, 0x87, 0x26, 0x99, 0x25, 0x5e, 0x2e}};\r
+LONG g_lLocks = 0;\r
+HINSTANCE g_hinstDll = NULL;\r
+\r
+void MyLoadString(std::wstring& str,UINT id)\r
+{\r
+ const int incriment = 256;\r
+ int length = incriment;\r
+ LPWSTR text;\r
+ for(;;)\r
+ {\r
+ text = (LPWSTR)_malloca(length * 2);\r
+ int result = ::LoadString(g_hinstDll,id,text,length);\r
+ if(result == 0)\r
+ throw "Not Found Resource";\r
+ else if(result < length)\r
+ {\r
+ str = text;\r
+ _freea(text);\r
+ break;\r
+ }\r
+ _freea(text);\r
+ length += incriment;\r
+ }\r
+}\r
+\r
+void GetModulePath(WCHAR szOutput[],int length)\r
+{\r
+ WCHAR szPath[_MAX_PATH];\r
+ WCHAR szDrive[_MAX_DRIVE];\r
+ WCHAR szDir[_MAX_DIR];\r
+ WCHAR szFileName[_MAX_FNAME];\r
+ WCHAR szExt[_MAX_EXT];\r
+\r
+ //\8f\89\8aú\89»\r
+ memset(szPath, 0x00, sizeof(szPath));\r
+ memset(szDrive, 0x00, sizeof(szDrive));\r
+ memset(szDir, 0x00, sizeof(szDir));\r
+ memset(szExt, 0x00, sizeof(szExt));\r
+ memset(szOutput, 0x00, sizeof(szOutput));\r
+ \r
+ //\8eÀ\8ds\92\86\82Ì\83v\83\8d\83Z\83X\82Ì\83t\83\8b\83p\83X\96¼\82ð\8eæ\93¾\82·\82é\r
+ DWORD dwRet = GetModuleFileName(g_hinstDll, szPath, sizeof(szPath));\r
+ if(dwRet == 0) {\r
+ //\83G\83\89\81[\8f\88\97\9d\82È\82Ç(\8fÈ\97ª)\r
+ }\r
+ \r
+ //\83t\83\8b\83p\83X\96¼\82ð\95ª\8a\84\82·\82é\r
+ _wsplitpath(szPath, szDrive, szDir, szFileName, szExt); \r
+\r
+ StringCbPrintf(szOutput,length,L"%s%s",szDrive,szDir);\r
+}\r
+\r
+void LockModule(BOOL bLock)\r
+{\r
+ if (bLock)\r
+ InterlockedIncrement(&g_lLocks);\r
+ else\r
+ InterlockedDecrement(&g_lLocks);\r
+}\r
+\r
+STDAPI DllCanUnloadNow()\r
+{\r
+ return g_lLocks == 0 ? S_OK : S_FALSE;\r
+}\r
+\r
+STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)\r
+{\r
+ static CClassFactory serverFactory;\r
+ HRESULT hr;\r
+\r
+ *ppv = NULL;\r
+ \r
+ if (IsEqualCLSID(rclsid, CLSID_ContextMenuSample))\r
+ hr = serverFactory.QueryInterface(riid, ppv);\r
+ else\r
+ hr = CLASS_E_CLASSNOTAVAILABLE;\r
+\r
+ return hr;\r
+}\r
+\r
+STDAPI DllRegisterServer(void)\r
+{\r
+ return S_OK;\r
+}\r
+\r
+STDAPI DllUnregisterServer(void)\r
+{\r
+ return S_OK;\r
+}\r
+\r
+BOOL WINAPI DllMain(HINSTANCE hinstDll, DWORD dwReason, LPVOID lpReserved)\r
+{\r
+ switch (dwReason) {\r
+\r
+ case DLL_PROCESS_ATTACH:\r
+ g_hinstDll = hinstDll;\r
+ DisableThreadLibraryCalls(hinstDll);\r
+ return TRUE;\r
+\r
+ }\r
+\r
+ return TRUE;\r
+}\r
--- /dev/null
+#include <Windows.h>\r
+#include <shlwapi.h>\r
+#include <shlobj.h>\r
+#include <strsafe.h>\r
+#include <string>\r
+\r
+extern void LockModule(BOOL bLock);\r
+extern void MyLoadString(std::wstring& str,UINT id);\r
+extern void GetModulePath(WCHAR szOutput[],int length);\r
--- /dev/null
+\r
+LIBRARY "ContextMenu"\r
+\r
+EXPORTS\r
+ DllCanUnloadNow PRIVATE\r
+ DllGetClassObject PRIVATE\r
+ DllRegisterServer PRIVATE\r
+ DllUnregisterServer PRIVATE\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{75175CC6-2219-443D-A70E-84D6A86B3245}</ProjectGuid>\r
+ <RootNamespace>ShellExtension</RootNamespace>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <UseDebugLibraries>true</UseDebugLibraries>\r
+ <CharacterSet>Unicode</CharacterSet>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <UseDebugLibraries>true</UseDebugLibraries>\r
+ <CharacterSet>Unicode</CharacterSet>\r
+ <UseOfAtl>false</UseOfAtl>\r
+ <UseOfMfc>false</UseOfMfc>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <UseDebugLibraries>false</UseDebugLibraries>\r
+ <WholeProgramOptimization>true</WholeProgramOptimization>\r
+ <CharacterSet>Unicode</CharacterSet>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <UseDebugLibraries>false</UseDebugLibraries>\r
+ <WholeProgramOptimization>true</WholeProgramOptimization>\r
+ <CharacterSet>Unicode</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+ <OutDir>$(ProjectDir)$(Configuration)\$(PlatformName)\</OutDir>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+ <OutDir>$(ProjectDir)$(Configuration)\$(PlatformName)\</OutDir>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+ <IntDir>$(ProjectDir)$(Configuration)\$(PlatformName)\</IntDir>\r
+ <TargetExt>.dll</TargetExt>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+ <IntDir>$(ProjectDir)$(Configuration)\$(PlatformName)\</IntDir>\r
+ <TargetExt>.dll</TargetExt>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+ <OutDir>$(ProjectDir)$(Configuration)\$(PlatformName)\</OutDir>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+ <IntDir>$(ProjectDir)$(Configuration)\$(PlatformName)\</IntDir>\r
+ <TargetExt>.dll</TargetExt>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+ <OutDir>$(ProjectDir)$(Configuration)\$(PlatformName)\</OutDir>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+ <IntDir>$(ProjectDir)$(Configuration)\$(PlatformName)\</IntDir>\r
+ <TargetExt>.dll</TargetExt>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+ <ClCompile>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <Optimization>Disabled</Optimization>\r
+ </ClCompile>\r
+ <Link>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <ModuleDefinitionFile>Exports.def</ModuleDefinitionFile>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+ <ClCompile>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <Optimization>Disabled</Optimization>\r
+ </ClCompile>\r
+ <Link>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <ModuleDefinitionFile>Exports.def</ModuleDefinitionFile>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+ <ClCompile>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <Optimization>MaxSpeed</Optimization>\r
+ <FunctionLevelLinking>true</FunctionLevelLinking>\r
+ <IntrinsicFunctions>true</IntrinsicFunctions>\r
+ </ClCompile>\r
+ <Link>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+ <OptimizeReferences>true</OptimizeReferences>\r
+ <ModuleDefinitionFile>Exports.def</ModuleDefinitionFile>\r
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+ <ClCompile>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <Optimization>MaxSpeed</Optimization>\r
+ <FunctionLevelLinking>true</FunctionLevelLinking>\r
+ <IntrinsicFunctions>true</IntrinsicFunctions>\r
+ </ClCompile>\r
+ <Link>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+ <OptimizeReferences>true</OptimizeReferences>\r
+ <ModuleDefinitionFile>Exports.def</ModuleDefinitionFile>\r
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="ClassFactory.h" />\r
+ <ClInclude Include="ContextMenu.h" />\r
+ <ClInclude Include="DllMain.h" />\r
+ <ClInclude Include="resource.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="ClassFactory.cpp" />\r
+ <ClCompile Include="ContextMenu.cpp" />\r
+ <ClCompile Include="DllMain.cpp" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="Exports.def" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="ShellExtension.rc" />\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <Filter Include="ソース ファイル">\r
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
+ </Filter>\r
+ <Filter Include="ヘッダー ファイル">\r
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
+ </Filter>\r
+ <Filter Include="リソース ファイル">\r
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="ClassFactory.h">\r
+ <Filter>ヘッダー ファイル</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="ContextMenu.h">\r
+ <Filter>ヘッダー ファイル</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="DllMain.h">\r
+ <Filter>ヘッダー ファイル</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="resource.h">\r
+ <Filter>ヘッダー ファイル</Filter>\r
+ </ClInclude>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="ClassFactory.cpp">\r
+ <Filter>ソース ファイル</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="ContextMenu.cpp">\r
+ <Filter>ソース ファイル</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="DllMain.cpp">\r
+ <Filter>ソース ファイル</Filter>\r
+ </ClCompile>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="Exports.def">\r
+ <Filter>ソース ファイル</Filter>\r
+ </None>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="ShellExtension.rc">\r
+ <Filter>リソース ファイル</Filter>\r
+ </ResourceCompile>\r
+ </ItemGroup>\r
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+ <LocalDebuggerCommand>\r
+ </LocalDebuggerCommand>\r
+ <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+ <LocalDebuggerCommand>\r
+ </LocalDebuggerCommand>\r
+ <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\r
+ </PropertyGroup>\r
+</Project>
\ No newline at end of file