Solved

IP Address Changes "on the fly"

Posted on 2000-04-03
7
177 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

774 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