Solved

IP Address Changes "on the fly"

Posted on 2000-04-03
7
173 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
Comment Utility
Adjusted points from 100 to 200
0
 
LVL 32

Accepted Solution

by:
jhance earned 200 total points
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 32

Expert Comment

by:jhance
Comment Utility
0
 

Author Comment

by:quirky
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

763 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

11 Experts available now in Live!

Get 1:1 Help Now