Wednesday, January 5, 2011

Change DNS Address

If you connect to the Internet a Domain Name Server (DNS) is generally
required to convert English Internet addresses to their natural IP
addresses -- to convert "" to "" forexample.If you have a need to dynamically change your DNS servers from
your program, all you have to do is call the following
"SetTCPIPDNSAddresses()" function with a list of IPs separated by a
single space.
uses Registry;
  sKey, sItem, sVal : string );var
  reg : TRegIniFile;begin
  reg := TRegIniFile.Create( '' );
  reg.RootKey := HKEY_LOCAL_MACHINE;
    sKey, sItem, sVal + #0 );
procedure SetTCPIPDNSAddresses(
  sIPs : string );begin
// Windows NT
    sIPs );
// Windows 95
    sIPs );end;

For example, if you want to set two DNS servers -- "" and ""
-- here's how your function call would look like:
SetTCPIPDNSAddresses('' );

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by Kang Iwan K-sev | Thank's for your visit To My Site - Ridwan Mulyana | Cibeureum