Added basic Nvidia NVML library support and power usage sensor (#60)

* Added basic Nvidia NVML library support and power usage sensor

* Added basic Nvidia NVML library support and power usage sensor

* Added Initialised check

* Made NvmlDevice internal

* Code formatting

* Move NvmlDevice and NvmlReturn to separate files

* Move code from NvidiaNVMLGPU class to NvidiaGPU class

* Replace call to SetDllDirectory with LoadLibrary/FreeLibrary and code formatting changes

* Made native methods private

* Fixed p/invoke definitions, removed unnecessary try/catch blocks. Code style cleanup
This commit is contained in:
Campbell
2019-01-27 10:34:04 +01:00
committed by Phyxion
parent 556d62917c
commit 98969ebc3e
6 changed files with 295 additions and 5 deletions
+9
View File
@@ -0,0 +1,9 @@
using System;
using System.Runtime.InteropServices;
namespace OpenHardwareMonitor.Hardware.Nvidia {
[StructLayout(LayoutKind.Sequential)]
internal struct NvmlDevice {
public IntPtr Handle;
}
}