title: Change IP settings using C++
body: <p>How do I change the IP settings of a Windows CE 6 box Programatically via C++? Functions for Windows might also work.</p>
  <p>I found that I can change the hostname via <a href="http://msdn.microsoft.com/en-us/library/ee493673.aspx" rel="nofollow noreferrer">sethostname</a> but couldn't find how to change IP address settings such as:</p>
  <ul>
  <li>IP Address</li>
  <li>DHCP</li>
  <li>Subnet</li>
  <li>Gateway</li>
  <li>DNS1 / DNS2</li>
  <li>WINS1 / WINS2</li>
  </ul>
  <p>Any advice / pointers would be great.
  Thanks.</p>
  <p>P.s. How would you get the box to update to those settings - is a refresh or the programming equivalent of <code>ipconfig /renew</code> required?</p>