<?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[InternetReadFile - Dateie download]]></title><description><![CDATA[<p>Moin versuche ne Exe von meinem Webspace zu laden.<br />
Doch des klappt nicht so wie ich will.</p>
<pre><code class="language-cpp">if(InternetReadFile(hFile,buf,sizeof(buf),&amp;bytes) == TRUE)
fprintf(p,buf);
</code></pre>
<p>Doch in die Datei wird nur &quot;MZ~&quot; geschrieben.<br />
Was ist falsch?<br />
Der buffer ist nich zu klein.<br />
Kann andere Sachen auch laden wie Webseite <a href="http://www.google.de" rel="nofollow">www.google.de</a>.....</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/242176/internetreadfile-dateie-download</link><generator>RSS for Node</generator><lastBuildDate>Sun, 05 Apr 2026 15:40:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/242176.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 31 May 2009 16:20:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Sun, 31 May 2009 16:20:01 GMT]]></title><description><![CDATA[<p>Moin versuche ne Exe von meinem Webspace zu laden.<br />
Doch des klappt nicht so wie ich will.</p>
<pre><code class="language-cpp">if(InternetReadFile(hFile,buf,sizeof(buf),&amp;bytes) == TRUE)
fprintf(p,buf);
</code></pre>
<p>Doch in die Datei wird nur &quot;MZ~&quot; geschrieben.<br />
Was ist falsch?<br />
Der buffer ist nich zu klein.<br />
Kann andere Sachen auch laden wie Webseite <a href="http://www.google.de" rel="nofollow">www.google.de</a>.....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1718698</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1718698</guid><dc:creator><![CDATA[Win7]]></dc:creator><pubDate>Sun, 31 May 2009 16:20:01 GMT</pubDate></item><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Sun, 31 May 2009 22:11:48 GMT]]></title><description><![CDATA[<p>Habe des jetzt so Probiert:</p>
<pre><code class="language-cpp">hInet = InternetOpen(NULL, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0 ); 
hFile = InternetOpenUrl(hInet, &quot;http://www.google.de&quot;, NULL, 0, 0, 0);
InternetQueryDataAvailable(hFile,&amp;available,0,0);
printf(&quot;%d\n&quot;,available);

f = fopen(&quot;TEST.txt&quot;,&quot;w&quot;);

do {
	ptr = (char *)malloc(available);

InternetReadFile(hFile,&amp;ptr[0],(DWORD)&amp;available,&amp;bytes);
fputs(ptr,f);
}while(bytes &gt; 0);

}
</code></pre>
<p>Aber so bleibt die TEST.txt leer.<br />
Bin total am verzweifeln....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1718852</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1718852</guid><dc:creator><![CDATA[Win7]]></dc:creator><pubDate>Sun, 31 May 2009 22:11:48 GMT</pubDate></item><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Sun, 31 May 2009 22:17:27 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">if ( S_OK == URLDownloadToFile( NULL, &quot;http://www.google.de&quot;, &quot;test.txt&quot;, 0, NULL ) )
    ...
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1718854</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1718854</guid><dc:creator><![CDATA[Badestrand]]></dc:creator><pubDate>Sun, 31 May 2009 22:17:27 GMT</pubDate></item><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Mon, 01 Jun 2009 17:15:45 GMT]]></title><description><![CDATA[<p>Will es aber gerne mit InternetReadFile machen nicht mit URLDownloadFileTo.<br />
Vorallem URLDownloadFileTo klappt nicht mal</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1719197</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719197</guid><dc:creator><![CDATA[Win7]]></dc:creator><pubDate>Mon, 01 Jun 2009 17:15:45 GMT</pubDate></item><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Mon, 01 Jun 2009 17:22:53 GMT]]></title><description><![CDATA[<p>wb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1719200</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719200</guid><dc:creator><![CDATA[w =&amp;gt; wb]]></dc:creator><pubDate>Mon, 01 Jun 2009 17:22:53 GMT</pubDate></item><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Mon, 01 Jun 2009 17:58:45 GMT]]></title><description><![CDATA[<p>Wenn ich ne Textdatei lade läuft alles super aber bei ner Exe wird nur &quot;MZ~&quot; in die Datei geschrieben.<br />
-.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1719227</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719227</guid><dc:creator><![CDATA[Win7]]></dc:creator><pubDate>Mon, 01 Jun 2009 17:58:45 GMT</pubDate></item><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Mon, 01 Jun 2009 18:07:53 GMT]]></title><description><![CDATA[<p>auch nachdem du die änderung vorgenommen hast?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1719231</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719231</guid><dc:creator><![CDATA[w =&amp;gt; wb]]></dc:creator><pubDate>Mon, 01 Jun 2009 18:07:53 GMT</pubDate></item><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Mon, 01 Jun 2009 18:18:08 GMT]]></title><description><![CDATA[<p>Win7 schrieb:</p>
<blockquote>
<p>Wenn ich ne Textdatei lade läuft alles super aber bei ner Exe wird nur &quot;MZ~&quot; in die Datei geschrieben.<br />
-.-</p>
</blockquote>
<p>Weil in einer EXE-Datei das vierte Zeichen ein NULL-Zeichen ist und dieses bei einem String ein Abschlusszeichen ist.</p>
<p>Abhilfe: Daten binär schreiben (fwrite)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1719238</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719238</guid><dc:creator><![CDATA[sri]]></dc:creator><pubDate>Mon, 01 Jun 2009 18:18:08 GMT</pubDate></item><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Tue, 02 Jun 2009 06:59:46 GMT]]></title><description><![CDATA[<p>Win7 schrieb:</p>
<blockquote>
<p>Vorallem URLDownloadFileTo klappt nicht mal</p>
</blockquote>
<p>Türlich klappt's, wie kann man da überhaupt was falsch machen <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/1719392</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719392</guid><dc:creator><![CDATA[Badestrand]]></dc:creator><pubDate>Tue, 02 Jun 2009 06:59:46 GMT</pubDate></item><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Tue, 02 Jun 2009 07:29:11 GMT]]></title><description><![CDATA[<p>Nichtaufgelöstes externes Symbol... wetten...<br />
Jetzt ist aber Schluss <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1719411</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719411</guid><dc:creator><![CDATA[Kraboli]]></dc:creator><pubDate>Tue, 02 Jun 2009 07:29:11 GMT</pubDate></item><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Tue, 02 Jun 2009 09:38:55 GMT]]></title><description><![CDATA[<p>sri schrieb:</p>
<blockquote>
<p>Win7 schrieb:</p>
<blockquote>
<p>Wenn ich ne Textdatei lade läuft alles super aber bei ner Exe wird nur &quot;MZ~&quot; in die Datei geschrieben.<br />
-.-</p>
</blockquote>
<p>Weil in einer EXE-Datei das vierte Zeichen ein NULL-Zeichen ist und dieses bei einem String ein Abschlusszeichen ist.</p>
<p>Abhilfe: Daten binär schreiben (fwrite)</p>
</blockquote>
<p>Habe es jetzt mal mit WriteFile gemacht.<br />
Klappt aber auch nicht.<br />
-.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1719484</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719484</guid><dc:creator><![CDATA[Win7]]></dc:creator><pubDate>Tue, 02 Jun 2009 09:38:55 GMT</pubDate></item><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Tue, 02 Jun 2009 09:44:56 GMT]]></title><description><![CDATA[<p>Schade.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1719487</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719487</guid><dc:creator><![CDATA[sri]]></dc:creator><pubDate>Tue, 02 Jun 2009 09:44:56 GMT</pubDate></item><item><title><![CDATA[Reply to InternetReadFile - Dateie download on Tue, 02 Jun 2009 10:25:55 GMT]]></title><description><![CDATA[<p>Cool.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1719508</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1719508</guid><dc:creator><![CDATA[Grobian2]]></dc:creator><pubDate>Tue, 02 Jun 2009 10:25:55 GMT</pubDate></item></channel></rss>