Adding a custom DNS resolution

This is a discussion on Adding a custom DNS resolution within the Windows Programming forums, part of the Platform Specific Boards category; There are certain domain names that I would like to control the resolution of. My problem is that a game ...

  1. #1
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401

    Adding a custom DNS resolution

    There are certain domain names that I would like to control the resolution of. My problem is that a game I have tries to resolve a domain name which no longer exists, which means I have to wait about two minutes before the game starts up. What I would like to do is simply specify a dummy IP address for that domain so I can get on with my gaming.

    Any ideas?
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Just edit your HOSTS file. What OS you using?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    I'm using Windows XP. Where is this HOSTS file?
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,650
    Can't verify this at the moment, but should be in
    C:\WINNT\system32\drivers\etc\

    It's a text file which contains instructions on how to use it.

    gg

  5. #5
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    C:\WINDOWS\system32\drivers\etc\hosts
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  6. #6
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    Thank you, that works.

    In a related matter, how could I make it so that I can type an alias in the address bar and have it send the DNS query for the real domain name? Ie, I could type "cboard", and it would do the same as if I had typed in "cboard.cprogramming.com".
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  7. #7
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Not sure about IE, but I know that you can do that in Opera. Just add a bookmark, and give it a nickname. Then, to use the shortcut, just hit shift-F2, and type the nickname.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DNS issue
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 08-02-2008, 10:15 AM
  2. SVN Import Causes Crash
    By Tonto in forum Tech Board
    Replies: 6
    Last Post: 11-01-2006, 02:44 PM
  3. Adding custom GUI to a DirectX 9 App
    By X PaYnE X in forum Game Programming
    Replies: 0
    Last Post: 09-01-2005, 05:34 AM
  4. DNS & Mail settings modifier
    By DemonSoul in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 05-20-2004, 12:43 PM
  5. Adding a custom Icon
    By St0rmTroop3er in forum Windows Programming
    Replies: 4
    Last Post: 10-01-2003, 10:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21