Code: Select all
[StructLayout(LayoutKind.Sequential, Pack = 1)]
internal struct CoreTempSharedDataEx
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
public uint[] uiLoad;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public uint[] uiTjMax;
public uint uiCoreCnt;
public uint uiCPUCnt;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
public float[] fTemp;
public float fVID;
public float fCPUSpeed;
public float fFSBSpeed;
public float fMultiplier;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)]
public string sCPUName;
public byte ucFahrenheit;
public byte ucDeltaToTjMax;
// v2 fields
public byte ucTdpSupported;
public byte ucPowerSupported;
public uint uiStructVersion;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public uint[] uiTdp;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public float[] fPower;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
public float[] fMultipliers;
}
Code: Select all
ucTdpSupported = 1
ucPowerSupported = 1
uiStructVersion = 0
uiTdp = (all values in the array are 0)
fPower = (all values in the array are 0.0)
fMultipliers = (all values in the array are 0.0)
Then a general question - while the shared memory API reports what (I assume) is the number of physical CPUs in the system via the uiCPUCnt field, the CoreTempSharedDataEx struct is defined in such a way that it's not possible to get information for more than 1 physical CPU at a time. Is this intended, or an oversight?