1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121:
| unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs,OMCDRV, cxCpu40Nv, MSI_Common, MSI_CPU, ExtCtrls, StdCtrls, XPMan,CmnTnC,DrvInterface, ComCtrls;
type TForm1 = class(TForm) Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Timer1: TTimer; cxCpu401: TcxCpu40; XPManifest1: TXPManifest; RichEdit1: TRichEdit; Button1: TButton; Button2: TButton; Button3: TButton; procedure amd64x2; procedure Timer1Timer(Sender: TObject); procedure FormCreate(Sender: TObject); procedure RDMSR; procedure intelC2D; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); private public end;
var Form1: TForm1; isLoadDr: boolean; C0:string; HiPart, LowPart:tmsr; implementation
{$R *.dfm}
procedure tFORM1.amd64x2; begin
if cxCpu401.Available.Available IN [1..2]then begin Timer1.Enabled:=TRUE;
end; end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
end;
procedure TForm1.FormCreate(Sender: TObject); begin isLoadDr := GetInstance.LoadDriver; if not isLoadDr then MessageBox(form1.Handle,'Couldn''t Start I/O Driver! Some features will be disabled!', 'Couldn''t Start I/O Driver!', MB_ICONINFORMATION) ;
end; procedure tform1.RDMSR; var GetInstance:tomcdrv; begin GetInstance.Create(); getInstance.IMSRIORef.ReadMSR($19C,HiPart);
end; procedure tform1.intelC2D; begin
if msr.HiPart=0 then RichEdit1.Lines.add('No Digital Thermal Sensor Detected!');
end;
procedure TForm1.Button1Click(Sender: TObject); begin
intelC2D; end;
procedure TForm1.Button2Click(Sender: TObject); begin rdmsr;
end;
procedure TForm1.Button3Click(Sender: TObject); begin RichEdit1.Lines.add(inttostr(msr.HiPart)); end;
end. |