w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Using the iphlpapi.dll in .Net to Add new IP Addresses on x64 machines

As noted, AddIPAddress and all of iphlpapi.dll show and control the dynamic configuration, which doesn't get persisted.

You can set the static persisted configuration, which would show up in the TCP/IP settings dialogs, using netsh - run netsh interface ipv4 set /? to see how. It's programmatically accessible via the INetCfg interface, but I think some of it is undocumented.

The WMI interfaces are wrappers which mix stuff from both sources, which is why I recommend against using them (as you've noticed, they won't configure disconnected NICs).

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.