D
delhpi
Unregistered / Unconfirmed
GUEST, unregistred user!
无意中打开VCLTRegistry 单元,发现IDE提示有错误,大致意思是 标识符声明重复了。看了一下,TRegistry 类有RestoreKey函数,但函数内部,又声明了一个局部RestoreKey变量。function TRegistry.RestoreKey(const Key, FileName: string): Boolean;var RestoreKey: HKEY;begin Result := False; RestoreKey := GetKey(Key); if RestoreKey <> 0 then try Result := RegRestoreKey(RestoreKey, PChar(FileName), 0) = ERROR_SUCCESS; finally RegCloseKey(RestoreKey); end;end;