在Win2000下面,可以用IP Helper Functions. 祥见MSDN->Platform Sdk Documentation->Networking and Directory Service->Network protocol->Internet Protocol Helper.
重点看一下AddIPAddress 和 DeleteIPAddress。
下面文章讲述了这2个APIs.
INFO: AddIPAddress and DeleteIPAddress in IP Helper APIs (Q199749) http://support.microsoft.com/default.aspx?scid=kb;EN-US;q199749 |
但在Win2000上使用有2个限制。
1. RRAS should not be running;
2. Only good for changing non-base IP addresses.
实际上DeleteIPAddress仅能删除由AddIPAddress添加的IP。
在Win2000上,我们有一个命令行工具NETSH可以用来改变IP动态的地址。
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257748
你可以使用Shell API 来执行这个命令动态改变静态IP地址。
微软全球技术中心专家 本帖子仅供YESKY的用户作为参考信息使用。其内容不具备任何法律保障。您需要考虑到并承担使用此信息可能带来的风险。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
为了为您创建更好的讨论环境,请参加我们的用户满意度调查(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,35242374))。