问题
I would like to use WMI (in C++) to configure a static IPv6 address.
Configuring a static IPv4 address is working fine using EnableStatic
, which is part of a WMI class named Win32_NetworkAdapterConfiguration
.
Can anyone help me configure an IPv6 address using WMI? I have been looking for example code, but have not found any.
回答1:
No.
According to the Win32_NetworkAdapterConfiguration documentation on the MSDN web site, this API supports limited IPv6 functionality (looks like it's limited to just reading addresses on an interface) starting in Windows Vista.
You might also want to look at this article: IPv6 and IPv4 Support in WMI.
来源:https://stackoverflow.com/questions/3360230/can-i-use-enablestatic-for-configuring-an-ipv6-addres-using-wmi