<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ip change]]></title><description><![CDATA[<p>gibt es eine möglcihkeit in c++<br />
die ip zu ändern????</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/126386/ip-change</link><generator>RSS for Node</generator><lastBuildDate>Mon, 24 Aug 2026 17:45:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/126386.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Nov 2005 19:19:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ip change on Mon, 14 Nov 2005 19:19:55 GMT]]></title><description><![CDATA[<p>gibt es eine möglcihkeit in c++<br />
die ip zu ändern????</p>
]]></description><link>https://www.c-plusplus.net/forum/post/917734</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/917734</guid><dc:creator><![CDATA[ipman]]></dc:creator><pubDate>Mon, 14 Nov 2005 19:19:55 GMT</pubDate></item><item><title><![CDATA[Reply to Ip change on Mon, 14 Nov 2005 19:43:08 GMT]]></title><description><![CDATA[<p>ipman schrieb:</p>
<blockquote>
<p>gibt es eine möglcihkeit in c++<br />
die ip zu ändern????</p>
</blockquote>
<p>Welche? Die vom Mond?</p>
<p>Standard-C++ kennt weder Netzwerke noch IP-Adressen. Welches BS, welchen Compiler und welche Klassenbibliothek verwendest du?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/917756</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/917756</guid><dc:creator><![CDATA[HumeSikkins]]></dc:creator><pubDate>Mon, 14 Nov 2005 19:43:08 GMT</pubDate></item><item><title><![CDATA[Reply to Ip change on Mon, 14 Nov 2005 19:56:48 GMT]]></title><description><![CDATA[<p>WinAPI FORUM!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/917776</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/917776</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Mon, 14 Nov 2005 19:56:48 GMT</pubDate></item><item><title><![CDATA[Reply to Ip change on Mon, 14 Nov 2005 20:05:04 GMT]]></title><description><![CDATA[<p>Tc++H schrieb:</p>
<blockquote>
<p>WinAPI FORUM!!!</p>
</blockquote>
<p>Ich habe letztens von nem Freund einer Bekannten gehört, dass es angeblich noch andere Betriebsysteme außer Windows geben soll <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>Aus diesem Grund werde ich mit dem Verschieben noch warten, trotz deines Gebrülls <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/917790</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/917790</guid><dc:creator><![CDATA[HumeSikkins]]></dc:creator><pubDate>Mon, 14 Nov 2005 20:05:04 GMT</pubDate></item><item><title><![CDATA[Reply to Ip change on Tue, 15 Nov 2005 13:53:50 GMT]]></title><description><![CDATA[<p>Hier mal zwei Mezhoden aus der MSDN:</p>
<p>für(Windows)</p>
<pre><code class="language-cpp">DeleteIPAddress(ULONG NTEContext)

AddIPAdress( IPAddr Address,
  IPMask IpMask,
  DWORD IfIndex,
  PULONG NTEContext,
  PULONG NTEInstance)
</code></pre>
<pre><code class="language-cpp">// Before calling AddIPAddress we use GetIpAddrTable to get
// an adapter to which we can add the IP.
PMIB_IPADDRTABLE pIPAddrTable;
DWORD dwSize = 0;

pIPAddrTable = (MIB_IPADDRTABLE*) malloc( sizeof( MIB_IPADDRTABLE) );

// Make an initial call to GetIpAddrTable to get the
// necessary size into the dwSize variable
if (GetIpAddrTable(pIPAddrTable, &amp;dwSize, 0) == ERROR_INSUFFICIENT_BUFFER) {
  GlobalFree( pIPAddrTable );
  pIPAddrTable = (MIB_IPADDRTABLE *) malloc ( dwSize );
}

// Make a second call to GetIpAddrTable to get the
// actual data we want
if ( (dwRetVal = GetIpAddrTable( pIPAddrTable, &amp;dwSize, 0 )) == NO_ERROR ) { 
  printf(&quot;\tAddress: %ld\n&quot;, pIPAddrTable-&gt;table[0].dwAddr);
  printf(&quot;\tMask:    %ld\n&quot;, pIPAddrTable-&gt;table[0].dwMask);
  printf(&quot;\tIndex:   %ld\n&quot;, pIPAddrTable-&gt;table[0].dwIndex);
  printf(&quot;\tBCast:   %ld\n&quot;, pIPAddrTable-&gt;table[0].dwBCastAddr);
  printf(&quot;\tReasm:   %ld\n&quot;, pIPAddrTable-&gt;table[0].dwReasmSize);
}
else {
  printf(&quot;Call to GetIpAddrTable failed.\n&quot;);
}

// IP and mask we will be adding
UINT iaIPAddress;
UINT imIPMask;

iaIPAddress = inet_addr(&quot;192.168.0.27&quot;);
imIPMask = inet_addr(&quot;255.255.255.0&quot;);

// Variables where handles to the added IP will be returned
ULONG NTEContext = 0;
ULONG NTEInstance = 0;

if ( (dwRetVal = AddIPAddress(iaIPAddress, 
  imIPMask, 
  pIPAddrTable-&gt;table[0].dwIndex, 
  &amp;NTEContext, 
  &amp;NTEInstance) ) == NO_ERROR) {
  printf(&quot;\tIP address added.\n&quot;);
}

else {
  printf(&quot;Error adding IP address.\n&quot;);

  LPVOID lpMsgBuf;
  if (FormatMessage( 
    FORMAT_MESSAGE_ALLOCATE_BUFFER | 
    FORMAT_MESSAGE_FROM_SYSTEM | 
    FORMAT_MESSAGE_IGNORE_INSERTS,
    NULL,
    dwRetVal,
    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
    (LPTSTR) &amp;lpMsgBuf,
    0,
    NULL )) {
    printf(&quot;\tError: %s&quot;, lpMsgBuf);
  }
  LocalFree( lpMsgBuf );
}

// Delete the IP we just added using the NTEContext
// variable where the handle was returned	
if ((dwRetVal = DeleteIPAddress(NTEContext)) == NO_ERROR) {
  printf(&quot;\tIP Address Deleted.\n&quot;);
}
else {		
  printf(&quot;\tCall to DeleteIPAddress failed.\n&quot;);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/918498</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/918498</guid><dc:creator><![CDATA[Tc++H]]></dc:creator><pubDate>Tue, 15 Nov 2005 13:53:50 GMT</pubDate></item></channel></rss>