|
QUESTION: How can I find out what type of CPU the computer has that my application is running on? ANSWER: Below is a code sample that demonstrates the process. Make sure you add Registry to your uses clause.
function CPUType: string;
var
Reg: TRegistry;
begin
CPUType := '';
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.OpenKey('\Hardware\Description\System\CentralProcessor\0', False) then
CPUType := Reg.ReadString('Identifier');
finally
Reg.Free;
end;
end;
|
Last Modified: 05-FEB-02