473,322 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Changing TCP/IP settings

I am trying to figure out how to change TCP/IP settings through VC# (IP
Address, DNS, WINS, Gateway, Computer Name, Host, etc), but cannot find
anything anywhere. I'm sure that it's out there, but I am not finding it.
Does anyone have some info as to where I may find this, or any code or ideas
that may be of help? I've searched the documentation that came with VC#,
but cannot find anything. (I'm sure it's there, but I haven't been able to
find it.) I also have several books, but they tell you how to create a
connection, but not how to change the settings.

Rob

Thank you for any help in advance.
Jul 21 '05 #1
1 6281
"Robert" <rg*****@si.rr.com> wrote in message news:<ka*****************@twister.nyc.rr.com>...
I am trying to figure out how to change TCP/IP settings through VC# (IP
Address, DNS, WINS, Gateway, Computer Name, Host, etc), but cannot find
anything anywhere. I'm sure that it's out there, but I am not finding it.
Does anyone have some info as to where I may find this, or any code or ideas
that may be of help? I've searched the documentation that came with VC#,
but cannot find anything. (I'm sure it's there, but I haven't been able to
find it.) I also have several books, but they tell you how to create a
connection, but not how to change the settings.

Rob -

All of this information can be found in the Registry. You can use
the classes in the Microsoft.Win32.Registry and
Microsoft.Win32.RegistryKey namespaces to query and modify these
values.

On Windows NT, 2000, and XP machines the IP settings are stored
under each individual network interface card. You can obtain a listing
of the installed network cards from the
HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkCards
Registry key. Once you have a list of the installed network cards, you
can see their individual IP settings under the
HKLM\SYSTEM\CurrentControlSet\Services key, listed under the same key
name of the network card.

In Chapter 2 of my C# book I demonstrate using the Registry to
obtain IP address information. You can freely download the example
code from the Sybex web site. It should not be too difficult to change
the code to modify the IP settings. Hope this helps get you started on
your journey. Good luck with your project.

Rich Blum - Author
"C# Network Programming" (Sybex)
http://www.sybex.com/sybexbooks.nsf/Booklist/4176
"Network Performance Open Source Toolkit" (Wiley)
http://www.wiley.com/WileyCDA/WileyT...471433012.html
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: news | last post by:
I want to see my settings for java. How do I see the settings using set on DOS screen?? My problem is when I type in set and nothing shows. I go to the directly where java.exe is located and...
0
by: Anthony Nystrom | last post by:
I am having trouble with changing printer settings before I raise either the pagesetup dialog or the print preview dialog... Changing the printer name is easy, but I am also trying to change the...
4
by: Doug van Vianen | last post by:
Hi, I have the following coding on a web page. It causes two pictures (pic1.jpg and pic2.jpg) to show, one above the other and then when one clicks on the top picture is squeezes to the left...
2
by: ExitusLSU | last post by:
Is there a way to change the DEFAULT printer settings for an installed printer? I want it to change the printer settings for a specified printer at the whole OS/Windows level, not just for the...
10
by: steve | last post by:
Hi All I would like to be able to change the cell borders on certain cells to none at runtime to make a group of cells appear to be merged I have tried the following in the cellformatting...
4
by: Jamie McQuay | last post by:
Does any one know if it is possible to set the location of a settings file? I want to use separate settings files for each user and will need to change the location. Thanks, Jamie
2
by: Robert Dufour | last post by:
Its easyb to change user leve settings but how do you change application level settings in code. Apparently it seems it can't be done. Duhhh. Anybody manage a workaround? Thanks for any help....
0
by: rawatgaurav81 | last post by:
I had this strange problem in handling XMLDocuments in asp.net.Though the problem occurs while working on the main application.I will try to explain it with shorter code. I had a form with 2...
0
by: Jonathan Wood | last post by:
I had the strangest thing happen yesterday. I was playing with the EnableViewState property for some table controls, ran my Web project to the page I was working on, clicked a button that...
3
by: senthilkumarb | last post by:
Dynamically changing browser settings Browser have various settings like - cookies, cache, etc... How to check a browser whether cookies is Enabled OR Disabled in the client machine using...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.