<?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[WAN IP Funktion]]></title><description><![CDATA[<p>Hi, da das alte Topic bei mir nicht mehr angezeigt werden kann (Bug), musste ich ein neues aufmachen ._.</p>
<pre><code class="language-cpp">int wan_ip(char IP[]) {
	char buffer[4096];
	char content[4096];
	HINTERNET hNet, hFile;
	DWORD br;
	hNet = InternetOpen(&quot;R.O.S.E&quot;, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
	if(hNet == NULL) {
		IP = &quot;0.0.0.0&quot;;
		return 1;
	}
	hFile = InternetOpenUrl(hNet, &quot;http://checkip.dyndns.org&quot;, NULL, 0, INTERNET_FLAG_RELOAD, NULL);
	do {
		InternetReadFile(hFile, (char *)buffer, sizeof(buffer) - 1, &amp;br);
		printf(&quot;\n%s\n&quot;, buffer);
	} while(br != 0);
	printf(&quot;%s&quot;, content);
        return 0;
}
</code></pre>
<p>Das funktioniert bei mir nicht, ich verstehe auch nicht, wie man es richtig macht ..</p>
<p>Ich kann mir denken, dass ich mit der wan-ip nerve, aber wenn mir jemand bitte helfen würde, wäre ich ruhig <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/184850/wan-ip-funktion</link><generator>RSS for Node</generator><lastBuildDate>Sun, 05 Jul 2026 17:08:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/184850.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 19 Jun 2007 18:52:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WAN IP Funktion on Tue, 19 Jun 2007 18:52:23 GMT]]></title><description><![CDATA[<p>Hi, da das alte Topic bei mir nicht mehr angezeigt werden kann (Bug), musste ich ein neues aufmachen ._.</p>
<pre><code class="language-cpp">int wan_ip(char IP[]) {
	char buffer[4096];
	char content[4096];
	HINTERNET hNet, hFile;
	DWORD br;
	hNet = InternetOpen(&quot;R.O.S.E&quot;, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
	if(hNet == NULL) {
		IP = &quot;0.0.0.0&quot;;
		return 1;
	}
	hFile = InternetOpenUrl(hNet, &quot;http://checkip.dyndns.org&quot;, NULL, 0, INTERNET_FLAG_RELOAD, NULL);
	do {
		InternetReadFile(hFile, (char *)buffer, sizeof(buffer) - 1, &amp;br);
		printf(&quot;\n%s\n&quot;, buffer);
	} while(br != 0);
	printf(&quot;%s&quot;, content);
        return 0;
}
</code></pre>
<p>Das funktioniert bei mir nicht, ich verstehe auch nicht, wie man es richtig macht ..</p>
<p>Ich kann mir denken, dass ich mit der wan-ip nerve, aber wenn mir jemand bitte helfen würde, wäre ich ruhig <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309356</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309356</guid><dc:creator><![CDATA[wip]]></dc:creator><pubDate>Tue, 19 Jun 2007 18:52:23 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Tue, 19 Jun 2007 19:28:06 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">(...)
 do {

  memset (&amp;buffer,0x00,sizeof(buffer)); // &lt;- !!!!!!!!!!!!!!!!!!!

  InternetReadFile(hFile, (char *)buffer, sizeof(buffer) - 1, &amp;br);
  printf(&quot;\n%s\n&quot;, buffer);

 } while(br != 0);
(...)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1309383</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309383</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 19 Jun 2007 19:28:06 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Tue, 19 Jun 2007 21:10:44 GMT]]></title><description><![CDATA[<p>Danke, aber es funktioniert trotzdem nicht.. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309451</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309451</guid><dc:creator><![CDATA[wip]]></dc:creator><pubDate>Tue, 19 Jun 2007 21:10:44 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Tue, 19 Jun 2007 21:23:00 GMT]]></title><description><![CDATA[<p>Der Code oben enthält keine groben Fehler. Der &quot;funzt&quot;.<br />
Poste mal wie und wo Du &quot;wan_ip ( char IP[] )&quot; aufrufst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309459</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309459</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 19 Jun 2007 21:23:00 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Tue, 19 Jun 2007 21:26:29 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">char buffer[0x1000];
wan_ip(buffer);
</code></pre>
<p>Ich hoffe doch, dass jetzt nicht kommt: &quot;Ohh, du Affe, das kann auch gar nicht funktionieren...&quot;.<br />
Obwohl ich es mir denken kann &gt;_&gt;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309462</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309462</guid><dc:creator><![CDATA[wip]]></dc:creator><pubDate>Tue, 19 Jun 2007 21:26:29 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Tue, 19 Jun 2007 21:37:37 GMT]]></title><description><![CDATA[<p>Du übergibst eine Variable an &quot;wan_ip ()&quot; aber machst damit in der Funktion (fast) nichts. Funktioniert die printf-Ausgabe in &quot;wan_ip ()&quot;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309465</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309465</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 19 Jun 2007 21:37:37 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Tue, 19 Jun 2007 21:39:02 GMT]]></title><description><![CDATA[<p>nein....<br />
Da kommen nur so ASCII-Zeichen, die bei leerem Speicher oder bei einer Speicher-Verletzung auftreten usw..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309466</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309466</guid><dc:creator><![CDATA[wip]]></dc:creator><pubDate>Tue, 19 Jun 2007 21:39:02 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Tue, 19 Jun 2007 21:57:16 GMT]]></title><description><![CDATA[<p>Bau mal &quot;Debug-Ausgaben&quot; in die Funktion und poste die Ausgabe :</p>
<pre><code class="language-cpp">(...)
 hNet = InternetOpen(&quot;R.O.S.E&quot;, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
 printf(&quot;hNet = %X \n&quot;,hNet); // DEBUG
(...)
 hFile = InternetOpenUrl(hNet, &quot;http://checkip.dyndns.org&quot;, NULL, 0, INTERNET_FLAG_RELOAD, NULL);
 printf(&quot;hFile = %X \n&quot;,hFile); // DEBUG
(...)
// printf(&quot;%s&quot;, content); // &lt;- den raus !
(...)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1309475</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309475</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 19 Jun 2007 21:57:16 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Tue, 19 Jun 2007 21:57:17 GMT]]></title><description><![CDATA[<p>warum überprüfst du die rückgabewerte der einzelnen funktionen nicht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309476</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309476</guid><dc:creator><![CDATA[hmmmmmmmmmmm]]></dc:creator><pubDate>Tue, 19 Jun 2007 21:57:17 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Wed, 20 Jun 2007 08:53:02 GMT]]></title><description><![CDATA[<blockquote>
<p>hFile 0x00000000 void *<br />
hNet 0x00cc0004 void *</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1309705</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309705</guid><dc:creator><![CDATA[wip]]></dc:creator><pubDate>Wed, 20 Jun 2007 08:53:02 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Wed, 20 Jun 2007 11:23:30 GMT]]></title><description><![CDATA[<p>GetLastError() ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309797</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309797</guid><dc:creator><![CDATA[merker2]]></dc:creator><pubDate>Wed, 20 Jun 2007 11:23:30 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Wed, 20 Jun 2007 13:09:51 GMT]]></title><description><![CDATA[<p>wip schrieb:</p>
<blockquote>
<p>hFile 0x00000000 void *<br />
hNet 0x00cc0004 void *</p>
</blockquote>
<p>Oha. Der Aufruf von &quot;InternetOpenUrl ()&quot; ging schief (weil hFile = 0).<br />
Also rausfinden, was schief gelaufen ist. Dazu kann man GetLastError () nehmen. Poste mal die Ausgabe :</p>
<pre><code class="language-cpp">(...)
 hFile = InternetOpenUrl(hNet, &quot;http://checkip.dyndns.org&quot;, NULL, 0, INTERNET_FLAG_RELOAD, NULL);
// printf(&quot;hFile = %X \n&quot;,hFile); // DEBUG
printf(&quot;GetLastError () = %i \n&quot;, GetLastError ()); // DEBUG
(...)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1309914</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309914</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 20 Jun 2007 13:09:51 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Wed, 20 Jun 2007 13:11:36 GMT]]></title><description><![CDATA[<p>Dein Internet ist kaputt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1309915</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309915</guid><dc:creator><![CDATA[helper]]></dc:creator><pubDate>Wed, 20 Jun 2007 13:11:36 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Wed, 20 Jun 2007 14:01:10 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">HINTERNET hNet, hFile;
hNet = InternetOpen(&quot;&quot;, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
printf(&quot;hNet = %X&quot;, hNet);
hFile = InternetOpenUrl(hNet, &quot;http://checkip.dyndns.org&quot;, NULL, 0, INTERNET_FLAG_RELOAD, NULL);
printf(&quot;hFile = %X&quot;, hFile);
printf(&quot;GetLastError () = %i \n&quot;, GetLastError ());
</code></pre>
<blockquote>
<p>hNet = CC0004<br />
hFile = 0<br />
GetLastError () = 12006</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1309950</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1309950</guid><dc:creator><![CDATA[wip]]></dc:creator><pubDate>Wed, 20 Jun 2007 14:01:10 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Wed, 20 Jun 2007 16:42:37 GMT]]></title><description><![CDATA[<blockquote>
<p>GetLastError () = <strong>12006</strong></p>
<p><strong>12006</strong> ERROR_INTERNET_UNRECOGNIZED_SCHEME : Das URL-Schema wurde nicht erkannt oder wird nicht unterstützt.</p>
</blockquote>
<p>Soll heissen, dass irgendwas an der Syntax der URL von &quot;<a href="http://checkip.dyndns.org" rel="nofollow">http://checkip.dyndns.org</a>&quot; nicht stimmt. Aber was ?</p>
<p>Probier mal so : &quot;<a href="http://checkip.dyndns.org/" rel="nofollow">http://checkip.dyndns.org/</a>&quot;.</p>
<p>Funktioniert wenigstens &quot;<a href="http://www.google.com/" rel="nofollow">http://www.google.com/</a>&quot; ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1310095</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1310095</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 20 Jun 2007 16:42:37 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Wed, 20 Jun 2007 17:30:14 GMT]]></title><description><![CDATA[<p>Es funktioiert gar nichts bei dem InternetOpenUrl.</p>
<p>In C++ funktioniert es irgendwie mit</p>
<pre><code class="language-cpp">const std::basic_string&lt;TCHAR&gt;&amp; url
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1310126</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1310126</guid><dc:creator><![CDATA[wip]]></dc:creator><pubDate>Wed, 20 Jun 2007 17:30:14 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Wed, 20 Jun 2007 17:52:47 GMT]]></title><description><![CDATA[<p>poste mal ein vollständiges beispiel mit main...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1310145</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1310145</guid><dc:creator><![CDATA[main]]></dc:creator><pubDate>Wed, 20 Jun 2007 17:52:47 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Wed, 20 Jun 2007 18:24:43 GMT]]></title><description><![CDATA[<p>Ev. UNICODE eingeschaltet ? Probier dann so :</p>
<pre><code class="language-cpp">(...)
hFile = InternetOpenUrlW (hNet, L&quot;http://checkip.dyndns.org&quot;, NULL, 0, INTERNET_FLAG_RELOAD, NULL);
(...)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1310153</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1310153</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 20 Jun 2007 18:24:43 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Wed, 20 Jun 2007 21:35:03 GMT]]></title><description><![CDATA[<p>Ja, bin ich blöd ^^</p>
<p>Bei anderen Codes stand auch ein L<br />
aber ich wusste nicht so genau, dass das so relevant ist, weil ich auch nicht genau wusste, was das L heißt.<br />
Jetzt geht es danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
danke euch allen <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/1310263</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1310263</guid><dc:creator><![CDATA[wip]]></dc:creator><pubDate>Wed, 20 Jun 2007 21:35:03 GMT</pubDate></item><item><title><![CDATA[Reply to WAN IP Funktion on Wed, 20 Jun 2007 21:36:36 GMT]]></title><description><![CDATA[<p>das hätte doch aber einen compiler-fehler geben müssen????????</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1310267</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1310267</guid><dc:creator><![CDATA[????????????]]></dc:creator><pubDate>Wed, 20 Jun 2007 21:36:36 GMT</pubDate></item></channel></rss>