This code gives me an error message: [Error] Unit1.pas(52): Undeclared identifier: \'Edit1\'.
procedure SetTCPIPDNSAddresses(sIPs : String);
begin
If you cannot use the solution that Ken White gave you, for instance if you are not allowed to change the signature of SetTCPIPDNSAddresses(), then another option is to access the TEdit via the global pointer to its parent TForm (if your TForm instance is actually making use of that pointer, that is), eg:
procedure SetTCPIPDNSAddresses(sIPs : String);
begin
SaveStringToRegistry_LOCAL_MACHINE(
'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\' + Form1.Edit1.Text,
'NameServer', sIPs);
end;