Solved

IP Address Changes "on the fly"

Posted on 2000-04-03
7
174 Views
Last Modified: 2010-04-10
How can I change fixed  IP addresses "on the fly" from a Win32 application in a documented/supported way that works for Win98, WinNT, and Win2000?
0
Comment
Question by:quirky
  • 4
  • 3
7 Comments
 

Author Comment

by:quirky
ID: 2681834
Adjusted points from 100 to 200
0
 
LVL 32

Accepted Solution

by:
jhance earned 200 total points
ID: 2681847
The method outlined in this article works for NT4 and W2K:

http://www.slon.sk/Slon/setip-nt-howto.htm

The AddIpAddress() function from IPHLPAPI.DLL works in Win98 and W2K.  It's documented in the current SDK.

The only OS that really can't do this at all is Win95.
0
 

Author Comment

by:quirky
ID: 2683853
Thanks for your input.  We are currently using the "hacker" method in the URL you mentioned for NT4. We found the AddIpAddress() function in IPHLPAPI.DLL but have no current documentation in v6.0 of the C++ developers kit. Once we have found this and verified - I will award the points. We are not concerned about Win95 at this time - apparently a good thing.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 32

Expert Comment

by:jhance
ID: 2684215
0
 

Author Comment

by:quirky
ID: 2684779
The URL for the documentation indicates that Win98 is unsupported - have you tried it and found it to work? We don't have the latest developer's kit so I will take your word for it. We're going to get it as soon as possible.
0
 
LVL 32

Expert Comment

by:jhance
ID: 2684863
Yes, in spite of the note in the SDK, the AddIpAddress export from IPHLPAPI.DLL for Win98 does seem to work.  I suspect that some of the other functions in this DLL don't work as advertised, however.

As always though, you should use caution when using undocumented (or underdocumented) features.  There may be specific instances or combinations of system components that may make this function non-operational.  

One tipoff I had that this worked on Win98 is that AOL 4.0 distributes iphlpapi.dll and indeed uses the AddIpAddress function when running on Win98.  I'm sure that AOL get's "inside" information that is generally unvailable to low-level hacks like us.
0
 

Author Comment

by:quirky
ID: 2751719
We have not been able to get this to work on Win 98. jhance, if your there, do you have any tips?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now