如何使用C在Windows 7上以编程方式设置IP地址 [英] How to programmatically set IP address on Windows 7 using C

查看:63
本文介绍了如何使用C在Windows 7上以编程方式设置IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个需要能够设置IP地址的应用程序.

I am developing an application that requires the ability to be able to set the IP address.

使用命令提示符

Netsh接口IP设置地址....

Netsh interface IP set address....

它可以工作,但是c中的等效项是什么?

It works but what is the equivalent in c?

谢谢

推荐答案

我认为您需要AddIPAddress()API.

I think you need AddIPAddress() API.

请参阅

Refer to AddIPAddress function at MSDN documentation with a good example.

您可以在 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆