public static FILE_FS_ATTRIBUTE_INFORMATION FromBuffer(IntPtr buffer) { FILE_FS_ATTRIBUTE_INFORMATION ret = new FILE_FS_ATTRIBUTE_INFORMATION(); ret.VolumeAttributes = (VolumeCaps)IOhelper.PtrToUint(buffer, 0); ret.MaximumComponentNameLength = Marshal.ReadInt32(buffer, 4); ret.FileSystemNameLength = IOhelper.PtrToUint(buffer, 8); ret.FileSystemName = IOhelper.PtrToStringUni(buffer, 12, ((int)ret.FileSystemNameLength) / 2); return(ret); }
public static FILE_FS_VOLUME_INFORMATION FromBuffer(IntPtr buffer) { FILE_FS_VOLUME_INFORMATION ret = new FILE_FS_VOLUME_INFORMATION(); ret.VolumeCreationTime = Marshal.ReadInt64(buffer, 0); ret.VolumeSerialNumber = IOhelper.PtrToUint(buffer, 8); ret.VolumeLabelLength = Marshal.ReadInt32(buffer, 12); ret.SupportsObjects = Marshal.ReadByte(buffer, 13); //pack=4 ret.VolumeLabel = IOhelper.PtrToStringUni(buffer, 18, ret.VolumeLabelLength / 2); return(ret); }