Originally posted by windows9x at 2007-2-16 06:15:
不知道这么长一段代码有啥用。。。试用了一下,只知道切换192.168这样的网关,假如是别的网关,根本就不会切换,这也叫自动?还不如手动更改来得方便。
这个可以先取得当前的网段...保存...
然后再换网段...
最后需要恢复的时候再取出之前保存的网段还原不就OK了...
Originally posted by windows9x at 2007-2-16 06:15:
I don't know what this long piece of code is for... I tried it and only know that it can switch gateways like 192.168. If it's another gateway, it simply won't switch. This is called automatic? It's not as convenient as manual change.
This can first obtain the current network segment... save it...
Then change the network segment...
Finally, when it needs to be restored, just take out the previously saved network segment and restore it. Isn't that okay...