Commits

Anonymous committed 49eba31

Diskbuddy 0.7 sources from Blume (blumetools.dyndns.info/files/diskbuddy07_src.zip). Danke, Blume!

Comments (0)

Files changed (28)

     Width = 157
     Height = 13
     Alignment = taCenter
-    Caption = 'version 0.6 - 22. June 2011'
+    Caption = 'version 0.7 - 22. Sept 2011'
     Color = clWhite
     ParentColor = False
   end
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=0
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=2
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=0
+SymbolLibrary=1
+SymbolPlatform=0
+UnitLibrary=1
+UnitPlatform=0
+UnitDeprecated=0
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;dclOfficeXP;MPHexEditor_D7
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=h 9
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=1
+MajorVer=0
+MinorVer=7
+Release=0
+Build=44
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=2057
+CodePage=1252
+[Version Info Keys]
+CompanyName=blume home productions
+FileDescription=hdd and partition info
+FileVersion=0.7.0.44
+InternalName=diskbuddy
+LegalCopyright=freeware
+LegalTrademarks=none
+OriginalFilename=diskbuddy.exe
+ProductName=DiskBuddy
+ProductVersion=0.7.0.0
+Comments=http://free.pages.at/blumetools/
+[HistoryLists\hlUnitAliases]
+Count=1
+Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 program DiskBuddy;
 
+{%File 'readme.txt'}
+
 uses
   Forms,
   Main in 'Main.pas' {MainForm},
 
 begin
   Application.Initialize;
-  Application.Title := 'DiskBuddy 0.6'; //sVersionInfo;
-  //Application.Title := sVersionInfo;
+  Application.Title := 'DiskBuddy 0.7';
   Application.CreateForm(TMainForm, MainForm);
   Application.CreateForm(TProgressWin, ProgressWin);
   Application.Run;
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{2b5b8161-f161-4c46-872c-f702734543c6}</ProjectGuid>
+    <MainSource>DiskBuddy.dpr</MainSource>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+    <DCC_DependencyCheckOutputName>DiskBuddy.exe</DCC_DependencyCheckOutputName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <Version>7.0</Version>
+    <DCC_DebugInformation>False</DCC_DebugInformation>
+    <DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
+    <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
+    <DCC_Define>RELEASE</DCC_Define>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <Version>7.0</Version>
+    <DCC_Define>DEBUG</DCC_Define>
+    <DCC_UnitSearchPath>E:\Dokument\Delphi\_components</DCC_UnitSearchPath>
+    <DCC_ResourcePath>E:\Dokument\Delphi\_components</DCC_ResourcePath>
+    <DCC_ObjPath>E:\Dokument\Delphi\_components</DCC_ObjPath>
+    <DCC_IncludePath>E:\Dokument\Delphi\_components</DCC_IncludePath>
+  </PropertyGroup>
+  <ProjectExtensions>
+    <Borland.Personality>Delphi.Personality</Borland.Personality>
+    <Borland.ProjectType>VCLApplication</Borland.ProjectType>
+    <BorlandProject>
+<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1031</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Source><Source Name="MainSource">DiskBuddy.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
+  </ProjectExtensions>
+  <Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
+  <ItemGroup>
+    <DelphiCompile Include="DiskBuddy.dpr">
+      <MainSource>MainSource</MainSource>
+    </DelphiCompile>
+    <DCCReference Include="About.pas">
+      <Form>AboutForm</Form>
+    </DCCReference>
+    <DCCReference Include="DiskEdit.pas">
+      <Form>DiskEditor</Form>
+    </DCCReference>
+    <DCCReference Include="DiskName.pas" />
+    <DCCReference Include="DiskProp.pas">
+      <Form>DiskPropForm</Form>
+    </DCCReference>
+    <DCCReference Include="Disks.pas" />
+    <DCCReference Include="Ext2.pas" />
+    <DCCReference Include="FAT32.pas" />
+    <DCCReference Include="FAT32Browse.pas">
+      <Form>FAT32BrowseForm</Form>
+    </DCCReference>
+    <DCCReference Include="FAT32FileProps.pas">
+      <Form>FAT32FilePropsForm</Form>
+    </DCCReference>
+    <DCCReference Include="FAT32Props.pas">
+      <Form>FAT32PropsForm</Form>
+    </DCCReference>
+    <DCCReference Include="FAT32Search.pas">
+      <Form>FAT32SearchForm</Form>
+    </DCCReference>
+    <DCCReference Include="Main.pas">
+      <Form>MainForm</Form>
+    </DCCReference>
+    <DCCReference Include="NTFS.pas" />
+    <DCCReference Include="NTFSAttrDef.pas">
+      <Form>NTFSAttrDefForm</Form>
+    </DCCReference>
+    <DCCReference Include="NTFSBrowse.pas">
+      <Form>NTFSBrowseForm</Form>
+    </DCCReference>
+    <DCCReference Include="NTFSMFT.pas">
+      <Form>NTFSMFTForm</Form>
+    </DCCReference>
+    <DCCReference Include="NTFSProps.pas">
+      <Form>NTFSPropsForm</Form>
+    </DCCReference>
+    <DCCReference Include="NTFSSearch.pas">
+      <Form>NTFSSearchForm</Form>
+    </DCCReference>
+    <DCCReference Include="progressbar.pas">
+      <Form>ProgressWin</Form>
+    </DCCReference>
+  </ItemGroup>
+</Project>

DiskBuddy.dproj.2007

+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{2b5b8161-f161-4c46-872c-f702734543c6}</ProjectGuid>
+    <MainSource>DiskBuddy.dpr</MainSource>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+    <DCC_DependencyCheckOutputName>DiskBuddy.exe</DCC_DependencyCheckOutputName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <Version>7.0</Version>
+    <DCC_DebugInformation>False</DCC_DebugInformation>
+    <DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
+    <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
+    <DCC_Define>RELEASE</DCC_Define>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <Version>7.0</Version>
+    <DCC_Define>DEBUG</DCC_Define>
+    <DCC_UnitSearchPath>E:\Dokument\Delphi\_components</DCC_UnitSearchPath>
+    <DCC_ResourcePath>E:\Dokument\Delphi\_components</DCC_ResourcePath>
+    <DCC_ObjPath>E:\Dokument\Delphi\_components</DCC_ObjPath>
+    <DCC_IncludePath>E:\Dokument\Delphi\_components</DCC_IncludePath>
+  </PropertyGroup>
+  <ProjectExtensions>
+    <Borland.Personality>Delphi.Personality</Borland.Personality>
+    <Borland.ProjectType>VCLApplication</Borland.ProjectType>
+    <BorlandProject>
+<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1031</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Source><Source Name="MainSource">DiskBuddy.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
+  </ProjectExtensions>
+  <Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
+  <ItemGroup>
+    <DelphiCompile Include="DiskBuddy.dpr">
+      <MainSource>MainSource</MainSource>
+    </DelphiCompile>
+    <DCCReference Include="About.pas">
+      <Form>AboutForm</Form>
+    </DCCReference>
+    <DCCReference Include="DiskEdit.pas">
+      <Form>DiskEditor</Form>
+    </DCCReference>
+    <DCCReference Include="DiskName.pas" />
+    <DCCReference Include="DiskProp.pas">
+      <Form>DiskPropForm</Form>
+    </DCCReference>
+    <DCCReference Include="Disks.pas" />
+    <DCCReference Include="Ext2.pas" />
+    <DCCReference Include="FAT32.pas" />
+    <DCCReference Include="FAT32Browse.pas">
+      <Form>FAT32BrowseForm</Form>
+    </DCCReference>
+    <DCCReference Include="FAT32FileProps.pas">
+      <Form>FAT32FilePropsForm</Form>
+    </DCCReference>
+    <DCCReference Include="FAT32Props.pas">
+      <Form>FAT32PropsForm</Form>
+    </DCCReference>
+    <DCCReference Include="FAT32Search.pas">
+      <Form>FAT32SearchForm</Form>
+    </DCCReference>
+    <DCCReference Include="Main.pas">
+      <Form>MainForm</Form>
+    </DCCReference>
+    <DCCReference Include="NTFS.pas" />
+    <DCCReference Include="NTFSAttrDef.pas">
+      <Form>NTFSAttrDefForm</Form>
+    </DCCReference>
+    <DCCReference Include="NTFSBrowse.pas">
+      <Form>NTFSBrowseForm</Form>
+    </DCCReference>
+    <DCCReference Include="NTFSMFT.pas">
+      <Form>NTFSMFTForm</Form>
+    </DCCReference>
+    <DCCReference Include="NTFSProps.pas">
+      <Form>NTFSPropsForm</Form>
+    </DCCReference>
+    <DCCReference Include="NTFSSearch.pas">
+      <Form>NTFSSearchForm</Form>
+    </DCCReference>
+    <DCCReference Include="progressbar.pas">
+      <Form>ProgressWin</Form>
+    </DCCReference>
+  </ItemGroup>
+</Project>
+[Closed Files]
+File_0=SourceModule,'M:\Dokument\Delphi\DiskBuddy_9\DiskName.pas',0,1,102,61,143,0,0
+File_1=SourceModule,'m:\Dokument\Delphi\_components\util.pas',0,1,79,112,103,0,0
+File_2=SourceModule,'M:\Dokument\Delphi\DiskBuddy_9\readme.txt',0,1,1,26,14,0,0
+File_3=SourceModule,'c:\Dokument\Delphi\DiskBuddy_9\NTFSSearch.pas',0,1,1,1,1,0,0
+File_4=SourceModule,'C:\Dokument\Delphi\DiskBuddy_9\NTFSBrowse.pas',0,1,390,56,441,0,0
+File_5=SourceModule,'C:\Dokument\Delphi\DiskBuddy_9\FAT32Props.pas',0,1,1,1,1,1,0
+File_6=SourceModule,'C:\Dokument\Delphi\DiskBuddy_9\NTFSProps.pas',0,1,1,1,1,0,0
+File_7=SourceModule,'C:\Dokument\Delphi\DiskBuddy_9\DiskProp.pas',0,1,1,1,1,0,0
+File_8=SourceModule,'C:\Dokument\Delphi\DiskBuddy_9\FAT32.pas',0,1,1,1,1,0,0
+File_9=SourceModule,'C:\Dokument\Delphi\DiskBuddy_9\Ext2.pas',0,1,1,41,6,0,0
+
+[Modules]
+Module0=M:\Dokument\Delphi\DiskBuddy_9\NTFSMFT.pas
+Module1=M:\Dokument\Delphi\DiskBuddy_9\NTFS.pas
+Count=2
+EditWindowCount=1
+
+[M:\Dokument\Delphi\DiskBuddy_9\NTFSMFT.pas]
+ModuleType=SourceModule
+FormState=0
+FormOnTop=0
+
+[M:\Dokument\Delphi\DiskBuddy_9\NTFS.pas]
+ModuleType=SourceModule
+FormState=0
+FormOnTop=0
+
+[M:\Dokument\Delphi\DiskBuddy_9\DiskBuddy.dpr]
+FormState=0
+FormOnTop=0
+SymbolFile=M:\Dokument\Delphi\DiskBuddy_9\DiskBuddy.dsm
+ModSinceCompile=0
+
+[m:\Dokument\Delphi\bass sonogram36\ProjectGroup1.bpg]
+FormState=0
+FormOnTop=0
+
+[EditWindow0]
+ViewCount=2
+CurrentView=1
+View0=0
+View1=1
+CodeExplorer=CodeExplorer@EditWindow0
+MessageView=MessageView@EditWindow0
+Create=1
+Visible=1
+State=0
+Left=896
+Top=-6
+Width=1030
+Height=1179
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=1022
+ClientHeight=1152
+LeftPanelSize=0
+LeftPanelClients=CodeExplorer@EditWindow0
+LeftPanelData=00000400010000000C000000436F64654578706C6F726572000000000000000000000000000000000001000000000000000000000000FFFFFFFF
+RightPanelSize=0
+BottomPanelSize=85
+BottomPanelClients=MessageView@EditWindow0
+BottomPanelData=000004000000000000000000000000000000000000000000000100000000000000000B0000004D65737361676556696577FFFFFFFF
+
+[View0]
+Module=M:\Dokument\Delphi\DiskBuddy_9\NTFS.pas
+CursorX=13
+CursorY=2114
+TopLine=2069
+LeftCol=1
+
+[View1]
+Module=M:\Dokument\Delphi\DiskBuddy_9\NTFSMFT.pas
+CursorX=51
+CursorY=1440
+TopLine=1381
+LeftCol=1
+
+[Watches]
+Count=6
+Watch0='dirname',256,0,18,1,0,'�berwachte Ausdr�cke'
+Watch1='attrname',256,0,18,1,0,'�berwachte Ausdr�cke'
+Watch2='RunList',256,0,18,1,0,'�berwachte Ausdr�cke'
+Watch3='dirname+attrname',256,0,18,1,0,'�berwachte Ausdr�cke'
+Watch4='PartInfo.PartitionTable[J].SizeSect',256,0,18,1,0,'�berwachte Ausdr�cke'
+Watch5='Disk.TotalSectors',256,0,18,1,0,'�berwachte Ausdr�cke'
+
+[WatchWindow]
+WatchColumnWidth=203
+WatchShowColumnHeaders=1
+Create=1
+Visible=1
+State=0
+Left=540
+Top=754
+Width=579
+Height=320
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=571
+ClientHeight=293
+TBDockHeight=390
+LRDockWidth=579
+Dockable=1
+
+[Breakpoints]
+Count=0
+
+[AddressBreakpoints]
+Count=0
+
+[Main Window]
+Create=1
+Visible=1
+State=0
+Left=0
+Top=0
+Width=765
+Height=123
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=757
+ClientHeight=96
+
+[ProjectManager]
+Create=1
+Visible=0
+State=0
+Left=337
+Top=217
+Width=438
+Height=303
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=430
+ClientHeight=276
+TBDockHeight=303
+LRDockWidth=438
+Dockable=1
+
+[Components]
+Left=240
+Top=237
+Width=183
+Height=238
+Create=1
+Visible=0
+State=0
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=175
+ClientHeight=211
+TBDockHeight=238
+LRDockWidth=183
+Dockable=1
+
+[CPUWindow]
+Create=1
+Visible=0
+State=0
+Left=234
+Top=125
+Width=1599
+Height=794
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=1591
+ClientHeight=767
+DumpPane=79
+DisassemblyPane=187
+RegisterPane=231
+FlagPane=64
+
+[AlignmentPalette]
+Create=1
+Visible=0
+State=0
+Left=200
+Top=107
+Width=156
+Height=85
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=150
+ClientHeight=60
+
+[PropertyInspector]
+Create=1
+Visible=1
+State=0
+Left=188
+Top=12
+Width=223
+Height=608
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=223
+ClientHeight=608
+TBDockHeight=608
+LRDockWidth=182
+Dockable=1
+SplitPos=94
+ArrangeBy=Name
+SelectedItem=
+ExpandedItems=
+HiddenCategories=
+
+[BreakpointWindow]
+Create=1
+Visible=0
+State=0
+Left=330
+Top=578
+Width=893
+Height=589
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=885
+ClientHeight=562
+TBDockHeight=197
+LRDockWidth=737
+Dockable=1
+Column0Width=138
+Column1Width=75
+Column2Width=200
+Column3Width=200
+Column4Width=75
+Column5Width=75
+
+[CallStackWindow]
+Create=1
+Visible=1
+State=0
+Left=75
+Top=754
+Width=462
+Height=254
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=454
+ClientHeight=227
+TBDockHeight=254
+LRDockWidth=462
+Dockable=1
+
+[ThreadStatusWindow]
+Create=1
+Visible=1
+State=0
+Left=428
+Top=599
+Width=694
+Height=152
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=686
+ClientHeight=125
+TBDockHeight=152
+LRDockWidth=694
+Dockable=1
+Column0Width=145
+Column1Width=100
+Column2Width=149
+Column3Width=250
+
+[ObjectTree]
+Create=1
+Visible=1
+State=0
+Left=0
+Top=12
+Width=184
+Height=608
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=184
+ClientHeight=608
+TBDockHeight=608
+LRDockWidth=182
+Dockable=1
+
+[LocalVarsWindow]
+Create=1
+Visible=0
+State=0
+Left=0
+Top=0
+Width=681
+Height=42
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=673
+ClientHeight=15
+TBDockHeight=129
+LRDockWidth=421
+Dockable=1
+
+[ToDo List]
+Create=1
+Visible=0
+State=0
+Left=725
+Top=475
+Width=470
+Height=250
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=462
+ClientHeight=223
+TBDockHeight=250
+LRDockWidth=470
+Dockable=1
+Column0Width=200
+Column1Width=30
+Column2Width=100
+Column3Width=70
+Column4Width=70
+SortOrder=4
+ShowHints=1
+ShowChecked=1
+
+[ModuleWindow]
+Create=1
+Visible=0
+State=0
+Left=232
+Top=250
+Width=636
+Height=353
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=628
+ClientHeight=326
+TBDockHeight=355
+LRDockWidth=638
+Dockable=1
+Column0Width=125
+Column1Width=100
+Column2Width=155
+EntryPointPane=225
+CompUnitPane=104
+
+[CodeExplorer@EditWindow0]
+Create=1
+Visible=0
+State=0
+Left=0
+Top=12
+Width=140
+Height=844
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=140
+ClientHeight=844
+TBDockHeight=305
+LRDockWidth=140
+Dockable=1
+
+[MessageView@EditWindow0]
+Create=1
+Visible=1
+State=0
+Left=12
+Top=0
+Width=1010
+Height=85
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=1010
+ClientHeight=85
+TBDockHeight=85
+LRDockWidth=443
+Dockable=1
+
+[DockHosts]
+DockHostCount=1
+
+[DockSite0]
+DockSiteType=0
+Create=1
+Visible=1
+State=0
+Left=0
+Top=105
+Width=419
+Height=647
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=411
+ClientHeight=620
+TBDockHeight=647
+LRDockWidth=419
+Dockable=1
+DockClients=ObjectTree,PropertyInspector
+DockSiteData=00000400000000009B01000000000000026C020000000000000100000000BC0000000E0000004F626A656374547265655669657701000000009B0100001100000050726F7065727479496E73706563746F72FFFFFFFF
+
+[DiskBuddy]
+ScreenX=6
+ScreenY=112
+ScreenW=610
+ScreenH=544
+DiskmapWidth=183
+IconSize=Small
+DiskListVisible=FALSE

DiskBuddy2.ico

Binary file added.
     sVendor : string;
     sModel  : string;
     sVersion: string;
-    sSerialNumber:string;
+    sSerial,sSerialNumber:string;
+    repl,replwith:string;
     i:integer;
     logfile    : TFileStream;
 begin
             sModel       :=GetStringFromOffset(buffer,storage_descrip.ProductIdOffset,39);
             sVersion     :=GetStringFromOffset(buffer,storage_descrip.ProductRevisionOffset,39);
             sSerialNumber:=GetStringFromOffset(buffer,storage_descrip.SerialNumberOffset,39);
-            sSerialNumber:=ReplaceAllStringsInString(sSerialNumber,'20','');
+            repl:='20';
+            replwith:='';
+            sSerial:=ReplaceAllStringsInString(sSerialNumber,repl,replwith,true);
 
             //logfile := TFileStream.Create('e:\spec'+IntToStr(DriveID)+'.log', fmCreate or fmOpenWrite or fmShareDenyWrite);
             //logfile.Write(buffer,10000);
             result:='"'+Trim(Trim(sVendor) + ' ' + Trim(sModel)  + ' ' + Trim(sVersion))+'"';
             if serialnostr<>'' then
             begin
-              serialnostr:=trim(HexTwins2String(sSerialNumber,true));
+              serialnostr:=trim(HexTwins2String(sSerial,true));
             end;
 
             if (List<>nil) then begin

Diskbuddy1.ico

Binary file added.
 begin
 PathInfo := APartInfo;
 Disk := PathInfo.Disk;
-//superblock is always at located at 1024th byte
+//superblock is always located at 1024th byte
 Disk.Position := Int64(PathInfo.StartSec * Int64(512) + 1024);
 Disk.Read(Buf,512);
 Move(Buf,SuperBlock,SizeOf(SuperBlock));
 end;
 
 end.
+

FAT32Browse_with_arrows.cpp

+unit FAT32Browse;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, ComCtrls, Grids, MPHexEditor, Main, ImgList, StdCtrls, Menus, FAT32,
+  ToolWin;
+
+type
+
+  TFAT32BrowseForm == class(TForm)
+ TListView     View;
+ TImageList     ImageList1;
+ TPopupMenu     PopupMenu1;
+ TMenuItem     Info1;
+ TMenuItem     ViewinDiskEditor1;
+ TMenuItem     ViewFATentry{inDiskEditor1;
+ TMenuItem     N1;
+ TMenuItem     SaveAs1;
+ TMenuItem     RecoveryWizard1;
+ TSaveDialog     SaveDlg;
+ TImageList     ImageList2;
+ TCoolBar     CoolBar1;
+ TToolBar     ToolBar1;
+ TToolButton     ToolButton1;
+ TToolButton     ToolButton2;
+ TToolButton     ToolButton3;
+ TMenuItem     Open1;
+ TMenuItem     OpeninNewWindow1;
+ TMenuItem     N2;
+ TStatusBar     Status;
+ TEdit     Edit1;
+ TObject)     procedure FormCreate(Sender;
+ TObject { Action: TCloseAction);     procedure FormClose(Sender;
+
+ TObject)     procedure Exit1Click(Sender;
+ Cardinal)     procedure ReadDirectory(Clust;
+ TObject)     procedure ViewDblClick(Sender;
+ TObject)     procedure Info1Click(Sender;
+ TObject)     procedure ViewinDiskEditor1Click(Sender;
+ TObject)     procedure ViewFATentryinDiskEditor1Click(Sender;
+ TObject)     procedure SaveAs1Click(Sender;
+ TObject)     procedure ToolButton1Click(Sender;
+ TObject)     procedure ToolButton2Click(Sender;
+ TObject)     procedure ToolButton3Click(Sender;
+ TObject)     procedure Open1Click(Sender;
+ TObject)     procedure OpeninNewWindow1Click(Sender;
+ TObject)     procedure PopupMenu1Popup(Sender;
+ TObject)     procedure RecoveryWizard1Click(Sender;
+ TObject Item1, Item2: TListItem; Data: int    ; { Compare: int    );     procedure ViewCompare(Sender;
+ TObject Column: TListColumn);     procedure ViewColumnClick(Sender;
+ TObject var Key: Word;Shift: TShiftState);     procedure ViewKeyUp(Sender;
+
+ TObject)     procedure FormShow(Sender;
+    procedure OneDirUp;
+  public
+ Cardinal     CurClust;
+ TFAT32     FAT32;
+string     PartName;
+ TList     BackHistory;
+ TList     NextHistory;
+   } 
+
+var
+ TFAT32BrowseForm   FAT32BrowseForm;
+ int       ColumnToSortFound        ;
+ boolean   reverseorder             ;
+
+implementation
+
+uses FAT32FileProps, DiskEdit, FAT32Search;
+
+/*$R *.dfm*/
+
+ TObject) procedure TFAT32BrowseForm->FormCreate(Sender;
+  
+BackHistory =  TList->Create;
+NextHistory =  TList->Create;
+ColumnToSortFound =  2;
+reverseorder=  false;
+ } 
+
+ TObject) procedure TFAT32BrowseForm->Exit1Click(Sender;
+ { 
+Close;
+ } 
+
+ Cardinal) procedure TFAT32BrowseForm->ReadDirectory(Clust;
+ TMemoryStream { M;
+ pFAT32DirEntry   DirEnt;
+ TListItem   Item;
+ string   FileName;
+ string   stype   ;
+ int       lastsort;
+ { 
+  View->SortType= stNone;
+  View->Clear;
+  Status->Panels[0]->Text =  "Searching, please wait.-.>";
+  if(Clust == 0   )  { 
+    if(FAT32->FatType == ftFAT32   )  { 
+      if(FAT32->BootSec->RootDirStartClust==0   )
+        FAT32->BootSec->RootDirStartClust= FAT32->FATStartSec;
+      CurClust =  FAT32->BootSec->RootDirStartClust;
+      M =  FAT32->ReadClusterChain(CurClust);
+    }   else  { 
+      CurClust =  0;
+      M =  TMemoryStream->Create;
+      M->SetSize((FAT32->BootSec16->MaxRootEntries * 32));
+      FAT32->Disk->Position =  Int64(FAT32->BootSec16->HiddenSectors + FAT32->BootSec16->ReservedSectors + FAT32->BootSec16->NumOfFatCopies * FAT32->BootSec16->SectorsPerFatOld) * 512;
+      M->CopyFrom(FAT32->Disk,(FAT32->BootSec16->MaxRootEntries * 32));
+      M->Position =  0;
+      //M := DiskReadStream(
+      //FAT32.PartInfo.DiskID,
+      //FAT32.BootSec.HiddenSectors + FAT32.BootSec.ReservedSectors + FAT32.BootSec.NumOfFatCopies * FAT32.BootSec.SectorsPerFatOld,
+      //(FAT32.BootSec.MaxRootEntries * 32) div 512
+      //);
+     } 
+  }   else  { 
+     CurClust =  Clust;
+     M =  FAT32->ReadClusterChain(CurClust);
+   } 
+
+  do{
+    GetMem(DirEnt,SizeOf(TFAT32DirEntry{));
+    M->ReadBuffer(*DirEnt,SizeOf(TFAT32DirEntry{));
+    if(Byte(DirEnt->Attributes) == $0F   ) FileName =  FAT32LongFilename(*DirEnt,M)
+                                    else FileName =  FAT32ShortFilename(*DirEnt);
+    if((DirEnt->FileName[0] in [#0])   )  { 
+      FreeMem(DirEnt);
+      if((FAT32->FatType == ftFAT16) &&  (CurClust == 0)
+      then Break else Continue;
+     } 
+
+    if(FileName!="." then
+     { 
+      Item =  View->Items->Add;
+      Item->Data =  DirEnt;
+      Item->Caption =  FileName;
+      if(DirEnt->FileName[0] == #229   )  { 
+        if(aDirectory in DirEnt->Attributes   )  { 
+          stype= "dir, deleted";
+          Item->ImageIndex =  3;
+        }   else  { 
+          stype= "file, deleted";
+          Item->ImageIndex =  2;
+         } 
+      }   else  { 
+        if(aDirectory in DirEnt->Attributes   )  { 
+          stype= "dir";
+          Item->ImageIndex =  0;
+        }   else  { 
+          stype= "file";
+          Item->ImageIndex =  1;
+         } 
+       } 
+      //if(directory entry{ is file, show it"s size
+      if(!   (aDirectory in DirEnt->Attributes)
+      then Item->SubItems->Add(IntToStr(DirEnt->Size))
+      else Item->SubItems->Add("0");
+      Item->SubItems->Add(stype);
+     } 
+  }while( M->Size - M->Position <== 32);
+
+ M->Free;
+ Status->Panels[0]->Text =  IntToStr(View->Items->Count) + " items->";
+ View->SortType= stText;
+ View->ShowColumnHeaders= true;
+ lastsort= ColumnToSortFound;
+ if(lastsort!=0   )  { 
+  ColumnToSortFound= 0;
+  View->AlphaSort;
+  } 
+ ColumnToSortFound= lastsort;
+ View->AlphaSort;
+ View->SetFocus;
+ } 
+
+ TObject) procedure TFAT32BrowseForm->ViewDblClick(Sender;
+ TFAT32DirEntry{ { DirEnt;
+  
+ if(View->ItemIndex > -1   )
+  { 
+   //if aDirectory in DirEnt.Attributes then
+   if(View->Selected->ImageIndex == 0   )
+    { 
+     if(View->Selected->Caption=="-.>"   )
+       OneDirUp
+     else  { 
+       if(length(Edit1->Text)>==3   )
+         Edit1->Text =  Edit1->Text+View->Selected->Caption+"\";
+
+       BackHistory->Add(Pointer(CurClust));
+       DirEnt =  TFAT32DirEntry{(View->Selected->*Data);
+       ReadDirectory(FAT32File { Clust(DirEnt));
+
+       //Edit1->Text= ; //NTFS->GetReferencedDir(CurMFT, "");
+       Application->ProcessMessages;
+       View->Items[0]->Selected= TRUE;
+      } 
+   }   else
+     Info1Click(Sender);
+  } 
+ } 
+
+ TObject) procedure TFAT32BrowseForm->Info1Click(Sender;
+ { 
+with TFAT32FilePropsForm->Create(Application) do
+  { 
+ FAT32 =  Self->FAT32;
+ DirEnt =  TFAT32DirEntry{(View->Selected->*Data);
+ Caption =  View->Selected->Caption;
+ Show;
+  } 
+ } 
+
+ TObject) procedure TFAT32BrowseForm->ViewinDiskEditor1Click(Sender;
+{
+ Cardinal Clust;
+  
+Clust =  FAT32File { Clust(TFAT32DirEntry{(View->Selected->*Data));
+with TDiskEditor->Create(Application) do
+  { 
+ Partition =  True;
+ Disk =  FAT32->PartInfo->Disk;
+ MinSec =  FAT32->PartInfo->StartSec;
+ MaxSec =  FAT32->PartInfo->StartSec + FAT32->PartInfo->SizeSec;
+ CurSec =  FAT32->DataStartSec + (Clust * FAT32->BootSec->SecPerClust) -
+           (2 * FAT32->BootSec->SecPerClust);
+ BytesPerSector =  FAT32->BootSec->BytesPerSec;
+ BytesPerCluster =  Fat32->BootSec->SecPerClust*FAT32->BootSec->BytesPerSec;
+ UpdateSec;
+  } 
+ } 
+
+ TObject) procedure TFAT32BrowseForm->ViewFATentry{inDiskEditor1Click(Sender;
+{
+ Cardinal FATSec;
+ Word FATOffset;
+ Cardinal Clust;
+  
+Clust =  FAT32File { Clust(TFAT32DirEntry{(View->Selected->*Data));
+if(FAT32->FatType == ftFAT32   )
+  { 
+ FATSec =  Clust  /  128;
+ FATOffset =  (Clust  %  128) * 4;
+ }  
+else
+  { 
+ FATSec =  Clust  /  256;
+ FATOffset =  (Clust  %  256) * 2;
+  } 
+with TDiskEditor->Create(Application) do
+  { 
+ Partition =  True;
+ Disk =  FAT32->PartInfo->Disk;
+ MinSec =  FAT32->PartInfo->StartSec;
+ MaxSec =  FAT32->PartInfo->StartSec + FAT32->PartInfo->SizeSec;
+ CurSec =  FAT32->FATStartSec + FATSec;
+ BytesPerSector =  FAT32->BootSec->BytesPerSec;
+ BytesPerCluster =  Fat32->BootSec->SecPerClust*FAT32->BootSec->BytesPerSec;
+ UpdateSec;
+ Editor->SelStart =  FATOffset;
+ Editor->SelEnd =  FATOffset + 3;
+  } 
+ } 
+
+ TObject) procedure TFAT32BrowseForm->SaveAs1Click(Sender;
+ TFAT32DirEntry{ { DirEnt;
+ TMemoryStream     M;
+int         i;
+  
+  SaveDlg->FileName =  "[ignored]";// View.Selected.Caption;
+  if(SaveDlg->Execute   )
+   { 
+    for( i= 0; i<=View->Items->Count-1; i++)
+     { 
+      if(View->Items[i]->Selected   )
+       { 
+        DirEnt =  TFAT32DirEntry{(View->Items[i]->*Data);
+        M =  FAT32->ReadFile(DirEnt);
+        M->SaveToFile(ExtractFilePath(SaveDlg->FileName)+View->Items[i]->Caption);
+        M->Free;
+       } 
+     } 
+   } 
+  SaveDlg->FileName =  "";
+ } 
+
+ TObject) procedure TFAT32BrowseForm->ToolButton1Click(Sender;
+{
+ Cardinal Clust;
+  
+if(BackHistory->Count > 0   )
+  { 
+ Clust =  Cardinal(BackHistory[BackHistory->Count - 1]);
+ BackHistory->Delete(BackHistory->Count - 1);
+ NextHistory->Add(Pointer(CurClust));
+ ReadDirectory(Clust);
+ }  
+else
+Beep;
+ } 
+
+ TObject) procedure TFAT32BrowseForm->ToolButton2Click(Sender;
+{
+ Cardinal Clust;
+  
+if(NextHistory->Count > 0   )
+  { 
+ Clust =  Cardinal(NextHistory[NextHistory->Count - 1]);
+ NextHistory->Delete(NextHistory->Count - 1);
+ BackHistory->Add(Pointer(CurClust));
+ ReadDirectory(Clust);
+ }  
+else
+Beep;
+ } 
+
+procedure TFAT32BrowseForm->OneDirUp;
+int     { i;
+ TListItem     Item;
+ TFAT32DirEntry     DirEnt;
+string     lastone;
+ { 
+  i= Length(edit1->Text)-1;
+  while( (edit1->text[i]!="\") and (i>3)) Dec(i);
+  lastone= copy(edit1->Text,i+1,Length(edit1->Text)-i-1);
+  edit1->Text= copy(edit1->Text,1,i);
+
+  Item =  View->FindCaption(0,".->",false,true,false);
+  if(Item != NULL   )
+   { 
+    DirEnt =  TFAT32DirEntry{(Item->*Data);
+    BackHistory->Add(Pointer(CurClust));
+    ReadDirectory(FAT32File { Clust(DirEnt));
+  }   else
+    Beep;
+
+  Application->ProcessMessages;
+  for( i= 0; i<=View->Items->Count-1; i++)
+   { 
+    if(View->Items[i]->Caption==lastone   )
+     { 
+      View->Selected= NULL;
+      Application->ProcessMessages;
+      View->Items[i]->Selected= TRUE;
+      View->Items[i]->Focused= TRUE;
+      View->Items[i]->MakeVisible(false);
+      break;
+     } 
+   } 
+ } 
+
+
+ TObject) procedure TFAT32BrowseForm->ToolButton3Click(Sender;
+ { 
+  OneDirUp;
+ } 
+
+ TObject) procedure TFAT32BrowseForm->Open1Click(Sender;
+{
+ TFAT32DirEntry DirEnt;
+ { 
+BackHistory->Add(Pointer(CurClust));
+DirEnt =  TFAT32DirEntry{(View->Selected->*Data);
+ReadDirectory(FAT32File { Clust(DirEnt));
+ } 
+
+ TObject) procedure TFAT32BrowseForm->OpeninNewWindow1Click(Sender;
+ TFAT32DirEntry{ { DirEnt;
+string     sname;
+  
+DirEnt =  TFAT32DirEntry{(View->Selected->*Data);
+sname= Edit1->Text+View->Selected->Caption+"\";
+with TFAT32BrowseForm->Create(Application) do
+  { 
+  FAT32 =  TFAT32->Create(Self->FAT32->PartInfo);
+  Show;
+  edit1->text= sname;
+  ReadDirectory(FAT32File { Clust(DirEnt));
+   } 
+ } 
+
+ TObject) procedure TFAT32BrowseForm->PopupMenu1Popup(Sender;
+{
+ int     I;
+  
+if(View->ItemIndex == -1   )
+for( I =  0; i <=PopupMenu1->Items->Count - 1; i ++)
+  { 
+ PopupMenu1->Items[I]->Visible =  True;
+ PopupMenu1->Items[I]->Enabled =  False;
+ }  
+else
+  { 
+ for( I =  0; i <=PopupMenu1->Items->Count - 1; i ++)
+ PopupMenu1->Items[I]->Enabled =  True;
+ Open1->Visible            =  View->Selected->ImageIndex == 0;
+ OpeninNewWindow1->Visible =  View->Selected->ImageIndex == 0;
+ Info1->Visible                    =  True;
+ ViewinDiskEditor1->Visible        =  True;
+ ViewFATentry{inDiskEditor1->Visible=  true;
+ SaveAs1->Visible          =  true; //View.Selected.ImageIndex = 1;
+ RecoveryWizard1->Visible  =  View->Selected->ImageIndex == 2;
+  } 
+ } 
+
+ TObject) procedure TFAT32BrowseForm->RecoveryWizard1Click(Sender;
+ TFAT32DirEntry{ { DirEnt;
+  
+DirEnt =  TFAT32DirEntry{(View->Selected->*Data);
+
+with TFAT32SearchForm->Create(Application) do
+  { 
+ FAT32 =  TFAT32->Create(Self->FAT32->PartInfo);
+ Show;
+  } 
+ } 
+
+string s2: string): int    ; function CompareNumbers(s1;
+ Int64 { n1, n2 ;
+  
+	result= 0;
+	n1= StrToInt64(s1); n2= StrToInt64(s2);
+	if(n1<n2   ) result= 1
+	else if(n1>n2   ) result= -1;
+ } 
+
+ TObject procedure TFAT32BrowseForm->ViewColumnClick(Sender;
+ TListColumn)   Column;
+ { 
+   if(Status->Panels[0]->Text == "Searching, please wait.-.>"   ) exit;
+
+   if((ColumnToSortFound==Column->Index)   )
+	   reverseorder=  !   reverseorder;
+
+   ColumnToSortFound =  Column->Index;
+   (Sender as TCustomListView)->AlphaSort;
+ } 
+
+ TObject Item1, procedure TFAT32BrowseForm->ViewCompare(Sender;
+ TListItem Data: int    ; { Compare: int    );   Item2;
+ int     var ix   ;
+  
+   if(Status->Panels[0]->Text == "Searching, please wait.-.>"   ) exit;
+
+   ix =  ColumnToSortFound - 1;
+   if((ColumnToSortFound == 0)   )
+	 if(!   reverseorder   )
+	   Compare =  CompareText(Item1->Caption,Item2->Caption)
+	 else
+	   Compare =  -CompareText(Item1->Caption,Item2->Caption)
+   else
+  		if(!   reverseorder   )
+	  	  Compare =  CompareText(Item1->SubItems[ix],Item2->SubItems[ix])
+		  else
+		    Compare =  -CompareText(Item1->SubItems[ix],Item2->SubItems[ix])
+ } 
+
+
+ TObject { Key: Word; procedure TFAT32BrowseForm->ViewKeyUp(Sender;
+ TShiftState)   Shift;
+  
+	if((Key==VK_RETURN)   )
+		ViewDblClick(Sender);
+  if(key==VK_Back   )
+    ToolButton3Click(sender);
+ } 
+
+ TObject procedure TFAT32BrowseForm->FormClose(Sender;
+ TCloseAction)   { Action;
+  
+  fat32->Disk->CloseVolume;
+  fat32->Free;
+ } 
+
+ TObject) procedure TFAT32BrowseForm->FormShow(Sender;
+ { 
+  edit1->Text= copy(PartName,1,2)+"\";
+ } 
+
+ } 

FAT32Browse_with_dots.cpp

+unit FAT32Browse;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, ComCtrls, Grids, MPHexEditor, Main, ImgList, StdCtrls, Menus, FAT32,
+  ToolWin;
+
+type
+
+  TFAT32BrowseForm == class(TForm)
+ TListView     View;
+ TImageList     ImageList1;
+ TPopupMenu     PopupMenu1;
+ TMenuItem     Info1;
+ TMenuItem     ViewinDiskEditor1;
+ TMenuItem     ViewFATentry{inDiskEditor1;
+ TMenuItem     N1;
+ TMenuItem     SaveAs1;
+ TMenuItem     RecoveryWizard1;
+ TSaveDialog     SaveDlg;
+ TImageList     ImageList2;
+ TCoolBar     CoolBar1;
+ TToolBar     ToolBar1;
+ TToolButton     ToolButton1;
+ TToolButton     ToolButton2;
+ TToolButton     ToolButton3;
+ TMenuItem     Open1;
+ TMenuItem     OpeninNewWindow1;
+ TMenuItem     N2;
+ TStatusBar     Status;
+ TEdit     Edit1;
+ TObject)     procedure FormCreate(Sender;
+ TObject { Action: TCloseAction);     procedure FormClose(Sender;
+
+ TObject)     procedure Exit1Click(Sender;
+ Cardinal)     procedure ReadDirectory(Clust;
+ TObject)     procedure ViewDblClick(Sender;
+ TObject)     procedure Info1Click(Sender;
+ TObject)     procedure ViewinDiskEditor1Click(Sender;
+ TObject)     procedure ViewFATentryinDiskEditor1Click(Sender;
+ TObject)     procedure SaveAs1Click(Sender;
+ TObject)     procedure ToolButton1Click(Sender;
+ TObject)     procedure ToolButton2Click(Sender;
+ TObject)     procedure ToolButton3Click(Sender;
+ TObject)     procedure Open1Click(Sender;
+ TObject)     procedure OpeninNewWindow1Click(Sender;
+ TObject)     procedure PopupMenu1Popup(Sender;
+ TObject)     procedure RecoveryWizard1Click(Sender;
+ TObject Item1, Item2: TListItem; Data: int    ; { Compare: int    );     procedure ViewCompare(Sender;
+ TObject Column: TListColumn);     procedure ViewColumnClick(Sender;
+ TObject var Key: Word;Shift: TShiftState);     procedure ViewKeyUp(Sender;
+
+ TObject)     procedure FormShow(Sender;
+    procedure OneDirUp;
+  public
+ Cardinal     CurClust;
+ TFAT32     FAT32;
+string     PartName;
+ TList     BackHistory;
+ TList     NextHistory;
+   } 
+
+var
+ TFAT32BrowseForm   FAT32BrowseForm;
+ int       ColumnToSortFound        ;
+ boolean   reverseorder             ;
+
+implementation
+
+uses FAT32FileProps, DiskEdit, FAT32Search;
+
+/*$R *.dfm*/
+
+ TObject) procedure TFAT32BrowseForm.FormCreate(Sender;
+  
+BackHistory =  TList.Create;
+NextHistory =  TList.Create;
+ColumnToSortFound =  2;
+reverseorder=  false;
+ } 
+
+ TObject) procedure TFAT32BrowseForm.Exit1Click(Sender;
+ { 
+Close;
+ } 
+
+ Cardinal) procedure TFAT32BrowseForm.ReadDirectory(Clust;
+ TMemoryStream { M;
+ pFAT32DirEntry   DirEnt;
+ TListItem   Item;
+ string   FileName;
+ string   stype   ;
+ int       lastsort;
+ { 
+  View.SortType= stNone;
+  View.Clear;
+  Status.Panels[0].Text =  "Searching, please wait...";
+  if(Clust == 0   )  { 
+    if(FAT32.FatType == ftFAT32   )  { 
+      if(FAT32.BootSec.RootDirStartClust==0   )
+        FAT32.BootSec.RootDirStartClust= FAT32.FATStartSec;
+      CurClust =  FAT32.BootSec.RootDirStartClust;
+      M =  FAT32.ReadClusterChain(CurClust);
+    }   else  { 
+      CurClust =  0;
+      M =  TMemoryStream.Create;
+      M.SetSize((FAT32.BootSec16.MaxRootEntries * 32));
+      FAT32.Disk.Position =  Int64(FAT32.BootSec16.HiddenSectors + FAT32.BootSec16.ReservedSectors + FAT32.BootSec16.NumOfFatCopies * FAT32.BootSec16.SectorsPerFatOld) * 512;
+      M.CopyFrom(FAT32.Disk,(FAT32.BootSec16.MaxRootEntries * 32));
+      M.Position =  0;
+      //M := DiskReadStream(
+      //FAT32.PartInfo.DiskID,
+      //FAT32.BootSec.HiddenSectors + FAT32.BootSec.ReservedSectors + FAT32.BootSec.NumOfFatCopies * FAT32.BootSec.SectorsPerFatOld,
+      //(FAT32.BootSec.MaxRootEntries * 32) div 512
+      //);
+     } 
+  }   else  { 
+     CurClust =  Clust;
+     M =  FAT32.ReadClusterChain(CurClust);
+   } 
+
+  do{
+    GetMem(DirEnt,SizeOf(TFAT32DirEntry{));
+    M.ReadBuffer(*DirEnt,SizeOf(TFAT32DirEntry{));
+    if(Byte(DirEnt.Attributes) == $0F   ) FileName =  FAT32LongFilename(*DirEnt,M)
+                                    else FileName =  FAT32ShortFilename(*DirEnt);
+    if((DirEnt.FileName[0] in [#0])   )  { 
+      FreeMem(DirEnt);
+      if((FAT32.FatType == ftFAT16) &&  (CurClust == 0)
+      then Break else Continue;
+     } 
+
+    if(FileName!="."   )
+     { 
+      Item =  View.Items.Add;
+      Item.Data =  DirEnt;
+      Item.Caption =  FileName;
+      if(DirEnt.FileName[0] == #229   )  { 
+        if(aDirectory in DirEnt.Attributes   )  { 
+          stype= "dir, deleted";
+          Item.ImageIndex =  3;
+        }   else  { 
+          stype= "file, deleted";
+          Item.ImageIndex =  2;
+         } 
+      }   else  { 
+        if(aDirectory in DirEnt.Attributes   )  { 
+          stype= "dir";
+          Item.ImageIndex =  0;
+        }   else  { 
+          stype= "file";
+          Item.ImageIndex =  1;
+         } 
+       } 
+      //if(directory entry{ is file, show it"s size
+      if(!   (aDirectory in DirEnt.Attributes)
+      then Item.SubItems.Add(IntToStr(DirEnt.Size))
+      else Item.SubItems.Add("0");
+      Item.SubItems.Add(stype);
+     } 
+  }while( M.Size - M.Position <== 32);
+
+ M.Free;
+ Status.Panels[0].Text =  IntToStr(View.Items.Count) + " items.";
+ View.SortType= stText;
+ View.ShowColumnHeaders= true;
+ lastsort= ColumnToSortFound;
+ if(lastsort!=0   )  { 
+  ColumnToSortFound= 0;
+  View.AlphaSort;
+  } 
+ ColumnToSortFound= lastsort;
+ View.AlphaSort;
+ View.SetFocus;
+ } 
+
+ TObject) procedure TFAT32BrowseForm.ViewDblClick(Sender;
+ TFAT32DirEntry{ { DirEnt;
+  
+ if(View.ItemIndex > -1   )
+  { 
+   //if aDirectory in DirEnt.Attributes then
+   if(View.Selected.ImageIndex == 0   )
+    { 
+     if(View.Selected.Caption==".."   )
+       OneDirUp
+     else  { 
+       if(length(Edit1.Text)>==3   )
+         Edit1.Text =  Edit1.Text+View.Selected.Caption+"\";
+
+       BackHistory.Add(Pointer(CurClust));
+       DirEnt =  TFAT32DirEntry{(View.Selected.*Data);
+       ReadDirectory(FAT32File { Clust(DirEnt));
+
+       //Edit1.Text= ; //NTFS.GetReferencedDir(CurMFT, "");
+       Application.ProcessMessages;
+       View.Items[0].Selected= TRUE;
+      } 
+   }   else
+     Info1Click(Sender);
+  } 
+ } 
+
+ TObject) procedure TFAT32BrowseForm.Info1Click(Sender;
+ { 
+with TFAT32FilePropsForm.Create(Application) do
+  { 
+ FAT32 =  Self.FAT32;
+ DirEnt =  TFAT32DirEntry{(View.Selected.*Data);
+ Caption =  View.Selected.Caption;
+ Show;
+  } 
+ } 
+
+ TObject) procedure TFAT32BrowseForm.ViewinDiskEditor1Click(Sender;
+{
+ Cardinal Clust;
+  
+Clust =  FAT32File { Clust(TFAT32DirEntry{(View.Selected.*Data));
+with TDiskEditor.Create(Application) do
+  { 
+ Partition =  True;
+ Disk =  FAT32.PartInfo.Disk;
+ MinSec =  FAT32.PartInfo.StartSec;
+ MaxSec =  FAT32.PartInfo.StartSec + FAT32.PartInfo.SizeSec;
+ CurSec =  FAT32.DataStartSec + (Clust * FAT32.BootSec.SecPerClust) -
+           (2 * FAT32.BootSec.SecPerClust);
+ BytesPerSector =  FAT32.BootSec.BytesPerSec;
+ BytesPerCluster =  Fat32.BootSec.SecPerClust*FAT32.BootSec.BytesPerSec;
+ UpdateSec;
+  } 
+ } 
+
+ TObject) procedure TFAT32BrowseForm.ViewFATentry{inDiskEditor1Click(Sender;
+{
+ Cardinal FATSec;
+ Word FATOffset;
+ Cardinal Clust;
+  
+Clust =  FAT32File { Clust(TFAT32DirEntry{(View.Selected.*Data));
+if(FAT32.FatType == ftFAT32   )
+  { 
+ FATSec =  Clust  /  128;
+ FATOffset =  (Clust  %  128) * 4;
+ }  
+else
+  { 
+ FATSec =  Clust  /  256;
+ FATOffset =  (Clust  %  256) * 2;
+  } 
+with TDiskEditor.Create(Application) do
+  { 
+ Partition =  True;
+ Disk =  FAT32.PartInfo.Disk;
+ MinSec =  FAT32.PartInfo.StartSec;
+ MaxSec =  FAT32.PartInfo.StartSec + FAT32.PartInfo.SizeSec;
+ CurSec =  FAT32.FATStartSec + FATSec;
+ BytesPerSector =  FAT32.BootSec.BytesPerSec;
+ BytesPerCluster =  Fat32.BootSec.SecPerClust*FAT32.BootSec.BytesPerSec;
+ UpdateSec;
+ Editor.SelStart =  FATOffset;
+ Editor.SelEnd =  FATOffset + 3;
+  } 
+ } 
+
+ TObject) procedure TFAT32BrowseForm.SaveAs1Click(Sender;
+ TFAT32DirEntry{ { DirEnt;
+ TMemoryStream     M;
+int         i;
+  
+  SaveDlg.FileName =  "[ignored]";// View.Selected.Caption;
+  if(SaveDlg.Execute   )
+   { 
+    for( i= 0; i<=View.Items.Count-1; i++)
+     { 
+      if(View.Items[i].Selected   )
+       { 
+        DirEnt =  TFAT32DirEntry{(View.Items[i].*Data);
+        M =  FAT32.ReadFile(DirEnt);
+        M.SaveToFile(ExtractFilePath(SaveDlg.FileName)+View.Items[i].Caption);
+        M.Free;
+       } 
+     } 
+   } 
+  SaveDlg.FileName =  "";
+ } 
+
+ TObject) procedure TFAT32BrowseForm.ToolButton1Click(Sender;
+{
+ Cardinal Clust;
+  
+if(BackHistory.Count > 0   )
+  { 
+ Clust =  Cardinal(BackHistory[BackHistory.Count - 1]);
+ BackHistory.Delete(BackHistory.Count - 1);
+ NextHistory.Add(Pointer(CurClust));
+ ReadDirectory(Clust);
+ }  
+else
+Beep;
+ } 
+
+ TObject) procedure TFAT32BrowseForm.ToolButton2Click(Sender;
+{
+ Cardinal Clust;
+  
+if(NextHistory.Count > 0   )
+  { 
+ Clust =  Cardinal(NextHistory[NextHistory.Count - 1]);
+ NextHistory.Delete(NextHistory.Count - 1);
+ BackHistory.Add(Pointer(CurClust));
+ ReadDirectory(Clust);
+ }  
+else
+Beep;
+ } 
+
+procedure TFAT32BrowseForm.OneDirUp;
+int     { i;
+ TListItem     Item;
+ TFAT32DirEntry     DirEnt;
+string     lastone;
+ { 
+  i= Length(edit1.Text)-1;
+  while( (edit1.text[i]!="\") and (i>3)) Dec(i);
+  lastone= copy(edit1.Text,i+1,Length(edit1.Text)-i-1);
+  edit1.Text= copy(edit1.Text,1,i);
+
+  Item =  View.FindCaption(0,"..",false,true,false);
+  if(Item != NULL   )
+   { 
+    DirEnt =  TFAT32DirEntry{(Item.*Data);
+    BackHistory.Add(Pointer(CurClust));
+    ReadDirectory(FAT32File { Clust(DirEnt));
+  }   else
+    Beep;
+
+  Application.ProcessMessages;
+  for( i= 0; i<=View.Items.Count-1; i++)
+   { 
+    if(View.Items[i].Caption==lastone   )
+     { 
+      View.Selected= NULL;
+      Application.ProcessMessages;
+      View.Items[i].Selected= TRUE;
+      View.Items[i].Focused= TRUE;
+      View.Items[i].MakeVisible(false);
+      break;
+     } 
+   } 
+ } 
+
+
+ TObject) procedure TFAT32BrowseForm.ToolButton3Click(Sender;
+ { 
+  OneDirUp;
+ } 
+
+ TObject) procedure TFAT32BrowseForm.Open1Click(Sender;
+{
+ TFAT32DirEntry DirEnt;
+ { 
+BackHistory.Add(Pointer(CurClust));
+DirEnt =  TFAT32DirEntry{(View.Selected.*Data);
+ReadDirectory(FAT32File { Clust(DirEnt));
+ } 
+
+ TObject) procedure TFAT32BrowseForm.OpeninNewWindow1Click(Sender;
+ TFAT32DirEntry{ { DirEnt;
+string     sname;
+  
+DirEnt =  TFAT32DirEntry{(View.Selected.*Data);
+sname= Edit1.Text+View.Selected.Caption+"\";
+with TFAT32BrowseForm.Create(Application) do
+  { 
+  FAT32 =  TFAT32.Create(Self.FAT32.PartInfo);
+  Show;
+  edit1.text= sname;
+  ReadDirectory(FAT32File { Clust(DirEnt));
+   } 
+ } 
+
+ TObject) procedure TFAT32BrowseForm.PopupMenu1Popup(Sender;
+{
+ int     I;
+  
+if(View.ItemIndex == -1   )
+for( I =  0; i <=PopupMenu1.Items.Count - 1; i ++)
+  { 
+ PopupMenu1.Items[I].Visible =  True;
+ PopupMenu1.Items[I].Enabled =  False;
+ }  
+else
+  { 
+ for( I =  0; i <=PopupMenu1.Items.Count - 1; i ++)
+ PopupMenu1.Items[I].Enabled =  True;
+ Open1.Visible            =  View.Selected.ImageIndex == 0;
+ OpeninNewWindow1.Visible =  View.Selected.ImageIndex == 0;
+ Info1.Visible                    =  True;
+ ViewinDiskEditor1.Visible        =  True;
+ ViewFATentry{inDiskEditor1.Visible=  true;
+ SaveAs1.Visible          =  true; //View.Selected.ImageIndex = 1;
+ RecoveryWizard1.Visible  =  View.Selected.ImageIndex == 2;
+  } 
+ } 
+
+ TObject) procedure TFAT32BrowseForm.RecoveryWizard1Click(Sender;
+ TFAT32DirEntry{ { DirEnt;
+  
+DirEnt =  TFAT32DirEntry{(View.Selected.*Data);
+
+with TFAT32SearchForm.Create(Application) do
+  { 
+ FAT32 =  TFAT32.Create(Self.FAT32.PartInfo);
+ Show;
+  } 
+ } 
+
+string s2: string): int    ; function CompareNumbers(s1;
+ Int64 { n1, n2 ;
+  
+	result= 0;
+	n1= StrToInt64(s1); n2= StrToInt64(s2);
+	if(n1<n2   ) result= 1
+	else if(n1>n2   ) result= -1;
+ } 
+
+ TObject procedure TFAT32BrowseForm.ViewColumnClick(Sender;
+ TListColumn)   Column;
+ { 
+   if(Status.Panels[0].Text == "Searching, please wait..."   ) exit;
+
+   if((ColumnToSortFound==Column.Index)   )
+	   reverseorder=  !   reverseorder;
+
+   ColumnToSortFound =  Column.Index;
+   (Sender as TCustomListView).AlphaSort;
+ } 
+
+ TObject Item1, procedure TFAT32BrowseForm.ViewCompare(Sender;
+ TListItem Data: int    ; { Compare: int    );   Item2;
+ int     var ix   ;
+  
+   if(Status.Panels[0].Text == "Searching, please wait..."   ) exit;
+
+   ix =  ColumnToSortFound - 1;
+   if((ColumnToSortFound == 0)   )
+	 if(!   reverseorder   )
+	   Compare =  CompareText(Item1.Caption,Item2.Caption)
+	 else
+	   Compare =  -CompareText(Item1.Caption,Item2.Caption)
+   else
+  		if(!   reverseorder   )
+	  	  Compare =  CompareText(Item1.SubItems[ix],Item2.SubItems[ix])
+		  else
+		    Compare =  -CompareText(Item1.SubItems[ix],Item2.SubItems[ix])
+ } 
+
+
+ TObject { Key: Word; procedure TFAT32BrowseForm.ViewKeyUp(Sender;
+ TShiftState)   Shift;
+  
+	if((Key==VK_RETURN)   )
+		ViewDblClick(Sender);
+  if(key==VK_Back   )
+    ToolButton3Click(sender);
+ } 
+
+ TObject procedure TFAT32BrowseForm.FormClose(Sender;
+ TCloseAction)   { Action;
+  
+  fat32.Disk.CloseVolume;
+  fat32.Free;
+ } 
+
+ TObject) procedure TFAT32BrowseForm.FormShow(Sender;
+ { 
+  edit1.Text= copy(PartName,1,2)+"\";
+ } 
+
+ } 

FAT32_with_arrows.cpp

+/********************************************************************************
+Application-level (read only) FAT32 filesytem driver v0.1
+            by Miika Sivola (smiika@mbnet.fi)
+
+references
+http://home.freeuk.net/foxy2k/disk/disk5.htm
+********************************************************************************/
+unit FAT32;
+
+interface
+
+uses Classes,Disks,SysUtils,Windows,Main;
+
+type
+
+  TFAT32BootRecord == packed record
+rray [0->.2] of Byte[2]     BootCode;
+rray [0->.7] of Cha[7]r     OemName;
+ Word     BytesPerSec;
+ Byte     SecPerClust;
+ Word     ReservedSectors;
+ Byte     NumOfFatCopies;
+ Word     MaxRootEntries;
+ Word     SectorsOld;
+ Byte     MediaDescriptor;
+ Word     SectorsPerFatOld;
+ Word     SectorsPerTrack;
+ Word     NumOfHeads;
+ Cardinal     HiddenSectors;
+ Cardinal     SectorsSize;
+
+ Cardinal     SectorsPerFat;
+ Word     Flags;
+ Word     Version;
+ Cardinal     RootDirStartClust;
+ Word     FileSystemInfoSec;
+ Word     BackupSec;
+rray [0->.11] of Byte[11]     Reserved;
+ Word     DriveNumber;
+ Byte     ExtraSignature;
+ Cardinal     SerialNumber;
+rray [0->.10] of Char  [10]   VolumeName;
+rray [0->.7] of Cha[7]r     FATName;
+
+rray [0->.419] of [419]Byte     Code;
+ Word     BootSignature;
+     } 
+
+  TFAT16BootRecord == packed record
+rray [0->.2] of Byte[2]     BootCode;
+rray [0->.7] of Cha[7]r     OemName;
+ Word     BytesPerSec;
+ Byte     SecPerClust;
+ Word     ReservedSectors;
+ Byte     NumOfFatCopies;
+ Word     MaxRootEntries;
+ Word     SectorsOld;
+ Byte     MediaDescriptor;
+ Word     SectorsPerFatOld;
+ Word     SectorsPerTrack;
+ Word     NumOfHeads;
+ Cardinal     HiddenSectors;
+ Cardinal     SectorsSize;
+
+ Word     LogicalDriveNumberofPartition;
+ Byte     ExtendedSignature;
+ Cardinal     SerialNumber;
+rray [0->.10] of Char  [10]   VolumeName;
+rray [0->.7] of Cha[7]r     FATName;
+
+rray [0->.447] of [447]Byte     Code;
+ Word     BootSignature;
+     } 
+
+  TFAT32FileSystemInfo == packed record
+ Cardinal     Signature;
+rray [0->.479] of Byt[479]e     Unknown;
+ Cardinal     FSInfoSignature;
+ int         FreeClusters;
+ Cardinal     RecentlyAllocatedClust;
+rray [0->.13] of Byte[13]     Reserved;
+ Word     BootSignature;
+     } 
+
+  TFAT32Attributes == set of (aReadOnly,aHidden,aSystem,a     ,aDirectory,aArchive,aReserved1,aReserved2):
+
+  TFAT32DirEntry{ == packed record
+rray [0->.7] of Char[7]     FileName;
+rray [0->.2] of Cha[2]r     FileExt;
+ TFAT32Attributes     Attributes;
+ Byte     NT;
+ Byte     TenthOfCrtSec;
+ Word     TimeCreated;
+ Word     DateCreated;
+ Word     DateAccessed;
+ Word     StartClustHigh;
+ Word     Time;
+ Word     Date;
+ Word     StartClust;
+ Cardinal     Size;
+     } 
+
+  pFAT32DirEntry{ ==* TFAT32DirEntry;
+
+  TFAT32DirEntry{LFN == packed record
+ Byte     Part;
+rray [0->.4] of WideC[4]har     Name1;
+ Byte     Attributes;
+ Byte     Reserved;
+ Byte     Checksum;
+rray [0->.5] of WideC[5]har     Name2;
+ Word     Reserved2;
+rray [0->.1] of WideC[1]har     Name3;
+     } 
+
+  TFAT32 == class
+ TPartInfo)     constructor Create(APartInfo;
+    destructor Destroy; override;
+ Cardinal): TMemoryStream     function ReadCluster(Number;
+ Cardinal): Cardinal     function NextCluster(CurrClust;
+ Cardinal MaxSize: Cardinal == $FFFFFFFF): TMemoryStream;     function ReadClusterChain(StartClust;
+ TFAT32DirEntry{): TMemoryStream     function ReadFile(DirEnt;
+  public
+string     PartName;
+ TDisk     Disk;
+ TPartInfo     PartInfo;
+ TFAT32BootRecord     BootSec;
+ TFAT16BootRecord     BootSec16;
+ TFAT32FileSystemInfo     InfoSec;
+ Cardinal//begin of file allocation table     FATStartSec;
+ Cardinal//begin of data area     DataStartSec;
+ (ftFAT12,ftFAT16,ftFAT32)     FatType;
+   } 
+
+//helper functions
+ Word): string function FAT32DateToStr(Date;
+ Word): string function FAT32TimeToStr(Time;
+ TFAT32Attributes): string function FAT32AttribsToStr(Attribs;
+ TFAT32DirEntry{): string function FAT32ShortFilename(DirEnt;
+ TFAT32DirEntry{ Stream: TMemoryStream): string; function FAT32LongFilename({ DirEnt;
+ TFAT32DirEntry): Cardinal function FAT32File { Clust(DirEnt;
+
+implementation
+
+ Word): string function FAT32DateToStr(Date;
+ { 
+Result =  IntToStr(1980 + (Date shr 9));//Year
+Result =  Result + Format("/%.2d",[(Date shr 5) and $F]);//Month
+Result =  Result + Format("/%.2d",[(Date and $1F)]);//Day of month
+ } 
+
+ Word): string function FAT32TimeToStr(Time;
+ { 
+Result =  Format(":%.2d",[Time and $1F]);//seconds
+Result =  Format(":%.2d",[(Time shr 5) and $3F]) + Result;//minutes
+Result =  Format("%.2d",[Time shr 11]) + Result;//hours
+ } 
+
+ string): string function TrimEndSpaces(S;
+ { 
+while( (Length(S) > 0) &&  (S[Length(S)] == " ") do
+Delete(S,Length(S),1);
+Result =  S;
+ } 
+
+ TFAT32DirEntry{): string function FAT32ShortFilename(DirEnt;
+{
+ string Name,Ext;
+  
+Name =  TrimEndSpaces(DirEnt->FileName);
+Ext =  TrimEndSpaces(DirEnt->FileExt);
+if(Ext != "" then
+Result =  Name + "." + Ext
+else
+Result =  Name;
+if((Length(Result) > 1)   ) if Result[1] == #229 then Result[1] =  "x";
+ } 
+
+ TFAT32DirEntry{ Stream: TMemoryStream): string; function FAT32LongFilename({ DirEnt;
+var
+ TFAT32DirEntryLFN LFNEnt;
+ { 
+Move(DirEnt,LFNEnt,32);
+Result =  "" + LFNEnt.Name1 + LFNEnt.Name2 + LFNEnt->Name3;
+Stream->ReadBuffer(LFNEnt,32);
+while( LFNEnt->Attributes == $0F)
+  { 
+ Result =  "" + LFNEnt.Name1 + LFNEnt.Name2 + LFNEnt->Name3 + Result;
+ Stream->ReadBuffer(LFNEnt,32);
+  } 
+Move(LFNEnt,DirEnt,32);
+while( ((Length(Result) > 0) &&  (Result[Length(Result)] == #$3F)))
+Delete(Result,Length(Result),2);
+ } 
+
+ TFAT32DirEntry{): Cardinal function FAT32File { Clust(DirEnt;
+ { 
+Result =  DirEnt->StartClust || (DirEnt->StartClustHigh shl 16);
+ } 
+
+ TFAT32Attributes): string function FAT32AttribsToStr(Attribs;
+ { 
+if(aReadOnly in Attribs   )
+Result =  "read only, ";
+if(aHidden in Attribs   )
+Result =  Result + "hidden, ";
+if(aSystem in Attribs   )
+Result =  Result + "system, ";
+if(a      in Attribs   )
+Result =  Result + "volume label, ";
+if(aDirectory in Attribs   )
+Result =  Result + "directory, ";
+if(aArchive in Attribs   )
+Result =  Result + "archive, ";
+Delete(Result,Length(Result)-1,2);
+ } 
+
+/* TFAT32 */
+
+ TPartInfo) constructor TFAT32->Create(aPartInfo;
+int     { i;
+DWORD     FATTotSec;
+LONGINT     FATDataSec;
+longint     FATSz;
+DWORD     FATRootDirSectors;
+ DWORD     FATCountofClusters;
+  
+  PartInfo =  APartInfo;
+  Disk =  PartInfo->Disk;
+  if(Disk->handle==INVALID_HANDLE_VALUE   )
+   { 
+   if(Disk->Physical   )
+     Disk->OpenVolumePhysical
+   else
+     Disk->OpenVolumeByLetter(aPartInfo->sLetter);
+   } 
+
+  Disk->Position =  PartInfo->StartSec * Int64(512);
+  Disk->Read(BootSec,512);
+  Disk->Position =  (PartInfo->StartSec + Int64(BootSec->FileSystemInfoSec)) * Int64(512);
+  Disk->Read(InfoSec,512);
+  if(BootSec->FATName == "FAT32   " then
+    FatType =  ftFAT32
+  else
+    FatType =  ftFAT16;
+
+
+  (*
+  Disk->Position =  PartInfo->StartSec * Int64(512);
+  Disk->Read(BootSec16,512);
+  FATRootDirSectors =  Trunc(((BootSec->MaxRootEntries  * 32) + (BootSec->BytesPerSec - 1)) / BootSec->BytesPerSec);
+  if((BootSec->SectorsOld != 0)   ) FATSz =  BootSec->SectorsPerFatOld // BPB_FATSz16
+/***                              else FATSz =  BootSec->SectorsPerFat; // BPB_FATSz32;
+  if (BootSec.SectorsOld <> 0) then FATTotSec := BootSec.SectorsOld
+                               else FATTotSec := BootSec.SectorsSize;
+
+  FATDataSec := integer(FATTotSec) -
+               (BootSec.ReservedSectors +
+               (BootSec.NumOfFatCopies * FATSz) + integer(FATRootDirSectors));
+
+  //Now we determine the count of clusters:
+  FATCountofClusters := Trunc(FATDataSec / BootSec.SecPerClust);
+
+  {
+  Please note that this computation rounds down.
+  Now we can determine the FAT type. Please note carefully or you will commit an off-by-one error!
+  In the following example, when it says <, it does not mean <=. Note also that the numbers are correct.
+  The first number for( FAT12 is 4085; the second number for FAT16 is 65525. These numbers and the
+  }
+
+  if (FATCountofClusters < 4085) then
+      FatType := ftFAT12  // Volume is FAT12
+  else if(FATCountofClusters < 65525) then
+      FatType := ftFAT16  // Volume is FAT16
+  
+else
+      FatType =  ftFAT32; // Volume is FAT32
+
+	if((FatType == ftFAT32) &&  (BootSec->Version!=0)   )
+      ;
+      //name= name+""
+      //BootSec->Version
+      //sprintf(cFSVersion, "%d->%d", HIBYTE(gBOOTSECFAT->Fat32->BPB_FSVer), LOBYTE(gBOOTSECFAT->Fat32->BPB_FSVer));
+  //if BootSec.SectorsPerFat>PartInfo.SizeSec then
+  *)
+
+
+
+  if(FatType == ftFAT32   )
+   { 
+    FATStartSec =  PartInfo->StartSec + BootSec->ReservedSectors;
+    DataStartSec =  PartInfo->StartSec + BootSec->ReservedSectors +
+                  (BootSec->NumOfFatCopies * BootSec->SectorsPerFat);
+    //FATStartSec := BootSec.HiddenSectors + BootSec.ReservedSectors;
+    //DataStartSec := BootSec.HiddenSectors + BootSec.ReservedSectors + (BootSec.NumOfFatCopies * BootSec.SectorsPerFat);
+  }   else  { 
+    FATStartSec =  PartInfo->StartSec + BootSec->ReservedSectors;
+    DataStartSec =  PartInfo->StartSec + BootSec->ReservedSectors + (BootSec->NumOfFatCopies * BootSec->SectorsPerFatOld) + (BootSec->MaxRootEntries * 32  /  512);
+
+    Disk->Position =  PartInfo->StartSec * Int64(512);
+    Disk->Read(BootSec16,512);
+    BootSec->SerialNumber= BootSec16->SerialNumber;
+    for( i= 0; i<=sizeof(BootSec->VolumeName)-1; i++)
+     BootSec->VolumeName[i]= BootSec16->VolumeName[i];
+
+    for( i= 0; i<=sizeof(BootSec->FATName)-1; i++)
+     BootSec->FATName[i]= BootSec16->FATName[i];
+
+    //BootSec.VolumeName:=BootSec16.VolumeName;
+    //BootSec.FATName:=BootSec16.FATName;
+
+    //FATStartSec := BootSec.HiddenSectors + BootSec.ReservedSectors;
+    //DataStartSec := BootSec.HiddenSectors + BootSec.ReservedSectors + (BootSec.NumOfFatCopies * BootSec.SectorsPerFatOld) + (BootSec.MaxRootEntries * 32 div 512);
+   } 
+ } 
+
+destructor TFAT32->Destroy;
+ { 
+inherited Destroy;
+ } 
+
+ Cardinal): Cardinal function TFAT32->NextCluster(CurrClust;
+{
+ Cardinal Sector;
+ Cardinal Offset;
+rray [0->.511[511]] of Byte Buf;
+  
+if(FatType == ftFat32   )
+  { 
+ Sector =  CurrClust  /  128;
+ Offset =  (CurrClust  %  128) * 4;
+ Disk->Position =  Int64(FATStartSec + Sector) * Int64(512);
+ Disk->Read(Buf,512);
+ //DiskRead(PartInfo.DiskID,FATStartSec + Sector,1,@Buf);
+ Move(Buf[Offset],Result,4);
+ }  
+else
+  { 
+ Sector =  CurrClust  /  256;
+ Offset =  (CurrClust  %  256) * 2;
+ Disk->Position =  Int64(FATStartSec + Sector) * Int64(512);
+ Disk->Read(Buf,512);
+ //DiskRead(PartInfo.DiskID,FATStartSec + Sector,1,@Buf);
+ Move(Buf[Offset],Result,2);
+  } 
+ } 
+
+ Cardinal): TMemoryStream function TFAT32->ReadCluster(Number;
+ { 
+Result =  TMemoryStream->Create;
+Result->SetSize(Int64(BootSec->SecPerClust) * 512);
+Disk->Position =  Int64(DataStartSec + (Number * BootSec->SecPerClust) - (2 * BootSec->SecPerClust)) * 512;
+Result->CopyFrom(Disk,Int64(BootSec->SecPerClust) * 512);
+Result->Position =  0;
+//Result := DiskReadStream(PartInfo.DiskID,DataStartSec + (Number * BootSec.SecPerClust) - (2 * BootSec.SecPerClust),BootSec.SecPerClust);
+ } 
+
+ Cardinal MaxSize: Cardinal == $FFFFFFFF): TMemoryStream; function TFAT32->ReadClusterChain(StartClust;
+{
+ Cardinal CurClust;
+ TMemoryStream Clust;
+  
+Result =  TMemoryStream->Create;
+CurClust =  StartClust;
+if(FatType == ftFAT32   )
+ do{
+ if((CurClust>1000000)   )
+  { 
+  CurClust= CurClust;
+  } 
+ Clust =  ReadCluster(CurClust);
+ Result->Write(Clust->*Memory,Clust->Size);
+ Clust->Free;
+ CurClust =  NextCluster(CurClust);
+ }while( (CurClust >== $0FFFFFF8) || (CurClust < 2) || (Result->Size >== MaxSize)
+else
+ do{
+ Clust =  ReadCluster(CurClust);
+ Result->Write(Clust->*Memory,Clust->Size);
+ Clust->Free;
+ CurClust =  NextCluster(CurClust);
+ }while( (CurClust >== $FFF8) || (CurClust < 2) || (Result->Size >== MaxSize));
+Result->Position =  0;