/// <summary>
 /// Checks whether the image can be serviced or whether it is corrupted.
 /// </summary>
 /// <param name="session">A valid DISM Session. The DISM Session must be associated with an image. You can associate a session with an image by using the DismOpenSession Function.</param>
 /// <param name="scanImage">Specifies whether to scan the image or just check for flags from a previous scan.</param>
 /// <param name="progressCallback">A DismProgressCallback method to call when progress is made.</param>
 /// <returns>A <see cref="DismImageHealthState"/> indicating the health state of the image.</returns>
 /// <exception cref="DismException">When a failure occurs.</exception>
 /// <exception cref="OperationCanceledException">When the user requested the operation be canceled.</exception>
 public static DismImageHealthState CheckImageHealth(DismSession session, bool scanImage, Microsoft.Dism.DismProgressCallback progressCallback)
 {
     return(DismApi.CheckImageHealth(session, scanImage, progressCallback, null));
 }
 /// <summary>
 /// Checks whether the image can be serviced or whether it is corrupted.
 /// </summary>
 /// <param name="session">A valid DISM Session. The DISM Session must be associated with an image. You can associate a session with an image by using the DismOpenSession Function.</param>
 /// <param name="scanImage">Specifies whether to scan the image or just check for flags from a previous scan.</param>
 /// <returns>A <see cref="DismImageHealthState"/> indicating the health state of the image.</returns>
 /// <exception cref="DismException">When a failure occurs.</exception>
 public static DismImageHealthState CheckImageHealth(DismSession session, bool scanImage)
 {
     return(DismApi.CheckImageHealth(session, scanImage, null));
 }