Exemple #1
0
 static void DisableMemoryMappedIO(HashSet <string> filenames, IPEImage peImage)
 {
     if (peImage != null && filenames.Contains(peImage.FileName))
     {
         peImage.UnsafeDisableMemoryMappedIO();
     }
 }
Exemple #2
0
 /// <summary>
 /// Disable memory mapped I/O
 /// </summary>
 /// <param name="peImage">PE image</param>
 public static void DisableMemoryMappedIO(IPEImage peImage)
 {
     if (peImage == null)
     {
         return;
     }
     // Files in the GAC are read-only so there's no need to disable memory mapped I/O to
     // allow other programs to write to the file.
     if (GacInfo.IsGacPath(peImage.FileName))
     {
         return;
     }
     peImage.UnsafeDisableMemoryMappedIO();
 }
Exemple #3
0
		static void DisableMemoryMappedIO(HashSet<string> filenames, IPEImage peImage) {
			if (peImage != null && filenames.Contains(peImage.FileName))
				peImage.UnsafeDisableMemoryMappedIO();
		}