这里是我的代码
using (VirtualDisk vhdx = DiscUtils.Vhd.Disk.OpenDisk(vhd_filename, FileAccess.Read))
{
FatFileSystem vhdbNtfs = new FatFileSystem(vhdx.Partitions(0).Open());
string filePathOnDisk = "Win.exe";
using (FileStream fileOnDisk = new FileStream(filePathOnDisk, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite))
{
byte[] buffer = new byte[BUFFERLENGTH - 1 + 1];
using (Stream file_create = vhdbNtfs.OpenFile(vhdbNtfs.Root.FullName, FileMode.Create))
{
int bytesRead = 0;
while ((__InlineAssignHelper(bytesRead, fileOnDisk.Read(buffer, 0, BUFFERLENGTH))) != 0)
{
file_create.Write(buffer, 0, bytesRead);
}
}
}
}
在" vhdbNtfs.OpenFile"
上收到错误System.IO.FileNotFoundException:'找不到文件'