Hi,
You can use
commands in the Netsh Interface IP context to configure the TCP/IP protocol (including addresses, default gateways, DNS servers, and WINS servers) and to display configuration and statistical information.
You can run these commands from the Windows Server 2003 family command prompt or from the command prompt for the Netsh interface IP context. For these commands to work at the Windows Server 2003 family command prompt, you must type
netsh interface ip before typing commands and parameters as they appear in the syntax below. There might be functional differences between Netsh context commands on Windows 2000 and the Windows Server 2003 family.For more information
on Netsh, see Netsh overview and
Enter a netsh context.
Here are some other methods which might be helpful to solve your question.
First,use the WSAIoctl function
,which is used to set or retrieve operating parameters associated with the socket, the transport protocol, or the communications subsystem or the
hostent structure ,which is used by functions to store information about a given host, such as host name, IPv4 address, and so forth to get the NIC address message.
Then,eidt registry and call DhcpNotifyConfigChange to notify change.
Best Regards.
Jane Wang
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.