Hi,
i have a little problem. A friend of mine asked me wether its possible to code a program which changes the ip of the ethernet device. I tried it changing some stuff in the registry, but this has some disadvatages:
1. after change u have to reboot
2. It doesnt work on 2k (and its important that it will work under 2k!)
3. its not very elegant ;)
Has anybody an idea how to access the ethernet device? Are there some APIs for it?
Posted on 2004-04-14 04:35:41 by belial
I think there's no way to change IP address without reboot in windows....:notsure:
Posted on 2004-04-14 05:23:37 by Vaxon
Hm, I dunno how you would go about changing the IP address programatically, but surely it can be done (especially under NT kernels). The APIs might be undocumented?
Posted on 2004-04-14 09:59:49 by f0dder
I recall posting something about this a while back - search :)
Posted on 2004-04-18 00:17:50 by Homer
Okay, thanx, i will go and search it. At the moment im changing the registry and do a reboot, this works! Im not sure but perhaps its possible with the WNet APIs to restart a network device.
Posted on 2004-04-18 07:58:02 by belial
It sure is possible to change IP addresses, both static as dynamic ones. Look in the IP Helper documents to find what you need.

MSDN - IP Helper

You will need to include the iphlpapi.inc and iphlpapi.lib files in your project to use the IP Helper procedures.
Posted on 2004-04-18 12:24:25 by Apprentice
Thanks plenty, Apprentice - that's great :)
Too bad it doesn't support NT4 - but who cares about win95 ^_^
Posted on 2004-04-18 12:44:11 by f0dder
lookup netsh
Posted on 2004-04-18 14:28:51 by smurf
I do :)

Hello

too bad for 3.1 .. I wish
Posted on 2004-04-18 14:39:59 by cmax
why use netsh if you can do it with the IP helper API? :)
Posted on 2004-04-18 14:45:28 by f0dder
Hey, this ip helper api is great, thanx a lot :)
Posted on 2004-04-18 16:51:42 by belial