Changeset 1843
- Timestamp:
- 2/17/2010 9:38:16 AM (2 years ago)
- Location:
- trunk/eraser6/Eraser.Util
- Files:
-
- 2 edited
-
NtfsApi.cs (modified) (2 diffs)
-
VolumeInfo.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser6/Eraser.Util/NtfsApi.cs
r1841 r1843 25 25 using Microsoft.Win32.SafeHandles; 26 26 using System.Runtime.InteropServices; 27 using System.IO; 27 28 28 29 namespace Eraser.Util … … 59 60 internal static NativeMethods.NTFS_VOLUME_DATA_BUFFER GetNtfsVolumeData(VolumeInfo volume) 60 61 { 61 using (SafeFileHandle volumeHandle = NativeMethods.CreateFile( 62 volume.VolumeId.Remove(volume.VolumeId.Length - 1), 63 NativeMethods.FILE_READ_ATTRIBUTES, NativeMethods.FILE_SHARE_READ | 64 NativeMethods.FILE_SHARE_WRITE, IntPtr.Zero, NativeMethods.OPEN_EXISTING, 65 0, IntPtr.Zero)) 62 using (SafeFileHandle volumeHandle = volume.OpenHandle( 63 NativeMethods.FILE_READ_ATTRIBUTES, FileShare.ReadWrite, FileOptions.None)) 66 64 { 67 65 uint resultSize = 0; -
trunk/eraser6/Eraser.Util/VolumeInfo.cs
r1841 r1843 626 626 } 627 627 628 privateSafeFileHandle OpenHandle(FileAccess access, FileShare share, FileOptions options)628 internal SafeFileHandle OpenHandle(FileAccess access, FileShare share, FileOptions options) 629 629 { 630 630 //Access mode … … 646 646 } 647 647 648 privateSafeFileHandle OpenHandle(uint access, FileShare share, FileOptions options)648 internal SafeFileHandle OpenHandle(uint access, FileShare share, FileOptions options) 649 649 { 650 650 //Sharing mode
Note: See TracChangeset
for help on using the changeset viewer.
