Ignore:
Timestamp:
6/19/2010 10:34:05 AM (2 years ago)
Author:
lowjoel
Message:

Handle spanned drives and other dynamic volumes better. This patch allows basic dynamic volumes to be grouped under the parent physical drive.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.Util/VolumeInfo.cs

    r2206 r2207  
    599599                    { 
    600600                        int error = Marshal.GetLastWin32Error(); 
    601                         if (error != Win32ErrorCode.InsufficientBuffer) 
     601                        if (error == Win32ErrorCode.InvalidFunction) 
     602                            return null; 
     603                        else if (error != Win32ErrorCode.MoreData) 
    602604                            throw Win32ErrorCode.GetExceptionForWin32Error(error); 
    603605 
     
    629631                        ++i, offset += Marshal.SizeOf(typeof(NativeMethods.DISK_EXTENT))) 
    630632                    { 
    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)); 
    633636                        extents.Add(extent); 
    634637                    } 
Note: See TracChangeset for help on using the changeset viewer.