Reputation: 1035
I am developing an application that requires the ability to be able to set the IP address.
Using command prompt
Netsh interface IP set address....
It works but what is the equivalent in c?
Thanks
Upvotes: 1
Views: 2284
Reputation:
You need to use system command in c which is a very helpful command in executing command prompt commands.for ex system('watever command you can type here');
Upvotes: -2
Reputation: 1274
I think you need AddIPAddress() API.
Refer to AddIPAddress function at MSDN documentation with a good example.
You can refer to a majority of networking APIs (query, set, delete IPs etc) at https://msdn.microsoft.com/en-us/library/windows/desktop/aa366071(v=vs.85).aspx.
Upvotes: 3