<?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[Dateidownload]]></title><description><![CDATA[<p>Moin Moin.</p>
<p>Ich schreibe gerade an einem Download-Programm. Es funktioniert mittlerweile ganz gut, nur habe ich 2 kleine Probleme:</p>
<p>a)<br />
In einer while-Schleife werden immer 8192 Bytes von der Datei geladen und gespeichert. Während sich das Programm in dieser while-Schleife befindet, kann ich keinen einzigen Button anklicken. Ich würde aber gerne einen &quot;Download abbrechen&quot;-Button anbieten. Dafür muss ich ja sicher irgendwas in die while-Schleife einbauen, so dass die Buttons auf dem Form anklickbar sind, oder?</p>
<p>b)<br />
Ich habe ein 6Mbit-Leitung, aber wenn meine Berechnungen stimmen, komme ich nicht über 100KB/sec. Am Server liegt es nicht, denn der liefert die 6Mbit locker und auch meine Leitung müsste in Ordnung sein. Ich hab schon die Anzahl der eingelesenen Bytes schrittweise von 512 auf 1024...8192 erhöht, aber an der Geschwindigkeit scheint das nichts zu ändern? Hat zufällig jemand eine Idee, woran es liegen könnte?</p>
<p>Danke für Tipps.</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/156688/dateidownload</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Jul 2026 05:17:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/156688.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 19 Aug 2006 09:35:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dateidownload on Sat, 19 Aug 2006 09:35:33 GMT]]></title><description><![CDATA[<p>Moin Moin.</p>
<p>Ich schreibe gerade an einem Download-Programm. Es funktioniert mittlerweile ganz gut, nur habe ich 2 kleine Probleme:</p>
<p>a)<br />
In einer while-Schleife werden immer 8192 Bytes von der Datei geladen und gespeichert. Während sich das Programm in dieser while-Schleife befindet, kann ich keinen einzigen Button anklicken. Ich würde aber gerne einen &quot;Download abbrechen&quot;-Button anbieten. Dafür muss ich ja sicher irgendwas in die while-Schleife einbauen, so dass die Buttons auf dem Form anklickbar sind, oder?</p>
<p>b)<br />
Ich habe ein 6Mbit-Leitung, aber wenn meine Berechnungen stimmen, komme ich nicht über 100KB/sec. Am Server liegt es nicht, denn der liefert die 6Mbit locker und auch meine Leitung müsste in Ordnung sein. Ich hab schon die Anzahl der eingelesenen Bytes schrittweise von 512 auf 1024...8192 erhöht, aber an der Geschwindigkeit scheint das nichts zu ändern? Hat zufällig jemand eine Idee, woran es liegen könnte?</p>
<p>Danke für Tipps.</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120150</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120150</guid><dc:creator><![CDATA[Andreas1970]]></dc:creator><pubDate>Sat, 19 Aug 2006 09:35:33 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sat, 19 Aug 2006 09:56:46 GMT]]></title><description><![CDATA[<p>a) Threads...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120167</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120167</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sat, 19 Aug 2006 09:56:46 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sat, 19 Aug 2006 11:37:50 GMT]]></title><description><![CDATA[<p>b)</p>
<pre><code class="language-cpp">MSG message;
if(::PeekMessage(&amp;message,NULL,0,0,PM_REMOVE))
{
::TranslateMessage(&amp;message);
::DispatchMessage(&amp;message);
}
</code></pre>
<p>Die Nachrichtenschleife einfach selber mit implementieren an der Stelle.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120221</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120221</guid><dc:creator><![CDATA[Pellaeon]]></dc:creator><pubDate>Sat, 19 Aug 2006 11:37:50 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sat, 19 Aug 2006 13:40:43 GMT]]></title><description><![CDATA[<p>@(D)Evil:</p>
<p>Ich hab noch nie mit Threads gearbeitet, hab mir aber einiges gebastelt:</p>
<pre><code class="language-cpp">UINT myProc( LPVOID pvParam )
{
  CDialogDlg* pDlg = (CDialogDlg*) pvParam;

  // HIER

  m_VariCopy = pDlg-&gt;m_Vari;  // m_Vari ist aus dem Hauptdialog
  pDlg-&gt;MessageBox(m_VariCopy);
  [. . . .]

  return 0;
}

void CDialogDlg::OnBnClickedButton2()
{
	AfxBeginThread(myProc,this,THREAD_PRIORITY_NORMAL,0,0,NULL);
}
</code></pre>
<p>Problem ist nun, dass <strong>m_Vari</strong> bzw. <strong>m_VariCopy</strong> nicht aktualisiert ist. Also brauche ich an der &quot;HIER&quot;-Stelle ein <strong>UpdateData()</strong>.</p>
<p>Nehme ich</p>
<pre><code class="language-cpp">UpdateData(TRUE);
</code></pre>
<p>kommt &quot;error C3861: 'UpdateData': identifier not found, even with argument-dependent lookup&quot;</p>
<p>Nehme ich</p>
<pre><code class="language-cpp">pDlg-&gt;UpdateData(TRUE);
</code></pre>
<p>wird zwar kompiliert, aber drücke ich Button2, bekomme ich einen &quot;Debug Assertion Failed!&quot; in wincore.cpp</p>
<p>Was mache ich falsch? Wie muss ich UpdateData aufrufen?</p>
<p>Danke.</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120294</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120294</guid><dc:creator><![CDATA[Andreas1970]]></dc:creator><pubDate>Sat, 19 Aug 2006 13:40:43 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sat, 19 Aug 2006 13:45:17 GMT]]></title><description><![CDATA[<p>Ach, bin ich dämlich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/26a0.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--warning"
      title=":warning:"
      alt="⚠"
    /></p>
<p>Ich mache einfach ein UpdateData(TRUE); in OnBnClickedButton2()</p>
<p>*kopfaufdietischplattehau*</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120297</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120297</guid><dc:creator><![CDATA[Andreas1970]]></dc:creator><pubDate>Sat, 19 Aug 2006 13:45:17 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sat, 19 Aug 2006 15:23:45 GMT]]></title><description><![CDATA[<p>Mist. Ich brauche in</p>
<pre><code class="language-cpp">UINT myProc( LPVOID pvParam )
{
  [. . . .]
}
</code></pre>
<p>ein UpdateData(FALSE), um einen Fortschrittbalken zu aktualisieren. Also benötige ich doch noch einmal Hilfe.</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120349</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120349</guid><dc:creator><![CDATA[Andreas1970]]></dc:creator><pubDate>Sat, 19 Aug 2006 15:23:45 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sat, 19 Aug 2006 15:36:33 GMT]]></title><description><![CDATA[<p>Hmm... wenn de auf Variablen von Klassen aus Threads zugreifen willst, arbeitet man nahezu AUSSCHLIEßLICH mit Pointern <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>
<p>und UpdateData wird da so nicht gehen... m_VariCopy (wenn es wirklich eine Membervariable von CDialogDlg) ist auch nicht <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/1120357</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120357</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sat, 19 Aug 2006 15:36:33 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sat, 19 Aug 2006 17:11:31 GMT]]></title><description><![CDATA[<p>Also dass das mit m_VariCopy definitiv funktioniert, kann ich garantieren. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>Die Frage ist halt nur: wie bekomme ich UpdateData() ausgeführt??</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120416</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120416</guid><dc:creator><![CDATA[Andreas1970]]></dc:creator><pubDate>Sat, 19 Aug 2006 17:11:31 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sat, 19 Aug 2006 19:10:11 GMT]]></title><description><![CDATA[<p>Wieso holst du dir nicht einfach einen CWnd Pointer und rufst die entsprechenden Funktionen auf, so wie es sich gehört?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120546</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120546</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sat, 19 Aug 2006 19:10:11 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sat, 19 Aug 2006 22:07:57 GMT]]></title><description><![CDATA[<p>Dass ich nicht gerade ein Experte in C++ bin, hatte ich wohl vergessen zu sagen, oder? <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>
<p>(kleinlaut) Irgendwelche Codefragmente, die mir auf die Sprünge helfen könnten?</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120647</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120647</guid><dc:creator><![CDATA[Andreas1970]]></dc:creator><pubDate>Sat, 19 Aug 2006 22:07:57 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sat, 19 Aug 2006 22:25:53 GMT]]></title><description><![CDATA[<p>Was willst du denn machen? die Position deiner Progressbar nach vorne setzen?</p>
<pre><code class="language-cpp">CProgressCtrl* pProgressCtrl = (CProgressCtrl*)GetDlgItem(IDC_MYEDITCTRL);

if (!pProgressCtrl)
    return 0;

int nPos = pProgressCtrl-&gt;GetPos();
pProgressCtrl-&gt;SetPos(++nPos);
</code></pre>
<p>So in etwa...</p>
<p><strong>Referenzen:</strong><br />
<a href="http://msdn2.microsoft.com/en-us/library/wc8dtx3y.aspx" rel="nofollow">CProgressCtrl Memberfunctions</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120654</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120654</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sat, 19 Aug 2006 22:25:53 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sun, 20 Aug 2006 06:35:48 GMT]]></title><description><![CDATA[<p>Auch. Aber ich habe aber gemerkt, dass die Aktualisierung unabhängig von UpdateData() gemacht wird.</p>
<p>Ich habe allerdings noch einen Text, der mehrmals aktualisiert werden muss. Und dafür brauche ich UpdateData().</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120702</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120702</guid><dc:creator><![CDATA[Andreas1970]]></dc:creator><pubDate>Sun, 20 Aug 2006 06:35:48 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sun, 20 Aug 2006 11:22:26 GMT]]></title><description><![CDATA[<p>Man braucht UpdateData eigentlich NIE!. Ruf einfach mehrmals SetWindowText auf... fertig -.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120811</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120811</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Sun, 20 Aug 2006 11:22:26 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Sun, 20 Aug 2006 13:50:17 GMT]]></title><description><![CDATA[<p>Ja, super! Vielen, vielen Dank! <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="🙂"
    /></p>
<p>Jetzt muss ich nur noch herausfinden, wieso der Download so langsam ist.</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1120913</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1120913</guid><dc:creator><![CDATA[Andreas1970]]></dc:creator><pubDate>Sun, 20 Aug 2006 13:50:17 GMT</pubDate></item><item><title><![CDATA[Reply to Dateidownload on Mon, 21 Aug 2006 06:33:45 GMT]]></title><description><![CDATA[<p>Falls es jemanden interessiert: es lag wirklich an dem zu kleinen Lese-Puffer.</p>
<p>Ob 512...8192 hat nichts ausgemacht, aber nachdem ich den Puffer auf 81920 setzte, hatte ich meine 600kb/s <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>Also statt</p>
<pre><code class="language-cpp">[...]
char strbuf[512];
[...]
while(bytesread=fTargetFile-&gt;Read(strbuf,512))
{
 [...]
}
[...]
</code></pre>
<p>einfach</p>
<pre><code class="language-cpp">[...]
char strbuf[81920];
[...]
while(bytesread=fTargetFile-&gt;Read(strbuf,81920))
{
 [...]
}
[...]
</code></pre>
<p>Quelle: <a href="http://www.codeproject.com/Purgatory/Download_file_from_net.asp" rel="nofollow">http://www.codeproject.com/Purgatory/Download_file_from_net.asp</a><br />
-&gt; Download_file_from_net_demo - Download files from internet</p>
<p><strong>Danke noch einmal an (D)Evil</strong></p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1121219</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1121219</guid><dc:creator><![CDATA[Andreas1970]]></dc:creator><pubDate>Mon, 21 Aug 2006 06:33:45 GMT</pubDate></item></channel></rss>