Where is the Disk object created?

Nov 30, 2011 at 3:22 AM

I'm using Visual studio 2010/C# and have added references and linked the DLLs DiskUtils and DiskUtils.common.  In looking at the examples, I don't even see code for the headers.

eg.

using DiskUtils;
using DiskUtils.Common;

The following code will not work because Disk, BiosParitionTable and FatFileSystem are not found.

Disk disk = Disk.InitializeDynamic(vhdStream, diskSize);

BiosPartitionTable.Initialize(disk, WellKnownPartitionType.WindowsFat);

using (FatFileSystem fs = FatFileSystem.FormatPartition(disk, 0, null ))

Where are these objects geting defined?

Thanks

 sj

Coordinator
Dec 1, 2011 at 12:00 AM

Hi,

You need to include the namespace for whichever disk format you want to use - eg

using DiscUtils.Vhd;

And to get the FAT filesystem, you'll need:

using DiscUtils.Fat;

 

Cheers,

Ken