Changing the Ip address

Rakesh Rao

Member
Joined
Oct 1, 2005
Messages
18
Programming Experience
Beginner
Hi all,
Am trying to change the ip address of mine while sending some data out. But could not find a wayout to the problem. I have tried some code snippets from net. but no success. If any body can help, plz do it fast.

Thanks a lot in advance.
 
Use this link: http://www.dotnetjunkies.com/HowTo/2BDAC1D8-B277-4A82-B3E7-5B23B910D2B4.dcik (It seems to work, but there may be a problem with obtaining the first network card because SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\1 is assuming that the registry location of the first network card is at 1)

You could go through the network cards and select the one you want, e.g. to go through the keys (the numbers) (you can use
GetSubKeyNames() function to get them)
and look for the description value to find the correct card. For example, one network adapter may be at SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\9 with the description "Broadcom 440x 10/100 Integrated Controller".

Hope this helps.
 
Back
Top