Changeset 2207 for trunk/eraser/Eraser.Util/VolumeInfo.cs
- Timestamp:
- 6/19/2010 10:34:05 AM (2 years ago)
- File:
-
- 1 edited
-
trunk/eraser/Eraser.Util/VolumeInfo.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser.Util/VolumeInfo.cs
r2206 r2207 599 599 { 600 600 int error = Marshal.GetLastWin32Error(); 601 if (error != Win32ErrorCode.InsufficientBuffer) 601 if (error == Win32ErrorCode.InvalidFunction) 602 return null; 603 else if (error != Win32ErrorCode.MoreData) 602 604 throw Win32ErrorCode.GetExceptionForWin32Error(error); 603 605 … … 629 631 ++i, offset += Marshal.SizeOf(typeof(NativeMethods.DISK_EXTENT))) 630 632 { 631 NativeMethods.DISK_EXTENT extent = new NativeMethods.DISK_EXTENT(); 632 Marshal.PtrToStructure(new IntPtr(buffer.ToInt64() + offset), extent); 633 NativeMethods.DISK_EXTENT extent = (NativeMethods.DISK_EXTENT) 634 Marshal.PtrToStructure(new IntPtr(buffer.ToInt64() + offset), 635 typeof(NativeMethods.DISK_EXTENT)); 633 636 extents.Add(extent); 634 637 }
Note: See TracChangeset
for help on using the changeset viewer.
