Как определить наличие сопроцессора?
uses
... {$IFDEF WIN32}, Registry {$ENDIF};
function HasCoProcesser: bool;
{$IFDEF WIN32}
var
TheKey: hKey;
{$ENDIF}
begin
Result := true;
{$IFNDEF WIN32}
if GetWinFlags and Wf_80x87 = 0 then
Result := false;
{$ELSE}
if RegOpenKeyEx( HKEY_LOCAL_MACHINE, 'HARDWARE\DESCRIPTION\System\FloatingPointProcessor',
0, KEY_EXECUTE, TheKey ) = ERROR_SUCCESS then
Result := false;
RegCloseKey( TheKey );
{$ENDIF}
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if HasCoProcesser then
ShowMessage( 'Сопроцессор присутствует' ) else
ShowMessage( 'Сопроцессор отсутствует' );
end; |