public string GetReport() { using (var w = new StringWriter(CultureInfo.InvariantCulture)) { w.WriteLine(); w.WriteLine("Open Hardware Monitor Report"); w.WriteLine(); var version = typeof(Computer).Assembly.GetName().Version; NewSection(w); w.Write("Version: "); w.WriteLine(version.ToString()); w.WriteLine(); NewSection(w); w.Write("Common Language Runtime: "); w.WriteLine(Environment.Version.ToString()); w.Write("Operating System: "); w.WriteLine(Environment.OSVersion.ToString()); w.Write("Process Type: "); w.WriteLine(IntPtr.Size == 4 ? "32-Bit" : "64-Bit"); w.WriteLine(); var r = Ring0.GetReport(); if (r != null) { NewSection(w); w.Write(r); w.WriteLine(); } NewSection(w); w.WriteLine("Sensors"); w.WriteLine(); foreach (var group in groups) { foreach (var hardware in group.Hardware) { ReportHardwareSensorTree(hardware, w, ""); } } w.WriteLine(); NewSection(w); w.WriteLine("Parameters"); w.WriteLine(); foreach (var group in groups) { foreach (var hardware in group.Hardware) { ReportHardwareParameterTree(hardware, w, ""); } } w.WriteLine(); foreach (var group in groups) { var report = group.GetReport(); if (!string.IsNullOrEmpty(report)) { NewSection(w); w.Write(report); } var hardwareArray = group.Hardware; foreach (var hardware in hardwareArray) { ReportHardware(hardware, w); } } return(w.ToString()); } }
public void ReleaseIsaBusMutex() { Ring0.ReleaseIsaBusMutex(); }
public void Open() { if (open) { return; } this.smbios = new SMBIOS(); Ring0.Open(); Opcode.Open(); if (mainboardEnabled) { Add(new Mainboard.MainboardGroup(smbios, settings)); } if (cpuEnabled) { Add(new CPU.CPUGroup(settings)); } if (ramEnabled) { Add(new RAM.RAMGroup(smbios, settings)); } if (gpuEnabled) { Add(new ATI.ATIGroup(settings)); Add(new Nvidia.NvidiaGroup(settings)); } if (fanControllerEnabled) { Add(new TBalancer.TBalancerGroup(settings)); Add(new Heatmaster.HeatmasterGroup(settings)); Add(new Aquacomputer.AquacomputerGroup(settings)); } if (hddEnabled) { Add(new HDD.HarddriveGroup(settings)); } if (nicEnabled) { nicCount = NetworkInterface.GetAllNetworkInterfaces().Length; Add(new Nic.NicGroup(settings)); } HardwareAdded += delegate(IHardware hardware){ // Find all Control sensors and give all hardware NotifyNotifySoftwareCurveControllersAllHardware(); }; HardwareRemoved += delegate(IHardware removed){ // Find all Control sensors and notify removed hardware foreach (var group in groups) { foreach (var hardware in group.Hardware) { NotifySoftwareCurveControllersHardwareRemoved(hardware, removed); } } }; open = true; }
public bool WaitIsaBusMutex(int timeout) { return(Ring0.WaitIsaBusMutex(timeout)); }
public static void UninstallDriver() { Ring0.UninstallKernelDriver(); }
public static void InstallDriver(string directoryPath) { Ring0.InstallKernelDriver(directoryPath); }
public byte ReadIoPort(int port) { return(Ring0.ReadIoPort((uint)port)); }
public void WriteIoPort(int port, byte value) { Ring0.WriteIoPort((uint)port, value); }