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:
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace OpenHardwareMonitor.Hardware.Nvidia {
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct NvmlDevice {
|
||||
public IntPtr Handle;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user