public static bool DoesVolumeHaveBadBlocks(string volumeId, out string mountPoint, out Exception ex, out string eventXML) { bool flag = false; mountPoint = null; eventXML = null; Dictionary <string, string> mountPointVolumeIDMappings = BitlockerUtil.GetMountPointVolumeIDMappings(out ex); if (mountPointVolumeIDMappings == null) { ex = new MountPointsFindException(ex.Message, ex); return(false); } if (!mountPointVolumeIDMappings.ContainsValue(volumeId)) { ex = new InvalidVolumeIdException(volumeId); return(false); } foreach (string text in mountPointVolumeIDMappings.Keys) { if (mountPointVolumeIDMappings[text].Equals(volumeId)) { flag = BitlockerUtil.DoesMountPointHaveBadBlocks(text, out ex, out eventXML); if (flag) { mountPoint = text; break; } } } return(flag); }