Click here to Skip to main content
15,881,516 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to restart network interface programmatically, so it could use new mac address defined in registry. How can I do so?

What I have tried:

C++
system("netsh interface set interface [name] disabled")

Which is a noob option of course, and I have to know the [name].
Posted
Updated 31-May-16 3:31am
Comments
Richard MacCutchan 30-May-16 11:28am    
The name will be listed in the Windows device tree.

1 solution

I have written a small article about networking API on Windows.

Here is a starting point of the Microsoft documenation of the INetCfg interface.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900