Hello
Does anyone know how to get a new IP from the ISP (source code)?
I have a dynamic IP and right now there is some problems and the IP expires after 1 hour.
I don?t want to use winipcfg.exe!
Does anyone know how to get a new IP from the ISP (source code)?
I have a dynamic IP and right now there is some problems and the IP expires after 1 hour.
I don?t want to use winipcfg.exe!
I think somone has posted code to do this somewhere on this bored. I think you use GetHostByName wich returns a structure wich contrains the IP.
--------
Does anyone know how to get a new IP from the ISP (source code)?
--------
WHAT ???
i hope i understand u right !
if yes ,you like to get a new IP from your isp ?
simply disconnect and reconnect again.
---------------
I have a dynamic IP and right now there is some problems and the IP expires after 1 hour.
--------------
you want to tell us that you connect to internet and after 1 hour you have another ip then the one you start with ?
tell me your isp !
-------------------
I don?t want to use winipcfg.exe!
-------------------
hm...last i think you mean how you can set a IP with this tool.
im shure i missunderstand your question...
Does anyone know how to get a new IP from the ISP (source code)?
--------
WHAT ???
i hope i understand u right !
if yes ,you like to get a new IP from your isp ?
simply disconnect and reconnect again.
---------------
I have a dynamic IP and right now there is some problems and the IP expires after 1 hour.
--------------
you want to tell us that you connect to internet and after 1 hour you have another ip then the one you start with ?
tell me your isp !
-------------------
I don?t want to use winipcfg.exe!
-------------------
hm...last i think you mean how you can set a IP with this tool.
im shure i missunderstand your question...
The problem is that I DON?T have an address after 1 hour.
I have a 10 Mbit/s connection and the ISP provides dynamic addresses, that means that everytime I turn on the computer I get a new address.
Normally that address is legal until I turn off the computer or I diconnect the network card.
But now there is some problem with a server that handles the addresses I think, so after 1 hour I get disconnected.
With the program winipcfg.exe (Win98), there is some information about the network, like address and more.
There you can press Update (or Renew, I have other language than English), then a new address is recieved.
Maybe that depends on the ISP and connection type, I haven?t tested with a modem.
Instead of manually disconnect or use winipcfg.exe I wan?t to write a program that handles that for me (I am tired of beeing interupted when I?m surfing).
I have a 10 Mbit/s connection and the ISP provides dynamic addresses, that means that everytime I turn on the computer I get a new address.
Normally that address is legal until I turn off the computer or I diconnect the network card.
But now there is some problem with a server that handles the addresses I think, so after 1 hour I get disconnected.
With the program winipcfg.exe (Win98), there is some information about the network, like address and more.
There you can press Update (or Renew, I have other language than English), then a new address is recieved.
Maybe that depends on the ISP and connection type, I haven?t tested with a modem.
Instead of manually disconnect or use winipcfg.exe I wan?t to write a program that handles that for me (I am tired of beeing interupted when I?m surfing).
try ipconfig /?
you could write an app that executes ipconfig /renew or ipconfig /release or whatever after an hour or when it detects no internet connection or something like that.
be creative ;)
you could write an app that executes ipconfig /renew or ipconfig /release or whatever after an hour or when it detects no internet connection or something like that.
be creative ;)
Thanks
Great, problem solved.
Both ipconfig.exe and winipcfg.exe handles /renew_all so calling them is super.
But super super would be to know exactly how they do it.
Great, problem solved.
Both ipconfig.exe and winipcfg.exe handles /renew_all so calling them is super.
But super super would be to know exactly how they do it.
take a look at the ip helper api's, Thomas posted some docs and info about it some time ago in this thread:
http://www.asmcommunity.net/board/index.php?topic=2246
The function IpRenewAddress sounds just like what you are looking for ;)
http://www.asmcommunity.net/board/index.php?topic=2246
The function IpRenewAddress sounds just like what you are looking for ;)