Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $iCores = 4
- $tProcessorInformation = DllStructCreate("ulong[" & $iCores * 6 & "]")
- ConsoleWrite(Hex(_CallNTPowerInformation(11, 0, 0, DllStructGetPtr($tProcessorInformation), DllStructGetSize($tProcessorInformation))) & @CRLF)
- For $i = 1 To $iCores
- ConsoleWrite("Core #" & $i -1 & ":" & @CRLF)
- For $j = 1 To 6
- ConsoleWrite(DllStructGetData($tProcessorInformation, 1, $i * $j) & @CRLF)
- Next
- ConsoleWrite(@CRLF)
- Next
- Func _CallNTPowerInformation($InformationLevel, $lpInputBuffer, $nInputBufferSize, $lpOutputBuffer, $nOutputBufferSize)
- $aRet = DllCall("PowrProf.dll", "int", "CallNtPowerInformation", "int", $InformationLevel, "ptr", $lpInputBuffer, "ulong", $nInputBufferSize, "ptr", $lpOutputBuffer, "ulong", $nOutputBufferSize)
- If @error Then Return SetError(@error, 0, -1)
- Return $aRet[0]
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement