var
myreg:tregistry;
s:array[0..max_path] of char;
begin
myreg:=tregistry.cleate;
myreg.rootkey:=hkey_local_machine;
try
if
myreg.openkey('\software\microsoft\microsoft sql server',false) then
ts_hf.tabvisible:=true
else    ts_hf.tabvisible:=false;
finally
myreg.Free;
end;
getsystemdirectory(s,sizeof(s))   ;
sys_dir:=s;
end;[Error] u_restore.pas(28): Undeclared identifier: 'tregistry'
[Error] u_restore.pas(31): Missing operator or semicolon
[Error] u_restore.pas(32): Missing operator or semicolon
[Error] u_restore.pas(35): 'THEN' expected but identifier 'openkey' found
[Error] u_restore.pas(47): Statement expected but end of file found
[Fatal Error] Project2.dpr(5): Could not compile used unit 'u_restore.pas'
为什么有这样的错误呢?