I am trying to delete ip address, set static ip address for an adapter and revert static to dynamic ip address. This does not work on Win 98 since some of the apis (like AddIPAddress, DeleteIPAddress are not supported)
Do you know if there is any way of doing this on Win 98?
I have an assignment to construct an application in visual C++ 6.0 that gets IP address of remote computer on the net and upload selected files and folders in the at the same path (No drive letter)as it has e.g \asd\dfg\dfg\file1.txt
is uploaded as it is
I need help.
I must try to use "GetAdaptersAdresses " as function in iphlpapi.dll to know the state of the adapters.
It seems I can know it with the result of this function.
But I don't have it in files iphlpapi .h, .lib, .dll ???
Do you the right files iphlpapi .h, .lib, .dll ???
I think this is exactly the sort of code I am looking for right now, but unfortunately I am using a very slow connection in Kenya. Is it possible to send me the iphlpapi.h file (and library) to me at my email address? Will it work if I just paste it into the appropriate Visual C++ directories? Thanks for your help and your great code.
I have used the IPADFuncs class developed by Bill Nolde to add IP addresses to PPP connections between a PC running Windows 2000 with SP2 and some government-furnished routers that interface the PC with a radio. However, the aliases (added IP addresses) seem to be clobbering the "route" table.
When I create the PPP connection, it is set up such that the IP on the PC end of the connection is 22.214.171.124 and the IP on the router end of the connection is 126.96.36.199 (last quad of the router IP is one more than the PC IP). The "route" table entry looks like the following:
When I add an alias/IP address (such as 188.8.131.52) to the 184.108.40.206 IP address, the "route" table gets changed to something like the following:
Gateway 220.127.116.11 (NOTE: the gateway is changed to the added IP address)
This prevents me from using "telnet" to access the routers through the PPP connections. I've tried manually deleting the route and adding it back with the correct IP address, but the OS complains about my attempt to add it or adds it back using the alias as the gateway (as shown above).
Any clues as to what I might be doing wrong or how to resolve the problem?
Nice to find your sample code. After unzipping your project package and running the project, there is wrong message " This application has failed to start because MFC 70.dll was not found, ... ". My computer has installed Windows XP and VS 6.0. I also can't use VC++ to open your workspace. Is there document we can find these answers?
thanks and regards,
I am using AddIPAddress() API call in my application to
add IP address like 127.x.y.z. This API call is working
fine when I have a network connection. But its not working
when I unplug the network cable.
Is it possible to add virtual IP addresses like 127.x.y.x
using AddIPAddress() API call without a network
connection ? or any workaround ?
This code was tested on both Win2k and WindowsXP and has no problems. It was never tested with a dialup connection for obvious reasons and I expect it won't work. The article is about testing on a LAN which requires a Network adapter.