I tried the sample code at https://github.com/jeffkl/ManagedWimgApi/wiki/Message-Callbacks but doesn7t works. I simply copy & pasted that code.
private void applywim(string source,string destination)
{
var targetPath = destination;
var imageIndex = 1;
using (var wimHandle = WimgApi.CreateFile(
source,
WimFileAccess.Read,
WimCreationDisposition.OpenExisting,
WimCreateFileOptions.None,
WimCompressionType.None))
{
WimgApi.SetTemporaryPath(wimHandle, Environment.GetEnvironmentVariable("TEMP"));
WimgApi.RegisterMessageCallback(wimHandle, MyCallbackMethod);
try
{
using (var imageHandle = WimgApi.LoadImage(wimHandle, imageIndex))
{
WimgApi.ApplyImage(imageHandle, targetPath, WimApplyImageOptions.None);
}
}
finally
{
WimgApi.UnregisterMessageCallback(wimHandle, MyCallbackMethod);
}
}
}
I executed the sample code, but nothing happens. The read / write rate of the disk remains 0, and it seems that it is frozen. The restore destination directory was restored in an incomplete state. We thought that there was a problem with the WIM file itself, restored manually with the DISM command, but using the DISM command it was possible to restore it exactly.
Please tell me how to solve. Help me.
I tried the sample code at https://github.com/jeffkl/ManagedWimgApi/wiki/Message-Callbacks but doesn7t works. I simply copy & pasted that code.
I executed the sample code, but nothing happens. The read / write rate of the disk remains 0, and it seems that it is frozen. The restore destination directory was restored in an incomplete state. We thought that there was a problem with the WIM file itself, restored manually with the DISM command, but using the DISM command it was possible to restore it exactly.
Please tell me how to solve. Help me.