I can't offer you exact solution, but you can try and see if you can accomplish what you want with 'netsh' command line tool.
If you can, there is a chance that you can do the same with Windows API (or in the worst case, you might call 'netsh' from your program).
You'll probably need elevated rights to perform that.