diff --git a/BizHawk.Client.DBMan/Program.cs b/BizHawk.Client.DBMan/Program.cs index 4cf8786185..cea5503d08 100644 --- a/BizHawk.Client.DBMan/Program.cs +++ b/BizHawk.Client.DBMan/Program.cs @@ -68,25 +68,6 @@ namespace BizHawk.Client.DBMan DeleteFileW(path + ":Zone.Identifier"); } - //for debugging purposes, this is provided. when we're satisfied everyone understands whats going on, we'll get rid of this - [DllImportAttribute("kernel32.dll", EntryPoint = "CreateFileW")] - public static extern System.IntPtr CreateFileW([InAttribute()] [MarshalAsAttribute(UnmanagedType.LPWStr)] string lpFileName, int dwDesiredAccess, int dwShareMode, [InAttribute()] int lpSecurityAttributes, int dwCreationDisposition, int dwFlagsAndAttributes, [InAttribute()] int hTemplateFile); - static void ApplyMOTW(string path) - { - int generic_write = 0x40000000; - int file_share_write = 2; - int create_always = 2; - var adsHandle = CreateFileW(path + ":Zone.Identifier", generic_write, file_share_write, 0, create_always, 0, 0); - using (var sfh = new Microsoft.Win32.SafeHandles.SafeFileHandle(adsHandle, true)) - { - var adsStream = new System.IO.FileStream(sfh, FileAccess.Write); - StreamWriter sw = new StreamWriter(adsStream); - sw.Write("[ZoneTransfer]\r\nZoneId=3"); - sw.Flush(); - adsStream.Close(); - } - } - static void WhackAllMOTW(string dllDir) { var todo = new Queue(new[] { new DirectoryInfo(dllDir) }); diff --git a/BizHawk.Client.DiscoHawk/DiscoHawk.cs b/BizHawk.Client.DiscoHawk/DiscoHawk.cs index 682af2bfa2..7508c3bcd2 100644 --- a/BizHawk.Client.DiscoHawk/DiscoHawk.cs +++ b/BizHawk.Client.DiscoHawk/DiscoHawk.cs @@ -123,25 +123,6 @@ namespace BizHawk.Client.DiscoHawk DeleteFileW(path + ":Zone.Identifier"); } - //for debugging purposes, this is provided. when we're satisfied everyone understands whats going on, we'll get rid of this - [DllImportAttribute("kernel32.dll", EntryPoint = "CreateFileW")] - public static extern System.IntPtr CreateFileW([InAttribute()] [MarshalAsAttribute(UnmanagedType.LPWStr)] string lpFileName, int dwDesiredAccess, int dwShareMode, [InAttribute()] int lpSecurityAttributes, int dwCreationDisposition, int dwFlagsAndAttributes, [InAttribute()] int hTemplateFile); - static void ApplyMOTW(string path) - { - int generic_write = 0x40000000; - int file_share_write = 2; - int create_always = 2; - var adsHandle = CreateFileW(path + ":Zone.Identifier", generic_write, file_share_write, 0, create_always, 0, 0); - using (var sfh = new Microsoft.Win32.SafeHandles.SafeFileHandle(adsHandle, true)) - { - var adsStream = new System.IO.FileStream(sfh, FileAccess.Write); - StreamWriter sw = new StreamWriter(adsStream); - sw.Write("[ZoneTransfer]\r\nZoneId=3"); - sw.Flush(); - adsStream.Close(); - } - } - static void WhackAllMOTW(string dllDir) { var todo = new Queue(new[] { new DirectoryInfo(dllDir) }); diff --git a/BizHawk.Client.EmuHawk/Program.cs b/BizHawk.Client.EmuHawk/Program.cs index bebeeb581b..3160d4e98b 100644 --- a/BizHawk.Client.EmuHawk/Program.cs +++ b/BizHawk.Client.EmuHawk/Program.cs @@ -285,25 +285,6 @@ namespace BizHawk.Client.EmuHawk DeleteFileW(path + ":Zone.Identifier"); } - //for debugging purposes, this is provided. when we're satisfied everyone understands whats going on, we'll get rid of this - [DllImportAttribute("kernel32.dll", EntryPoint = "CreateFileW")] - public static extern IntPtr CreateFileW([InAttribute()] [MarshalAsAttribute(UnmanagedType.LPWStr)] string lpFileName, int dwDesiredAccess, int dwShareMode, [InAttribute()] int lpSecurityAttributes, int dwCreationDisposition, int dwFlagsAndAttributes, [InAttribute()] int hTemplateFile); - static void ApplyMOTW(string path) - { - int generic_write = 0x40000000; - int file_share_write = 2; - int create_always = 2; - var adsHandle = CreateFileW(path + ":Zone.Identifier", generic_write, file_share_write, 0, create_always, 0, 0); - using (var sfh = new Microsoft.Win32.SafeHandles.SafeFileHandle(adsHandle, true)) - { - var adsStream = new FileStream(sfh, FileAccess.Write); - StreamWriter sw = new StreamWriter(adsStream); - sw.Write("[ZoneTransfer]\r\nZoneId=3"); - sw.Flush(); - adsStream.Close(); - } - } - static void WhackAllMOTW(string dllDir) { var todo = new Queue(new[] { new DirectoryInfo(dllDir) }); diff --git a/BizHawk.Client.MultiHawk/Program.cs b/BizHawk.Client.MultiHawk/Program.cs index 3b2fd1c6b9..800eb0e459 100644 --- a/BizHawk.Client.MultiHawk/Program.cs +++ b/BizHawk.Client.MultiHawk/Program.cs @@ -158,25 +158,6 @@ namespace BizHawk.Client.MultiHawk DeleteFileW(path + ":Zone.Identifier"); } - //for debugging purposes, this is provided. when we're satisfied everyone understands whats going on, we'll get rid of this - [DllImportAttribute("kernel32.dll", EntryPoint = "CreateFileW")] - public static extern IntPtr CreateFileW([InAttribute()] [MarshalAsAttribute(UnmanagedType.LPWStr)] string lpFileName, int dwDesiredAccess, int dwShareMode, [InAttribute()] int lpSecurityAttributes, int dwCreationDisposition, int dwFlagsAndAttributes, [InAttribute()] int hTemplateFile); - static void ApplyMOTW(string path) - { - int generic_write = 0x40000000; - int file_share_write = 2; - int create_always = 2; - var adsHandle = CreateFileW(path + ":Zone.Identifier", generic_write, file_share_write, 0, create_always, 0, 0); - using (var sfh = new Microsoft.Win32.SafeHandles.SafeFileHandle(adsHandle, true)) - { - var adsStream = new FileStream(sfh, FileAccess.Write); - StreamWriter sw = new StreamWriter(adsStream); - sw.Write("[ZoneTransfer]\r\nZoneId=3"); - sw.Flush(); - adsStream.Close(); - } - } - static void WhackAllMOTW(string dllDir) { var todo = new Queue(new[] { new DirectoryInfo(dllDir) });