uses registry; ... function GetCpuMhz: Word; begin with tregistry.Create do begin rootkey := HKEY_LOCAL_MACHINE; openkey('hardwaredescriptionsystemcentralprocessor', false); result := readinteger('~mhz'); free; end; end;
registry; ... function
GetCpuMhz: Word; begin
with
tregistry.Create do
begin
rootkey := HKEY_LOCAL_MACHINE; openkey('hardwaredescriptionsystemcentralprocessor', false); result := readinteger('~mhz'); free; end
; end
;