How can I configurate the ip for NIC without WMI,IP Helper RRS feed

  • 问题

  • Now,I  should make a function to  configurate the  IP , and I don't want to use the WMI and ip helper.

    Who know that the other ways to configurate the ip ,such as some com interfaces??


    2013年8月8日 2:18


  • 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.

    2013年8月9日 5:50