Ignore:
Timestamp:
06/18/10 06:44:31 (2 years ago)
Author:
lowjoel
Message:

Fixed error in marshalling managed to unmanaged -- the mount points for any volume would only return a maximum of 1 regardless of how many mountpoints there really were due to the array being null-terminated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.Util/NativeMethods/Kernel.cs

    r2174 r2178  
    11671167        [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] 
    11681168        [return: MarshalAs(UnmanagedType.Bool)] 
    1169         public static extern bool GetVolumePathNamesForVolumeName( 
    1170             string lpszVolumeName, StringBuilder lpszVolumePathNames, uint cchBufferLength, 
    1171             out uint lpcchReturnLength); 
     1169        public static extern bool GetVolumePathNamesForVolumeName(string lpszVolumeName, 
     1170            [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] char[] lpszVolumePathNames, 
     1171            uint cchBufferLength, out uint lpcchReturnLength); 
    11721172 
    11731173        public const int MaxPath = 260; 
Note: See TracChangeset for help on using the changeset viewer.