How to tell a network interface to use DHCP programmically?

Unanswered How to tell a network interface to use DHCP programmically?

All Replies

  • Sunday, February 17, 2013 11:07 PM
     
     

    You want the IP Helper API.   SetUnicastIpAddressFunction.

  • Sunday, February 17, 2013 11:34 PM
     
     
    I think you mean SetUnicastIpAddressEntry. However, could you give me a little example of using this function? I've examined it before, but I couldn't get how to do it. As I can see it takes Address and OnLinkPrefixLength, which together form a concrete IP address. So it's suitable to give an interface a known IP, but what should I do with MIB_UNICASTIPADDRESS_ROW members to command an interface to get an IP from a DHCP?
  • Monday, February 18, 2013 8:26 AM
     
     

    Hello,
    Welcome here.
    Based on your description, I’d like to move this thread to a more appropriate forum: Windows Desktop SDK.
    Thanks for your understanding.

    Regards,


    Elegentin Xie
    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.