Difference between revisions of "Unit VirtualDisk"

From Ultibo.org
Jump to: navigation, search
Line 1,057: Line 1,057:
  
  
'''Virtual disk controller'''
+
'''Virtual disk specific classes
  
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
<code>TVirtualDiskController = class(TDiskController)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver);</code>
+
| [[TVirtualDiskController|<code>TVirtualDiskController = class(TDiskController)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function ControllerInit:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LocateDevices:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function Read(ADevice:TDiskDevice; ASector:LongWord; ACount:Word; var ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Write(ADevice:TDiskDevice; ASector:LongWord; ACount:Word; const ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function Reset(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LockMedia(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function UnlockMedia(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function EjectMedia(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function MediaReady(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function MediaChanged(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function MediaLocked(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function Information(ADevice:TDiskDevice):String; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LBA(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function MediaType(ADevice:TDiskDevice):TMediaType; override;</code>
+
| &nbsp;
+
|-
+
| <code>function FloppyType(ADevice:TDiskDevice):TFloppyType; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Ready(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Locked(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Lockable(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Readable(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Writeable(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Removable(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ChangeLine(ADevice:TDiskDevice):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function PhysicalCylinders(ADevice:TDiskDevice):LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function PhysicalHeads(ADevice:TDiskDevice):LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function PhysicalSectors(ADevice:TDiskDevice):LongWord; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LogicalCylinders(ADevice:TDiskDevice):LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function LogicalHeads(ADevice:TDiskDevice):LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function LogicalSectors(ADevice:TDiskDevice):LongWord; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SectorSize(ADevice:TDiskDevice):Word; override;</code>
+
| &nbsp;
+
|-
+
| <code>function SectorCount(ADevice:TDiskDevice):Int64; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk device'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskDevice = class(TDiskDevice)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
| [[TVirtualDiskDevice|<code>TVirtualDiskDevice = class(TDiskDevice)</code>]]
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function DeviceInit:Boolean; override;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LocatePartitions:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function LocateVolumes:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreatePartition(AParent:TDiskPartition; APartitionId:Byte; ACount:LongWord; AActive:Boolean):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DeletePartition(APartition:TDiskPartition):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ModifyPartition(APartition:TDiskPartition; APartitionId:Byte):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ActivatePartition(APartition:TDiskPartition; AActive:Boolean):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ShrinkPartition(APartition:TDiskPartition; const AStart,ASize:Int64):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ExpandPartition(APartition:TDiskPartition; const AStart,ASize:Int64):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk partition'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskPartition = class(TDiskPartition)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
| [[TVirtualDiskPartition|<code>TVirtualDiskPartition = class(TDiskPartition)</code>]]
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function PartitionInit:Boolean; override;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LocatePartitions:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function LocateVolumes:Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk image'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskImage = class(TDiskImage)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver; AController:TDiskController; const AName:String; AImageNo:Integer);</code>
+
| [[TVirtualDiskImage|<code>TVirtualDiskImage = class(TDiskImage)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>FFlags:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FExtents:TFileSysList;</code>
+
| List of Virtual Disk Extents
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FBase:TVirtualDiskExtent;</code>
+
| The first extent of the image
+
|-
+
| <code>FCurrent:TVirtualDiskExtent;</code>
+
| The current delta extent if applicable
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetCylinders:LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetHeads:LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectors:LongWord; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ReadExtent(AExtent:TVirtualDiskExtent; ASector:LongWord; ACount:Word; var ABuffer):Word; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function WriteExtent(AExtent:TVirtualDiskExtent; ASector:LongWord; ACount:Word; const ABuffer):Word; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadExtents:Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function CloseExtents:Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CheckExtent(ADelta,AParent:TVirtualDiskExtent; const AFilename:String):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function LoadExtent(ADelta,AParent:TVirtualDiskExtent; const AFilename:String):TVirtualDiskExtent; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AddExtent(AParent:TVirtualDiskExtent; const AFilename:String):TVirtualDiskExtent; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function RemoveExtent(AExtent:TVirtualDiskExtent):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SetExtent(AExtent:TVirtualDiskExtent):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function GetExtent(const ASector:Int64; AWrite,ALock:Boolean):TVirtualDiskExtent; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function FindExtent(const AFilename:String; ALock:Boolean):TVirtualDiskExtent; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadTables:Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadTable(AExtent:TVirtualDiskExtent; ATableNo:LongWord):TVirtualDiskTable; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AddTable(AExtent:TVirtualDiskExtent):TVirtualDiskTable; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function RemoveTable(ATable:TVirtualDiskTable):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SetTable(ATable:TVirtualDiskTable):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function GetTable(AExtent:TVirtualDiskExtent; const ASector:Int64; AWrite:Boolean):TVirtualDiskTable; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadBlocks(ATable:TVirtualDiskTable):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadBlock(ATable:TVirtualDiskTable; ABlockNo:LongWord):TVirtualDiskBlock; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AddBlock(ATable:TVirtualDiskTable):TVirtualDiskBlock; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function RemoveBlock(ABlock:TVirtualDiskBlock):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SetBlock(ABlock:TVirtualDiskBlock):Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function GetBlock(ATable:TVirtualDiskTable; const ASector:Int64; AWrite:Boolean):TVirtualDiskBlock; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LocateDelta(AExtent:TVirtualDiskExtent):String; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function LocateParent(AExtent:TVirtualDiskExtent):String; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function LocateSibling(AExtent:TVirtualDiskExtent):String; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Flags:LongWord read FFlags write FFlags;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Extents:TFileSysList read FExtents;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Base:TVirtualDiskExtent read FBase;</code>
+
| &nbsp;
+
|-
+
| <code>property Current:TVirtualDiskExtent read FCurrent;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function IsSplit:Boolean; virtual;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk memory image'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskMemoryImage = class(TVirtualDiskImage)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver; AController:TDiskController; const AName:String; AImageNo:Integer);</code>
+
| [[TVirtualDiskMemoryImage|<code>TVirtualDiskMemoryImage = class(TVirtualDiskImage)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FData:Pointer;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function GetReady:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetSectorSize:Word; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectorCount:Int64; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetPartitionId:Byte; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>procedure SetName(const AName:String); override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function Read(ASector:LongWord; ACount:Word; var ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Write(ASector:LongWord; ACount:Word; const ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ConvertImage(AImageType:TImageType):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function CreateImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function CloseImage:Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk file image'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskFileImage = class(TVirtualDiskImage)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver; AController:TDiskController; const AName:String; AImageNo:Integer);</code>
+
| [[TVirtualDiskFileImage|<code>TVirtualDiskFileImage = class(TVirtualDiskImage)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FHandle:THandle;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function GetReady:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetSectorSize:Word; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectorCount:Int64; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetPartitionId:Byte; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function Read(ASector:LongWord; ACount:Word; var ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Write(ASector:LongWord; ACount:Word; const ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function OpenImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function CloseImage:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ResizeImage(const ASectorCount:Int64):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk device image'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskDeviceImage = class(TVirtualDiskImage)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
| <code>constructor Create(ADriver:TFileSysDriver; AController:TDiskController; const AName:String; AImageNo:Integer);</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FHandle:THandle;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function GetReady:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetCylinders:LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetHeads:LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectors:LongWord; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetSectorSize:Word; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectorCount:Int64; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetPartitionId:Byte; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function Read(ASector:LongWord; ACount:Word; var ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Write(ASector:LongWord; ACount:Word; const ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ConvertImage(AImageType:TImageType):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ShrinkImage(const ASize:Int64):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ExpandImage(const ASize:Int64):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function OpenImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
 
|-
 
|-
| <code>function CloseImage:Boolean; override;</code>
+
| [[TVirtualDiskDeviceImage|<code>TVirtualDiskDeviceImage = class(TVirtualDiskImage)</code>]]
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk ISO image'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskIsoImage = class(TVirtualDiskImage)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver; AController:TDiskController; const AName:String; AImageNo:Integer);</code>
+
| [[TVirtualDiskIsoImage|<code>TVirtualDiskIsoImage = class(TVirtualDiskImage)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FHandle:THandle;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function GetReady:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetSectorSize:Word; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectorCount:Int64; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function Read(ASector:LongWord; ACount:Word; var ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Write(ASector:LongWord; ACount:Word; const ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ConvertImage(AImageType:TImageType):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function OpenImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function CloseImage:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ResizeImage(const ASectorCount:Int64):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk Bochs image'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskBochsImage = class(TVirtualDiskImage)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver; AController:TDiskController; const AName:String; AImageNo:Integer);</code>
+
| [[TVirtualDiskBochsImage|<code>TVirtualDiskBochsImage = class(TVirtualDiskImage)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function GetReady:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetCylinders:LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetHeads:LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectors:LongWord; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetSectorSize:Word; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectorCount:Int64; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function Read(ASector:LongWord; ACount:Word; var ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Write(ASector:LongWord; ACount:Word; const ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Allocated(ASector:LongWord; ACount:Word):Word; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function OpenImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function CloseImage:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ResizeImage(const ASectorCount:Int64):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk VMware image'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskVmwareImage = class(TVirtualDiskImage)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver; AController:TDiskController; const AName:String; AImageNo:Integer);</code>
+
| [[TVirtualDiskVmwareImage|<code>TVirtualDiskVmwareImage = class(TVirtualDiskImage)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>function GetAttributes:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>FDescriptor:TVirtualDiskExtent;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetReady:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetCylinders:LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetHeads:LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectors:LongWord; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetSectorSize:Word; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectorCount:Int64; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Descriptor:TVirtualDiskExtent read FDescriptor;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ImageInit:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function Read(ASector:LongWord; ACount:Word; var ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Write(ASector:LongWord; ACount:Word; const ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Allocated(ASector:LongWord; ACount:Word):Word; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadDescriptor(const AFilename:String):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AddDescriptor(const AFilename:String):TVirtualDiskVmwareExtent;</code>
+
| &nbsp;
+
|-
+
| <code>function RemoveDescriptor(AExtent:TVirtualDiskVmwareExtent):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SetDescriptor(AExtent:TVirtualDiskVmwareExtent):Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function GetDescriptor:TVirtualDiskVmwareExtent;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function OpenImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function CloseImage:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ResizeImage(const ASectorCount:Int64):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateSnapshot:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DeleteSnapshot:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function MergeSnapshot:Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk VPC image'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskVpcImage = class(TVirtualDiskImage)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver; AController:TDiskController; const AName:String; AImageNo:Integer);</code>
+
| [[TVirtualDiskVpcImage|<code>TVirtualDiskVpcImage = class(TVirtualDiskImage)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>function GetAttributes:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ChecksumFooter(AFooter:PVpcHardDiskFooter):LongWord;</code>
+
| &nbsp;
+
|-
+
| <code>function ChecksumSparse(ASparse:PVpcDynamicDiskHeader):LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function RoundToSector(AValue:LongWord;ASectorSize:Word):LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function GetReady:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetCylinders:LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetHeads:LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectors:LongWord; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetSectorSize:Word; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectorCount:Int64; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ReadExtent(AExtent:TVirtualDiskExtent; ASector:LongWord; ACount:Word; var ABuffer):Word; override;</code>
+
| &nbsp;
+
|-
+
| <code>function WriteExtent(AExtent:TVirtualDiskExtent; ASector:LongWord; ACount:Word; const ABuffer):Word; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadExtents:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CheckExtent(ADelta,AParent:TVirtualDiskExtent; const AFilename:String):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function LoadExtent(ADelta,AParent:TVirtualDiskExtent; const AFilename:String):TVirtualDiskExtent; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AddExtent(AParent:TVirtualDiskExtent; const AFilename:String):TVirtualDiskExtent; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SetExtent(AExtent:TVirtualDiskExtent):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetExtent(const ASector:Int64; AWrite,ALock:Boolean):TVirtualDiskExtent; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadTables:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadTable(AExtent:TVirtualDiskExtent; ATableNo:LongWord):TVirtualDiskTable; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AddTable(AExtent:TVirtualDiskExtent):TVirtualDiskTable; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SetTable(ATable:TVirtualDiskTable):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadBlocks(ATable:TVirtualDiskTable):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadBlock(ATable:TVirtualDiskTable; ABlockNo:LongWord):TVirtualDiskBlock; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AddBlock(ATable:TVirtualDiskTable):TVirtualDiskBlock; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SetBlock(ABlock:TVirtualDiskBlock):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetBlock(ATable:TVirtualDiskTable; const ASector:Int64; AWrite:Boolean):TVirtualDiskBlock; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function TestBlock(ABlock:TVirtualDiskBlock; const ASector:Int64; ACount:LongWord; AUsed:Boolean):LongWord;</code>
+
| &nbsp;
+
|-
+
| <code>function MarkBlock(ABlock:TVirtualDiskBlock; const ASector:Int64; ACount:LongWord; AUsed:Boolean):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function TestBitmap(ABuffer:Pointer; ASize,AStart,ACount:LongWord; AUsed:Boolean):LongWord;</code>
+
| &nbsp;
+
|-
+
| <code>function MarkBitmap(ABuffer:Pointer; ASize,AStart,ACount:LongWord; AUsed:Boolean):Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LocateDelta(AExtent:TVirtualDiskExtent):String; override;</code>
+
| &nbsp;
+
|-
+
| <code>function LocateParent(AExtent:TVirtualDiskExtent):String; override;</code>
+
| &nbsp;
+
|-
+
| <code>function LocateSibling(AExtent:TVirtualDiskExtent):String; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function ImageInit:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function Read(ASector:LongWord; ACount:Word; var ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Write(ASector:LongWord; ACount:Word; const ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Allocated(ASector:LongWord; ACount:Word):Word; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function OpenImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function CloseImage:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ResizeImage(const ASectorCount:Int64):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateSnapshot:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DeleteSnapshot:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function MergeSnapshot:Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk VirtualBox image'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskVboxImage = class(TVirtualDiskImage)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver; AController:TDiskController; const AName:String; AImageNo:Integer);</code>
+
| [[TVirtualDiskVboxImage|<code>TVirtualDiskVboxImage = class(TVirtualDiskImage)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>function GetAttributes:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>function GetReady:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetCylinders:LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetHeads:LongWord; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectors:LongWord; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetSectorSize:Word; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetSectorCount:Int64; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ReadExtent(AExtent:TVirtualDiskExtent; ASector:LongWord; ACount:Word; var ABuffer):Word; override;</code>
+
| &nbsp;
+
|-
+
| <code>function WriteExtent(AExtent:TVirtualDiskExtent; ASector:LongWord; ACount:Word; const ABuffer):Word; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadExtents:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CheckExtent(ADelta,AParent:TVirtualDiskExtent; const AFilename:String):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function LoadExtent(ADelta,AParent:TVirtualDiskExtent; const AFilename:String):TVirtualDiskExtent; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AddExtent(AParent:TVirtualDiskExtent; const AFilename:String):TVirtualDiskExtent; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SetExtent(AExtent:TVirtualDiskExtent):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function GetExtent(const ASector:Int64; AWrite,ALock:Boolean):TVirtualDiskExtent; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadTables:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LoadTable(AExtent:TVirtualDiskExtent; ATableNo:LongWord):TVirtualDiskTable; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AddTable(AExtent:TVirtualDiskExtent):TVirtualDiskTable; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function SetTable(ATable:TVirtualDiskTable):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function LocateDelta(AExtent:TVirtualDiskExtent):String; override;</code>
+
| &nbsp;
+
|-
+
| <code>function LocateParent(AExtent:TVirtualDiskExtent):String; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function ImageInit:Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function Read(ASector:LongWord; ACount:Word; var ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Write(ASector:LongWord; ACount:Word; const ABuffer):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function Allocated(ASector:LongWord; ACount:Word):Word; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function OpenImage(AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function CloseImage:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ResizeImage(const ASectorCount:Int64):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateSnapshot:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DeleteSnapshot:Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function MergeSnapshot:Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual recognizer'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualRecognizer = class(TRecognizer)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver; AController:TDiskController);</code>
+
| [[TVirtualRecognizer|<code>TVirtualRecognizer = class(TRecognizer)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>FController:TDiskController;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetName:String; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function RecognizeImage(AImage:TDiskImage):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function MountImage(AImage:TDiskImage):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function InsertImage(AImage:TDiskImage):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk resizer'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskResizer = class(TDiskResizer)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver; ARecognizer:TRecognizer);</code>
+
| [[TVirtualDiskResizer|<code>TVirtualDiskResizer = class(TDiskResizer)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function AcceptImage(AImage:TDiskImage; const ASize:Int64):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function ShrinkImage(AImage:TDiskImage; const ASize:Int64):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function ExpandImage(AImage:TDiskImage; const ASize:Int64):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk copier'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskCopier = class(TDiskCopier)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver; ARecognizer:TRecognizer);</code>
+
| [[TVirtualDiskCopier|<code>TVirtualDiskCopier = class(TDiskCopier)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function AcceptImage(AImage,ADest:TDiskImage):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CopyImage(AImage,ADest:TDiskImage):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk imager'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskImager = class(TDiskImager)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(ADriver:TFileSysDriver; ARecognizer:TRecognizer; AController:TDiskController);</code>
+
| [[TVirtualDiskImager|<code>TVirtualDiskImager = class(TDiskImager)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>function CreateImageByType(const AName:String; AImageType:TImageType):TDiskImage;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>FController:TDiskController;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function AcceptImage(AImage:TDiskImage; const AName:String; AImageType:TImageType; AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateImage(AImage:TDiskImage; const AName:String; AImageType:TImageType; AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function OpenImage(AImage:TDiskImage; const AName:String; AImageType:TImageType; AMediaType:TMediaType; AFloppyType:TFloppyType; AAttributes:LongWord; ASectorSize:Word; const ASectorCount:Int64; ACylinders,AHeads,ASectors:LongWord; APartitionId:Byte):Integer; override;</code>
+
| &nbsp;
+
|-
+
| <code>function CloseImage(AImage:TDiskImage):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AcceptSnapshot(AImage:TDiskImage):Boolean; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function CreateSnapshot(AImage:TDiskImage):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function DeleteSnapshot(AImage:TDiskImage):Boolean; override;</code>
+
| &nbsp;
+
|-
+
| <code>function MergeSnapshot(AImage:TDiskImage):Boolean; override;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk extent'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskExtent = class(TListObject)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
|colspan="2"|Note: Represents an Extent (usually a file) forming part of a virtual disk
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>constructor Create(AImage:TVirtualDiskImage; ADelta,AParent:TVirtualDiskExtent);</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FLock:TMutexHandle;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>FImage:TVirtualDiskImage;</code>
+
| &nbsp;
+
|-
+
| <code>FDelta:TVirtualDiskExtent;</code>
+
| &nbsp;
+
|-
+
| <code>FParent:TVirtualDiskExtent;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FFlags:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FFilename:String;</code>
+
| Filename of the file backing this Extent
+
|-
+
| <code>FHandle:THandle;</code>
+
| DiskDriver Handle to the file of this Extent
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FDataOffset:Int64;</code>
+
| Absolute byte offset of Data in file (Where Applicable)
+
|-
+
| <code>FBlockSize:LongWord;</code>
+
| Size of each data block in file
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FStartSector:Int64;</code>
+
| First Sector contained by this Extent
+
|-
+
| <code>FSectorCount:Int64;</code>
+
| Number of Sectors contained by this Extent
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FBlockShiftCount:LongWord;</code>
+
| Sector to Block Shift Count
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetFilename:String;</code>
+
| &nbsp;
+
|-
+
| <code>procedure SetFilename(const AFilename:String);</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function GetBlockShiftCount:LongWord; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Image:TVirtualDiskImage read FImage;</code>
+
| &nbsp;
+
|-
+
| <code>property Delta:TVirtualDiskExtent read FDelta write FDelta;</code>
+
| &nbsp;
+
|-
+
| <code>property Parent:TVirtualDiskExtent read FParent write FParent;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Flags:LongWord read FFlags write FFlags;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Filename:String read GetFilename write SetFilename;</code>
+
| &nbsp;
+
|-
+
| <code>property Handle:THandle read FHandle write FHandle;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property DataOffset:Int64 read FDataOffset write FDataOffset;</code>
+
| &nbsp;
+
|-
+
| <code>property BlockSize:LongWord read FBlockSize write FBlockSize;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property StartSector:Int64 read FStartSector write FStartSector;</code>
+
| &nbsp;
+
|-
+
| <code>property SectorCount:Int64 read FSectorCount write FSectorCount;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property BlockShiftCount:LongWord read FBlockShiftCount write FBlockShiftCount;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function AcquireLock:Boolean;</code>
+
| &nbsp;
+
|-
+
| <code>function ReleaseLock:Boolean;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function IsFixed:Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function IsDynamic:Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function IsBase:Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
| <code>function IsDelta:Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function IsDevice:Boolean; virtual;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
 
|-
 
|-
| <code>function HasDelta:Boolean; virtual;</code>
+
| [[TVirtualDiskExtent|<code>TVirtualDiskExtent = class(TListObject)</code>]]
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk VMware extent'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskVmwareExtent = class(TVirtualDiskExtent)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
| [[TVirtualDiskVmwareExtent|<code>TVirtualDiskVmwareExtent = class(TVirtualDiskExtent)</code>]]
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>function IsDescriptor:Boolean;</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>function HasDescriptor:Boolean;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk VPC extent'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskVpcExtent = class(TVirtualDiskExtent)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(AImage:TVirtualDiskImage; ADelta,AParent:TVirtualDiskExtent);</code>
+
| [[TVirtualDiskVpcExtent|<code>TVirtualDiskVpcExtent = class(TVirtualDiskExtent)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FHeader:PVpcHardDiskFooter;</code>
+
| &nbsp;
+
|-
+
| <code>FFooter:PVpcHardDiskFooter;</code>
+
| &nbsp;
+
|-
+
| <code>FSparse:PVpcDynamicDiskHeader;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FHeaderOffset:Int64;</code>
+
| Absolute byte offset of Header in file
+
|-
+
| <code>FHeaderSize:LongWord;</code>
+
| Size of Header in image
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FFooterOffset:Int64;</code>
+
| Absolute byte offset of Footer in file
+
|-
+
| <code>FFooterSize:LongWord;</code>
+
| Size of Footer in image
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FSparseOffset:Int64;</code>
+
| Absolute byte offset of Dynamic Header in file
+
|-
+
| <code>FSparseSize:LongWord;</code>
+
| Size of Dynamic Header in image
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>FTable:TVirtualDiskVpcTable;</code>
+
| VirtualPC images contain only one Table per Extent
+
|-
+
| <code>FGroups:TFileSysList;</code>
+
| Block bitmap Groups
+
|-
+
| <code>FGroupLocal:TMutexHandle;</code>
+
| Local Lock shared by all Block bitmap Groups
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Header:PVpcHardDiskFooter read FHeader;</code>
+
| &nbsp;
+
|-
+
| <code>property Footer:PVpcHardDiskFooter read FFooter;</code>
+
| &nbsp;
+
|-
+
| <code>property Sparse:PVpcDynamicDiskHeader read FSparse;</code>
+
| &nbsp;
+
|-
+
| <code>property Table:TVirtualDiskVpcTable read FTable;</code>
+
| &nbsp;
+
|-
+
| <code>property Groups:TFileSysList read FGroups;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property HeaderOffset:Int64 read FHeaderOffset write FHeaderOffset;</code>
+
| &nbsp;
+
|-
+
| <code>property HeaderSize:LongWord read FHeaderSize write FHeaderSize;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property FooterOffset:Int64 read FFooterOffset write FFooterOffset;</code>
+
| &nbsp;
+
|-
+
| <code>property FooterSize:LongWord read FFooterSize write FFooterSize;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property SparseOffset:Int64 read FSparseOffset write FSparseOffset;</code>
+
| &nbsp;
+
|-
+
| <code>property SparseSize:LongWord read FSparseSize write FSparseSize;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>function HasFooter:Boolean;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
+
'''Virtual disk VirtualBox extent'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskVboxExtent = class(TVirtualDiskExtent)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(AImage:TVirtualDiskImage; ADelta,AParent:TVirtualDiskExtent);</code>
+
| [[TVirtualDiskVboxExtent|<code>TVirtualDiskVboxExtent = class(TVirtualDiskExtent)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FHeader:PVboxDiskHeader;</code>
+
| Header from Disk Extent
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FHeaderOffset:Int64;</code>
+
| Absolute byte offset of Header in file
+
|-
+
| <code>FHeaderSize:LongWord;</code>
+
| Size of Header in file
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>FTable:TVirtualDiskVboxTable;</code>
+
| VirtualBox images contain only one Table per Extent
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Header:PVboxDiskHeader read FHeader;</code>
+
| &nbsp;
+
|-
+
| <code>property Table:TVirtualDiskVboxTable read FTable;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property HeaderOffset:Int64 read FHeaderOffset write FHeaderOffset;</code>
+
| &nbsp;
+
|-
+
| <code>property HeaderSize:LongWord read FHeaderSize write FHeaderSize;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
+
'''Virtual disk table'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskTable = class(TListObject)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|Note: Represents a Table of blocks within an Extent of a virtual disk
+
| [[TVirtualDiskTable|<code>TVirtualDiskTable = class(TListObject)</code>]]
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>constructor Create(AImage:TVirtualDiskImage; AExtent:TVirtualDiskExtent);</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>FImage:TVirtualDiskImage;</code>
+
| &nbsp;
+
|-
+
| <code>FExtent:TVirtualDiskExtent;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FTableOffset:Int64;</code>
+
| Absolute byte offset of Table in file
+
|-
+
| <code>FTableSize:LongWord;</code>
+
| Size of Table data in file
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FStartSector:Int64;</code>
+
| First Sector represented by this Table
+
|-
+
| <code>FSectorCount:Int64;</code>
+
| Number of Sectors represented by this Table
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Image:TVirtualDiskImage read FImage;</code>
+
| &nbsp;
+
|-
+
| <code>property Extent:TVirtualDiskExtent read FExtent;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property TableOffset:Int64 read FTableOffset write FTableOffset;</code>
+
| &nbsp;
+
|-
+
| <code>property TableSize:LongWord read FTableSize write FTableSize;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property StartSector:Int64 read FStartSector write FStartSector;</code>
+
| &nbsp;
+
|-
+
| <code>property SectorCount:Int64 read FSectorCount write FSectorCount;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk VMware table'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskVmwareTable = class(TVirtualDiskTable)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
| [[TVirtualDiskVmwareTable|<code>TVirtualDiskVmwareTable = class(TVirtualDiskTable)</code>]]
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk VPC table'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskVpcTable = class(TVirtualDiskTable)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(AImage:TVirtualDiskImage; AExtent:TVirtualDiskExtent);</code>
+
| [[TVirtualDiskVpcTable|<code>TVirtualDiskVpcTable = class(TVirtualDiskTable)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FData:Pointer;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Data:Pointer read FData write FData;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk VirtualBox table'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskVboxTable = class(TVirtualDiskTable)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
| <code>constructor Create(AImage:TVirtualDiskImage; AExtent:TVirtualDiskExtent);</code>
+
| [[TVirtualDiskVboxTable|<code>TVirtualDiskVboxTable = class(TVirtualDiskTable)</code>]]
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FData:Pointer;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Data:Pointer read FData write FData;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
+
'''Virtual disk block'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskBlock = class(TListObject)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|Note: Represents a Block bitmap showing data allocation within a virtual disk
+
| [[TVirtualDiskBlock|<code>TVirtualDiskBlock = class(TListObject)</code>]]
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>constructor Create(AImage:TVirtualDiskImage; ATable:TVirtualDiskTable);</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>FImage:TVirtualDiskImage;</code>
+
| &nbsp;
+
|-
+
| <code>FTable:TVirtualDiskTable;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FDataOffset:Int64;</code>
+
| Absolute byte offset of Data in file (Where Applicable)
+
|-
+
| <code>FBlockOffset:Int64;</code>
+
| Absolute byte offset of Block in file
+
|-
+
| <code>FBlockSize:LongWord;</code>
+
| Size of Block bitmap in file
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FStartSector:Int64;</code>
+
| First Sector represented by this Block
+
|-
+
| <code>FSectorCount:Int64;</code>
+
| Number of Sectors represented by this Block
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Image:TVirtualDiskImage read FImage;</code>
+
| &nbsp;
+
|-
+
| <code>property Table:TVirtualDiskTable read FTable;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property DataOffset:Int64 read FDataOffset write FDataOffset;</code>
+
| &nbsp;
+
|-
+
| <code>property BlockOffset:Int64 read FBlockOffset write FBlockOffset;</code>
+
| &nbsp;
+
|-
+
| <code>property BlockSize:LongWord read FBlockSize write FBlockSize;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property StartSector:Int64 read FStartSector write FStartSector;</code>
+
| &nbsp;
+
|-
+
| <code>property SectorCount:Int64 read FSectorCount write FSectorCount;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk VMware block'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskVmwareBlock = class(TVirtualDiskBlock)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
| [[TVirtualDiskVmwareBlock|<code>TVirtualDiskVmwareBlock = class(TVirtualDiskBlock)</code>]]
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk VPC group'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskVpcGroup = class(TListObject)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
 
|-
 
|-
|colspan="2"|Note: Represents a Group of bitmap Blocks
+
| [[TVirtualDiskVpcGroup|<code>TVirtualDiskVpcGroup = class(TListObject)</code>]]
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>constructor Create(AImage:TVirtualDiskImage; ATable:TVirtualDiskTable);</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FGroupNo:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
| <code>FBlocks:TFileSysList;</code>
+
| Block bitmap Blocks
+
|-
+
| <code>FBlockLocal:TMutexHandle;</code>
+
| Local Lock shared by all Block bitmap Blocks
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property GroupNo:LongWord read FGroupNo write FGroupNo;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>property Blocks:TFileSysList read FBlocks;</code>
+
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
+
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 
+
'''Virtual disk VPC block'''
+
 
+
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
+
 
+
<code>TVirtualDiskVpcBlock = class(TVirtualDiskBlock)</code>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
|colspan="2"|Note: VirtualBox images do not contain a bitmap, allocation granularity is per block
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>constructor Create(AImage:TVirtualDiskImage; ATable:TVirtualDiskTable);</code>
+
| style="width: 50%;"|&nbsp;
+
|-
+
| <code>destructor Destroy; override;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
+
|-
+
| <code>FData:Pointer;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
| <code>FBlockNo:LongWord;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
+
|-
+
|colspan="2"|&nbsp;
+
|-
+
|colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
+
|-
+
| <code>property Data:Pointer read FData write FData;</code>
+
| &nbsp;
+
|-
+
|colspan="2"|&nbsp;
+
 
|-
 
|-
| <code>property BlockNo:LongWord read FBlockNo write FBlockNo;</code>
+
| [[TVirtualDiskVpcBlock|<code>TVirtualDiskVpcBlock = class(TVirtualDiskBlock)</code>]]
| &nbsp;
+
 
|-
 
|-
 
|}
 
|}
</div></div>
 
 
<br />
 
<br />
  

Revision as of 05:39, 1 June 2018

Return to Unit Reference


Description


Ultibo Virtual Disk interface unit

To be documented

Constants



Virtual disk specific constants VIRTUAL_*
VIRTUAL_DEVICE_DESCRIPTION = 'Virtual Disk Device';  
VIRTUAL_CONTROLLER_DESCRIPTION = 'Virtual Disk Controller';  


Virtual flag virtualFlag*
virtualFlagNone = $00000000;  
virtualFlagFixed = $00000001;  
virtualFlagDynamic = $00000002;  
virtualFlagBase = $00000004;  
virtualFlagDelta = $00000008;  
virtualFlagDevice = $00000010;  
virtualFlagSplit = $00000020;  


VMware constants vmware*
vmwareFileExtension = '.vmdk';  
 
vmwareFileMask = '*.vmdk';  
 
vmwareNoParentCID = $FFFFFFFF; not($00000000)
 
vmwareSparseMagicNumber = $564d444b; 'VMDK'
 
vmwareEsxSparseMagicNumber = $44574f43; 'COWD'
vmwareEsxSparseMaxParentLength = 1024; COWDISK_MAX_PARENT_FILELEN
vmwareEsxSparseMaxNameLength = 60; COWDISK_MAX_NAME_LEN
vmwareEsxSparseMaxDescriptionLength = 512; COWDISK_MAX_DESC_LEN
 
vmwareSectorSize = 512;  


VMware disk type vmware*DiskType
vmwareMaxDiskType = 0;  
vmwareDiskTypeNone = 0;  


VMware descriptor tag vmwareTag*
vmwareTagDisk = 'Disk DescriptorFile';  
vmwareTagVersion = 'version';  
vmwareTagCID = 'CID';  
vmwareTagParentCID = 'parentCID';  
vmwareTagCreateType = 'createType';  
vmwareTagExtent = 'Extent Description';  
vmwareTagDatabase = 'The Disk Data Base';  
vmwareTagDDB = 'DDB';  
vmwareTagAdapter = 'ddb.adapterType';  
vmwareTagSectors = 'ddb.geometry.sectors';  
vmwareTagHeads = 'ddb.geometry.heads';  
vmwareTagCylinders = 'ddb.geometry.cylinders';  
vmwareTagParentHint = 'parentFileNameHint';  


VMware create type vmwareCreateType_*
vmwareMaxCreateType = 11;  
vmwareCreateType_monolithicSparse = 0;  
vmwareCreateType_vmfsSparse = 1;  
vmwareCreateType_monolithicFlat = 2;  
vmwareCreateType_vmfs = 3;  
vmwareCreateType_twoGbMaxExtentSparse = 4;  
vmwareCreateType_twoGbMaxExtentFlat = 5;  
vmwareCreateType_fullDevice = 6;  
vmwareCreateType_vmfsRaw = 7;  
vmwareCreateType_partitionedDevice = 8;  
vmwareCreateType_vmfsRawDeviceMap = 9;  
vmwareCreateType_vmfsPassthroughRawDeviceMap = 10;  
vmwareCreateType_streamOptimized = 11;  


VMware access type vmwareAccessType_*
vmwareMaxAccessType = 2;  
vmwareAccessType_RW = 0;  
vmwareAccessType_RDONLY = 1;  
vmwareAccessType_NOACCESS = 2;  


VMware extent type vmwareExtentType_*
vmwareMaxExtentType = 6;  
vmwareExtentType_FLAT = 0;  
vmwareExtentType_SPARSE = 1;  
vmwareExtentType_ZERO = 2;  
vmwareExtentType_VMFS = 3;  
vmwareExtentType_VMFSSPARSE = 4;  
vmwareExtentType_VMFSRDM = 5;  
vmwareExtentType_VMFSRAW = 6;  


VMware disk flag vmwareFlag*
vmwareFlagValidTest = $00000001; bit 0: valid new line detection test
vmwareFlagRedundantGrain = $00000002; bit 1: redundant grain table will be used
vmwareFlagGrainCompressed = $00010000; bit 16: the grains are compressed. The type of compression is described by compressAlgorithm
vmwareFlagLBAMarkers = $00020000; bit 17: there are markers in the virtual disk to identify every block of metadata or data and the markers for the virtual machine data contain a LBA


VMware compression type vmwareCompression*
vmwareCompressionNone = 0;  
vmwareCompressionDeflate = 1; The deflate algorithm is described in RFC 1951


VPC constants vpc*
vpcFileExtension = '.vhd';  
vpcUndoExtension = '.vud';  
 
vpcFileMask = '*.vhd';  
vpcUndoMask = '*.vud';  
vpcSplitMask = '*.v??'; .v01, v02 etc up to 64
 
vpcFooterCookie = 'conectix';  
vpcDynamicCookie = 'cxsparse';  
 
vpcMaxDiskExtents = 64; Maximum number of 4GB split files in a disk image
vpcExtentMaxSize = 4294967296; Maximum size of s split file (4GB)
 
vpcUnixTimeOffset = 946684800; Offset from 1/1/1970 to 1/1/2000
 
vpcFooterVersion = $00010000;  
vpcDynamicVersion = $00010000;  
 
vpcSectorSize = 512;  
 
vpcUnallocatedBlock = $FFFFFFFF;  
vpcFixedDiskTableOffset = $FFFFFFFFFFFFFFFF;  
vpcDynamicDiskDataOffset = $FFFFFFFFFFFFFFFF;  
 
vpcMaxBlockGroup = $FF;  
vpcBlockGroupMask = $FF;  
vpcBlockGroupOffset = $100;  


VPC disk type vpcDiskType*
vpcMaxDiskType = 6;  
vpcDiskTypeNone = 0;  
vpcDiskTypeReserved1 = 1;  
vpcDiskTypeFixed = 2;  
vpcDiskTypeDynamic = 3;  
vpcDiskTypeDifferencing = 4;  
vpcDiskTypeReserved2 = 5;  
vpcDiskTypeReserved3 = 6;  


VPC feature vpcFeature*
vpcFeatureNone = $00000000;  
vpcFeatureTemporary = $00000001;  
vpcFeatureReserved = $00000002; This bit must always be set to 1


VPC creator host OS vpcCreator*
vpcCreatorWindows = $5769326B; Wi2k
vpcCreatorMacintosh = $4D616320; Mac


VPC platform code vpcPlatform*
vpcPlatformNone = $00000000;  
vpcPlatformWi2r = $57693272; Wi2r deprecated
vpcPlatformWi2k = $5769326B; Wi2k deprecated
vpcPlatformW2ru = $57327275; W2ru Unicode pathname (UTF-16) on Windows relative to the differencing disk pathname
vpcPlatformW2ku = $57326B75; W2ku Absolute Unicode (UTF-16) pathname on Windows
vpcPlatformMac = $4D616320; Mac OS alias stored as a blob
vpcPlatformMacX = $4D616358; MacX A file URL with UTF-8 encoding conforming to RFC 2396


VPC bitmap mask vpcBitmapMask*
vpcBitmapMaskBits = 32; LongWord Bitmap Masks
vpcBitmapMaskNone = $00000000; LongWord (Used for fast counting of free blocks)
vpcBitmapMaskAll = $FFFFFFFF; LongWord (Used for fast counting of used blocks)
 
vpcBitmapMasks:array[0..31] of LongWord = (
$00000001,$00000002,$00000004,$00000008,$00000010,$00000020,$00000040,$00000080,
$00000100,$00000200,$00000400,$00000800,$00001000,$00002000,$00004000,$00008000,
$00010000,$00020000,$00040000,$00080000,$00100000,$00200000,$00400000,$00800000,
$01000000,$02000000,$04000000,$08000000,$10000000,$20000000,$40000000,$80000000);
 
vpcBitmapMasks:array[0..31] of LongWord = ( Ordered to allow for big endian bitmap
$00000080,$00000040,$00000020,$00000010,$00000008,$00000004,$00000002,$00000001,
$00008000,$00004000,$00002000,$00001000,$00000800,$00000400,$00000200,$00000100,
$00800000,$00400000,$00200000,$00100000,$00080000,$00040000,$00020000,$00010000,
$80000000,$40000000,$20000000,$10000000,$08000000,$04000000,$02000000,$01000000);


VirtualBox constants vbox*
vboxFileExtension = '.vdi';  
 
vboxDiskBanner = '<<< Sun xVM VirtualBox Disk Image >>>'; Plus a LF character in some images (#10)
vboxDiskVersion = $00010001;  
vboxDiskSignature = $BEDA107F;  
 
vboxFileMask = '*.vdi';  
vboxPathMask = '*.*';  
vboxDeltaPath = '..\Machines\';  
vboxParentPath = '..\..\..\VDI\';  
vboxNewParentPath = '..\..\..\HardDisks\';  
vboxSnapshotPath = '\Snapshots\';  
 
vboxUnallocatedBlock = $FFFFFFFF;  


VirtualBox disk type vboxDiskType*
vboxMaxDiskType = 4;  
vboxDiskTypeNone = 0;  
vboxDiskTypeDynamic = 1;  
vboxDiskTypeStatic = 2;  
vboxDiskTypeUnknown = 3;  
vboxDiskTypeDifferencing = 4;  


VirtualBox disk flag vboxDiskFlags*
vboxDiskFlagsNone = $00000000;  


Type definitions



ESX sparse extent header

PEsxSparseExtentHeader = ^TEsxSparseExtentHeader;

TEsxSparseExtentHeader = packed record

Note: Always 2048 bytes (Only used for Delta disks, not Dynamic)
magicNumber:LongWord; 0x44574f43/'COWD'
version:LongWord; The value of this entry should be 1
flags:LongWord; set to 3
numSectors:LongWord; total number of sectors on the base disk
grainSize:LongWord; one sector by default. Can vary from one sector to 1MB
gdOffset:LongWord; starts at the fourth sector, because the COWDisk_Header structure takes four sectors
numGDEntries:LongWord; is CEILING(numSectors, gtCoverage)
freeSector:LongWord; the next free data sector. This needs to be less than the length of the delta link. It is initially set to gdOffset + numGDSectors
case Integer of  
0: (cylinders:LongWord; root
heads:LongWord;  
sectors:LongWord;  
generation:LongWord; cont
name:array[0..vmwareEsxSparseMaxNameLength - 1] of Char;  
description:array[0..vmwareEsxSparseMaxDescriptionLength - 1] of Char;  
savedGeneration:LongWord; used to detect the unclean shutdown of the delta link. It is initially set to 0
reserved:array[0..7] of Char;  
uncleanShutdown:LongWord; used to trigger the metadata consistency check in case there is an abnormal termination of the program
padding:array[0..395] of Char);  
1: (parentFileName:array[0..vmwareEsxSparseMaxParentLength - 1] of Char; child
parentGeneration:LongWord;  
generationx:LongWord; cont
namex:array[0..vmwareEsxSparseMaxNameLength - 1] of Char;  
descriptionx:array[0..vmwareEsxSparseMaxDescriptionLength - 1] of Char;  
savedGenerationx:LongWord; used to detect the unclean shutdown of the delta link. It is initially set to 0
reservedx:array[0..7] of Char;  
uncleanShutdownx:LongWord; used to trigger the metadata consistency check in case there is an abnormal termination of the program
paddingx:array[0..395] of Char); remaining fields are not used. They are present to maintain compatibility with legacy virtual disk formats

VMware sparse extent header

PVmwareSparseExtentHeader = ^TVmwareSparseExtentHeader;

TVmwareSparseExtentHeader = packed record

Note: Always 512 bytes (Used for both Dynamic and Delta disks)
magicNumber:LongWord; 0x564d444b/'VMDK'
version:LongWord; The value of this entry should be 1
flags:LongWord; See above
capacity:Int64; the capacity of this extent in sectors (should be a multiple of the grain size)
grainSize:Int64; size of a grain in sectors (must be a power of 2 and must be greater than 8 (4KB))
descriptorOffset:Int64; offset of the embedded descriptor in the extent (expressed in sectors)
descriptorSize:Int64; valid only if descriptorOffset is non-zero (expressed in sectors)
numGTEsPerGT:LongWord; the number of entries in a grain table (for VMware virtual disks is 512)
rgdOffset:Int64; redundant level 0 of metadata (expressed in sectors)
gdOffset:Int64; level 0 of metadata (expressed in sectors)
overHead:Int64; number of sectors occupied by the metadata
uncleanShutdown:ByteBool; set to FALSE when VMware software closes an extent. Four entries are used to detect when an extent file has been corrupted by transferring it using FTP in text mode. The entries should be initialized with the following values
singleEndLineChar:Char; '\n'
nonEndLineChar:Char; ' '
doubleEndLineChar1:Char; '\r'
doubleEndLineChar2:Char; '\n'
compressAlgorithm:Word; See above
pad:array[0..432] of Byte;  

VPC dish geometry

PVpcDiskGeometry = ^TVpcDiskGeometry;

TVpcDiskGeometry = packed record

Note: Always 4 bytes
Cylinders:Word; Cylinders
Heads:Byte; Heads
Sectors:Byte; Sectors per track

VPC parent locator

PVpcParentLocator = ^TVpcParentLocator;

TVpcParentLocator = packed record

Note: Always 24 bytes
PlatformCode:LongWord; describes which platform-specific format is used for the file locator (see above)
PlatformDataSpace:LongWord; the number of 512-byte sectors needed to store the parent hard disk locator
PlatformDataLength:LongWord; length of the parent hard disk locator in bytes
Reserved:LongWord; Reserved, must be zero
PlatformDataOffset:Int64; offset in bytes where the platform specific file locator data is stored

VPC hard disk footer

PVpcHardDiskFooter = ^TVpcHardDiskFooter;

TVpcHardDiskFooter = packed record

Note: Always 512 bytes (At end of file on Fixed disks, at start and end on Dynamic and Differencing disks)
Cookie:array[0..7] of Char; conectix
Features:LongWord;  
Version:LongWord; 0x00010000
DataOffset:Int64; Offset to Dynamic Disk Header, Must be 0xFFFFFFFF for Fixed Disks
TimeStamp:LongWord; seconds since January 1, 2000 12:00:00 AM in UTC/GMT (Unix Time minus 30 years)
CreatorApplication:array[0..3] of Char; Microsoft Virtual PC = "vpc "/Microsoft Virtual Server = "vs "
CreatorVersion:LongWord; Virtual Server 2004 = 0x00010000/Virtual PC 2004 = 0x00050000
CreatorHostOS:LongWord; Windows 0x5769326B (Wi2k)/Macintosh 0x4D616320 (Mac )
OriginalSize:Int64; Size in Bytes of the VHD at Creation
CurrentSize:Int64; Current Size in Bytes of the VHD
DiskGeometry:TVpcDiskGeometry; See above
DiskType:LongWord; See above
Checksum:LongWord; 1s compliment checksum of the footer
UniqueId:TGUID;  
SavedState:ByteBool; Set to 1 if disk is in a saved state
Reserved:array[0..426] of Byte; Reserved, must be zero

VPC dynamic disk header

PVpcDynamicDiskHeader = ^TVpcDynamicDiskHeader;

TVpcDynamicDiskHeader = packed record

Note: Always 1024 bytes (Used for both Dynamic and Differencing disks)
Cookie:array[0..7] of Char; cxsparse
DataOffset:Int64; currently unused by existing formats and should be set to 0xFFFFFFFF
TableOffset:Int64; absolute byte offset of the Block Allocation Table (BAT)
HeaderVersion:LongWord; must be initialized to 0x00010000
MaxTableEntries:LongWord; maximum entries present in the BAT. equal to the number of blocks in the disk (disk size divided by the blocksize)
BlockSize:LongWord; The default value is 0x00200000 (indicating a block size of 2 MB)
Checksum:LongWord; 1s compliment checksum of the header
ParentUniqueId:TGUID; only used for differencing hard disks
ParentTimeStamp:LongWord; number of seconds since January 1, 2000 12:00:00 AM in UTC/GMT
Reserved1:LongWord; Must be zero
ParentUnicodeName:array[0..255] of WideChar; parent hard disk filename (Unicode/UTF16 string)
ParentLocator1:TVpcParentLocator; These entries store an absolute byte offset in the file where the parent locator for a differencing hard disk is stored
ParentLocator2:TVpcParentLocator; These fields are used only for differencing disks and should be set to zero for dynamic disks
ParentLocator3:TVpcParentLocator; These fields are used only for differencing disks and should be set to zero for dynamic disks
ParentLocator4:TVpcParentLocator; These fields are used only for differencing disks and should be set to zero for dynamic disks
ParentLocator5:TVpcParentLocator; These fields are used only for differencing disks and should be set to zero for dynamic disks
ParentLocator6:TVpcParentLocator; These fields are used only for differencing disks and should be set to zero for dynamic disks
ParentLocator7:TVpcParentLocator; These fields are used only for differencing disks and should be set to zero for dynamic disks
ParentLocator8:TVpcParentLocator; These fields are used only for differencing disks and should be set to zero for dynamic disks
Reserved2:array[0..255] of Byte; Reserved, must be zero

VirtualBox disk header

PVboxDiskHeader = ^TVboxDiskHeader;

TVboxDiskHeader = packed record

Note: Always 512 bytes (At start of file for both Fixed and Dynamic disks)
Banner:array[0..63] of Char; <<< Sun xVM VirtualBox Disk Image >>>
Signature:LongWord; 7F 10 DA BE
Version:LongWord; 1.1
HeaderSize:LongWord; 0x190
DiskType:LongWord; see above
DiskFlags:LongWord; see above
Description:array[0..255] of Char; Unused
BlocksOffset:LongWord;  
DataOffset:LongWord;  
Cylinders:LongWord;  
Heads:LongWord;  
Sectors:LongWord;  
SectorSize:LongWord;  
Reserved1:LongWord; Must be zero
DiskSize:Int64; Bytes
BlockSize:LongWord;  
BlockExtra:LongWord;  
TotalBlocks:LongWord;  
AllocatedBlocks:LongWord;  
UUID:TGUID;  
SnapshotUUID:TGUID;  
LinkUUID:TGUID;  
ParentUUID:TGUID;  
Unknown1:LongWord;  
Unknown2:LongWord;  
Reserved2:LongWord; Must be 0x3F
Reserved3:LongWord; Must be 0x200
Unused:array[0..9] of LongWord;  


Class definitions



Virtual disk specific classes

TVirtualDiskController = class(TDiskController)
TVirtualDiskDevice = class(TDiskDevice)
TVirtualDiskPartition = class(TDiskPartition)
TVirtualDiskImage = class(TDiskImage)
TVirtualDiskMemoryImage = class(TVirtualDiskImage)
TVirtualDiskFileImage = class(TVirtualDiskImage)
TVirtualDiskDeviceImage = class(TVirtualDiskImage)
TVirtualDiskIsoImage = class(TVirtualDiskImage)
TVirtualDiskBochsImage = class(TVirtualDiskImage)
TVirtualDiskVmwareImage = class(TVirtualDiskImage)
TVirtualDiskVpcImage = class(TVirtualDiskImage)
TVirtualDiskVboxImage = class(TVirtualDiskImage)
TVirtualRecognizer = class(TRecognizer)
TVirtualDiskResizer = class(TDiskResizer)
TVirtualDiskCopier = class(TDiskCopier)
TVirtualDiskImager = class(TDiskImager)
TVirtualDiskExtent = class(TListObject)
TVirtualDiskVmwareExtent = class(TVirtualDiskExtent)
TVirtualDiskVpcExtent = class(TVirtualDiskExtent)
TVirtualDiskVboxExtent = class(TVirtualDiskExtent)
TVirtualDiskTable = class(TListObject)
TVirtualDiskVmwareTable = class(TVirtualDiskTable)
TVirtualDiskVpcTable = class(TVirtualDiskTable)
TVirtualDiskVboxTable = class(TVirtualDiskTable)
TVirtualDiskBlock = class(TListObject)
TVirtualDiskVmwareBlock = class(TVirtualDiskBlock)
TVirtualDiskVpcGroup = class(TListObject)
TVirtualDiskVpcBlock = class(TVirtualDiskBlock)


Public variables


None defined

Function declarations



Initialization functions

procedure VirtualInit;
Description: To be documented
Note None documented


procedure VirtualQuit;
Description: To be documented
Note None documented


Virtual disk helper functions

function VirtualDataToPointer(const AData; ASize:Integer; ASwap:Boolean):Pointer;
Description: Creates a pointer and copies data from a buffer
Note Allows byte order swapping on copy


function VirtualPointerToData(APointer:Pointer; var AData; ASize:Integer; ASwap:Boolean):Boolean;
Description: Copies data to a buffer from supplied pointer
Note Allows byte order swapping on copy


function VirtualDataToString(const AData; ASize:Integer; AUnicode:Boolean):String;
Description: Converts the supplied data to a string
Note Accounts for unicode and byte ordering


function VirtualStringToData(const AString:String; var AData; ASize:Integer ;AUnicode:Boolean):Boolean;
Description: Converts the supplied string to data
Note Accounts for unicode and byte ordering


Return to Unit Reference