Skip to content

Commit

Permalink
Pass session to ThrowIfFail (#97)
Browse files Browse the repository at this point in the history
Was not passing this in correctly from CheckImageHealth and RemoveProvisionedAppxPackage

Fixes #95
  • Loading branch information
jeffkl authored May 14, 2020
1 parent 6bb6898 commit d15a354
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Microsoft.Dism/DismApi.CheckImageHealth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static DismImageHealthState CheckImageHealth(DismSession session, bool sc

int hresult = NativeMethods.DismCheckImageHealth(session, scanImage, progress.EventHandle, progress.DismProgressCallbackNative, IntPtr.Zero, out DismImageHealthState imageHealthState);

DismUtilities.ThrowIfFail(hresult);
DismUtilities.ThrowIfFail(hresult, session);

return imageHealthState;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Dism/DismApi.RemoveProvisionedAppxPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void RemoveProvisionedAppxPackage(DismSession session, string pack
{
int hresult = NativeMethods._DismRemoveProvisionedAppxPackage(session, packageName);

DismUtilities.ThrowIfFail(hresult);
DismUtilities.ThrowIfFail(hresult, session);
}

internal static partial class NativeMethods
Expand Down

0 comments on commit d15a354

Please sign in to comment.