1.1 --- a/Hardware/Ring0.cs Wed Jul 18 19:45:59 2012 +0000
1.2 +++ b/Hardware/Ring0.cs Wed Jul 18 20:20:26 2012 +0000
1.3 @@ -127,7 +127,8 @@
1.4
1.5 fileName = GetTempFileName();
1.6 if (fileName != null && ExtractDriver(fileName)) {
1.7 - if (driver.Install(fileName)) {
1.8 + string installError;
1.9 + if (driver.Install(fileName, out installError)) {
1.10 driver.Open();
1.11
1.12 if (!driver.IsOpen) {
1.13 @@ -135,10 +136,13 @@
1.14 report.AppendLine("Status: Opening driver failed after install");
1.15 }
1.16 } else {
1.17 + string errorFirstInstall = installError;
1.18 +
1.19 // install failed, try to delete and reinstall
1.20 driver.Delete();
1.21
1.22 - if (driver.Install(fileName)) {
1.23 + string errorSecondInstall;
1.24 + if (driver.Install(fileName, out errorSecondInstall)) {
1.25 driver.Open();
1.26
1.27 if (!driver.IsOpen) {
1.28 @@ -150,9 +154,8 @@
1.29 report.AppendLine("Status: Installing driver \"" +
1.30 fileName + "\" failed" +
1.31 (File.Exists(fileName) ? " and file exists" : ""));
1.32 - report.AppendLine();
1.33 - report.Append("Exception: " + Marshal.GetExceptionForHR(
1.34 - Marshal.GetHRForLastWin32Error()).Message);
1.35 + report.AppendLine("First Exception: " + errorFirstInstall);
1.36 + report.AppendLine("Second Exception: " + errorSecondInstall);
1.37 }
1.38 }
1.39 } else {