NVAPI interop struct packing improved.

This commit is contained in:
Michael Möller
2010-02-22 20:54:49 +00:00
parent 2cde9eff61
commit 4248689d75
2 changed files with 8 additions and 8 deletions

View File

@@ -122,7 +122,7 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
UNKNOWN = -1
};
[StructLayout(LayoutKind.Sequential, Pack = 1)]
[StructLayout(LayoutKind.Sequential, Pack = 8)]
public struct NvSensor {
public NvThermalController Controller;
public int DefaultMinTemp;
@@ -131,7 +131,7 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
public NvThermalTarget Target;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
[StructLayout(LayoutKind.Sequential, Pack = 8)]
public struct NvGPUThermalSettings {
public int Version;
public int Count;
@@ -140,14 +140,14 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
public NvSensor[] Sensor;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
[StructLayout(LayoutKind.Sequential)]
public struct NvDisplayHandle {
private int handle;
private IntPtr ptr;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
[StructLayout(LayoutKind.Sequential)]
public struct NvPhysicalGpuHandle {
private int handle;
private IntPtr ptr;
}
public class NVAPI {