<?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[FTP-Client und nicht aufgelöstes externes Symbol]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich schreibe grad aus Petzold's den FTP-Clienten und hab jetzt diese doofen nicht aufgelösten externen Symbole. Im Buch steht nicht, das ich irgendwas besonderes linken oder so muss.</p>
<p>Hier der betreffende Code:</p>
<pre><code class="language-cpp">//FtpThread: Liest Dateien von FTP-Server und kopiert sie auf lokalen Datenträger
void FtpThread(PVOID parg)
{
	BOOL			bSuccess;
	HINTERNET		hIntSession, hFtpSession, hFind;
	HWND			hwndStatus, hwndButton;
	PARAMS			*pparams;
	TCHAR			szBuffer[64];
	WIN32_FIND_DATA	finddata;

	pparams = parg;
	hwndStatus = GetDlgItem(pparams-&gt;hwnd, IDC_STATUS);
	hwndButton = GetDlgItem(pparams-&gt;hwnd, IDCANCEL);

	//Internet-Sitzung anlegen
	hIntSession = InternetOpen(szAppName, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0) ;

	if(hIntSession == NULL)
	{
		wsprintf(szBuffer, TEXT(&quot;InternetOpen: Fehler %i&quot;), GetLastError());
		ButtonSwitch(hwndStatus, hwndButton, szBuffer);
		_endthread();
	}

	SetWindowText(hwndStatus, TEXT(&quot;Internet-Sitzung eröffnet...&quot;));

	//Hat der Besitzer &quot;Abbrechen&quot; geklickt?
	if(!pparams-&gt;bContinue)
	{
		InternetCloseHandle(hIntSession);
		ButtonSwitch(hwndStatus, hwndButton, NULL);
		_endthread();
	}

	//FTP-Sitzung anlegen
	hFtpSession = InternetConnect(hIntSession, FTPSERVER, INTERNET_DEFAULT_FTP_PORT, NULL, NULL, INTERNET_SERVICE_FTP,
									0, 0);
	if(hFtpSession == NULL)
	{
		InternetCloseHandle(hIntSession);
		wsprintf(szBuffer, TEXT(&quot;InternetConnect: Fehler %i&quot;, GetLastError()));
		ButtonSwitch(hwndStatus, hwndButton, NULL);
		_endthread();
	}

	SetWindowText(hwndStatus, TEXT(&quot;FTP-Sitzung eröffnet...&quot;));

	//Hat der Besitzer &quot;Abbrechen&quot; geklickt?
	if(!pparams-&gt;bContinue)
	{
		InternetCloseHandle(hFtpSession);
		InternetCloseHandle(hIntSession);
		ButtonSwitch(hwndStatus, hwndButton, NULL);
		_endthread();
	}

	//FTP-Verzeichnis wählen
	bSuccess = FtpSetCurrentDirectory(hFtpSession, DIRECTORY);

	if(!bSuccess)
	{
		InternetCloseHandle(hFtpSession);
		InternetCloseHandle(hIntSession);
		wsprintf(szBuffer, TEXT(&quot;Fehler beim Wechsel ins FTP-Verzeicnis %s&quot;), DIRECTORY);
		ButtonSwitch(hwndStatus, hwndButton, NULL);
		_endthread();
	}

	SetWindowText(hwndStatus, TEXT(&quot;Verzeichnis gefunden...&quot;));

	//Hat Benutzer &quot;Abbrechen&quot; geklickt?
	if(!pparams-&gt;bContinue)
	{
		InternetCloseHandle(hFtpSession);
		InternetCloseHandle(hIntSession);
		ButtonSwitch(hwndStatus, hwndButton, NULL);
		_endthread();
	}

	//Erste Datei lesen, die ins Suchmuster passt
	hFind = FtpFindFirstFile(hFtpSession, TEMPLATE, &amp;finddata, 0, 0);

	if(hFind == NULL)
	{
		InternetCloseHandle(hFtpSession);
		InternetCloseHandle(hIntSession);
		ButtonSwitch(hwndStatus, hwndButton, TEXT(&quot;Datei(en) nicht gefunden&quot;));
		_endthread();
	}

	do
	{
		if(!pparams-&gt;bContinue)		//&quot;Abbrechen&quot;
		{
			InternetCloseHandle(hFind);
			InternetCloseHandle(hFtpSession);
			InternetCloseHandle(hIntSession);
			ButtonSwitch(hwndStatus, hwndButton, NULL);
			_endthread();
		}

		//Datei vom FTP-Server auf den lokalen Datenträger kopieren - aber nur, wenn sie dort noch nicht existiert
		wsprintf(szBuffer, TEXT(&quot;Lese Date $s...&quot;), finddata.cFileName, TRUE, FILE_ATTRIBUTE_NORMAL, 
					FTP_TRANSFER_TYPE_BINARY, 0);
	}
	while(InternetFindNextFile(hFind, &amp;finddata));

	InternetCloseHandle(hFind);
	InternetCloseHandle(hFtpSession);
	InternetCloseHandle(hIntSession);

	ButtonSwitch(hwndStatus, hwndButton, TEXT(&quot;Download aus dem Internet beendet&quot;));
}
</code></pre>
<p>und hier die Fehlermeldung:</p>
<pre><code>SmashFTP error LNK2019: Nicht aufgeloestes externes Symbol __imp__FtpSetCurrentDirectoryA@8, verwiesen in Funktion _FtpThread
SmashFTP error LNK2019: Nicht aufgeloestes externes Symbol __imp__FtpFindFirstFileA@20, verwiesen in Funktion _FtpThread
SmashFTP error LNK2019: Nicht aufgeloestes externes Symbol __imp__InternetCloseHandle@4, verwiesen in Funktion _FtpThread
SmashFTP error LNK2019: Nicht aufgeloestes externes Symbol __imp__InternetConnectA@32, verwiesen in Funktion _FtpThread
SmashFTP error LNK2019: Nicht aufgeloestes externes Symbol __imp__InternetFindNextFileA@8, verwiesen in Funktion _FtpThread
SmashFTP error LNK2019: Nicht aufgeloestes externes Symbol __imp__InternetOpenA@20, verwiesen in Funktion _FtpThread
SmashFTP fatal error LNK1120: 6 unaufgeloeste externe Verweise
</code></pre>
<p>Danke schonmal für eure Hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/123381/ftp-client-und-nicht-aufgelöstes-externes-symbol</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Jul 2026 20:04:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/123381.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 16 Oct 2005 09:48:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to FTP-Client und nicht aufgelöstes externes Symbol on Sun, 16 Oct 2005 09:48:15 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich schreibe grad aus Petzold's den FTP-Clienten und hab jetzt diese doofen nicht aufgelösten externen Symbole. Im Buch steht nicht, das ich irgendwas besonderes linken oder so muss.</p>
<p>Hier der betreffende Code:</p>
<pre><code class="language-cpp">//FtpThread: Liest Dateien von FTP-Server und kopiert sie auf lokalen Datenträger
void FtpThread(PVOID parg)
{
	BOOL			bSuccess;
	HINTERNET		hIntSession, hFtpSession, hFind;
	HWND			hwndStatus, hwndButton;
	PARAMS			*pparams;
	TCHAR			szBuffer[64];
	WIN32_FIND_DATA	finddata;

	pparams = parg;
	hwndStatus = GetDlgItem(pparams-&gt;hwnd, IDC_STATUS);
	hwndButton = GetDlgItem(pparams-&gt;hwnd, IDCANCEL);

	//Internet-Sitzung anlegen
	hIntSession = InternetOpen(szAppName, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0) ;

	if(hIntSession == NULL)
	{
		wsprintf(szBuffer, TEXT(&quot;InternetOpen: Fehler %i&quot;), GetLastError());
		ButtonSwitch(hwndStatus, hwndButton, szBuffer);
		_endthread();
	}

	SetWindowText(hwndStatus, TEXT(&quot;Internet-Sitzung eröffnet...&quot;));

	//Hat der Besitzer &quot;Abbrechen&quot; geklickt?
	if(!pparams-&gt;bContinue)
	{
		InternetCloseHandle(hIntSession);
		ButtonSwitch(hwndStatus, hwndButton, NULL);
		_endthread();
	}

	//FTP-Sitzung anlegen
	hFtpSession = InternetConnect(hIntSession, FTPSERVER, INTERNET_DEFAULT_FTP_PORT, NULL, NULL, INTERNET_SERVICE_FTP,
									0, 0);
	if(hFtpSession == NULL)
	{
		InternetCloseHandle(hIntSession);
		wsprintf(szBuffer, TEXT(&quot;InternetConnect: Fehler %i&quot;, GetLastError()));
		ButtonSwitch(hwndStatus, hwndButton, NULL);
		_endthread();
	}

	SetWindowText(hwndStatus, TEXT(&quot;FTP-Sitzung eröffnet...&quot;));

	//Hat der Besitzer &quot;Abbrechen&quot; geklickt?
	if(!pparams-&gt;bContinue)
	{
		InternetCloseHandle(hFtpSession);
		InternetCloseHandle(hIntSession);
		ButtonSwitch(hwndStatus, hwndButton, NULL);
		_endthread();
	}

	//FTP-Verzeichnis wählen
	bSuccess = FtpSetCurrentDirectory(hFtpSession, DIRECTORY);

	if(!bSuccess)
	{
		InternetCloseHandle(hFtpSession);
		InternetCloseHandle(hIntSession);
		wsprintf(szBuffer, TEXT(&quot;Fehler beim Wechsel ins FTP-Verzeicnis %s&quot;), DIRECTORY);
		ButtonSwitch(hwndStatus, hwndButton, NULL);
		_endthread();
	}

	SetWindowText(hwndStatus, TEXT(&quot;Verzeichnis gefunden...&quot;));

	//Hat Benutzer &quot;Abbrechen&quot; geklickt?
	if(!pparams-&gt;bContinue)
	{
		InternetCloseHandle(hFtpSession);
		InternetCloseHandle(hIntSession);
		ButtonSwitch(hwndStatus, hwndButton, NULL);
		_endthread();
	}

	//Erste Datei lesen, die ins Suchmuster passt
	hFind = FtpFindFirstFile(hFtpSession, TEMPLATE, &amp;finddata, 0, 0);

	if(hFind == NULL)
	{
		InternetCloseHandle(hFtpSession);
		InternetCloseHandle(hIntSession);
		ButtonSwitch(hwndStatus, hwndButton, TEXT(&quot;Datei(en) nicht gefunden&quot;));
		_endthread();
	}

	do
	{
		if(!pparams-&gt;bContinue)		//&quot;Abbrechen&quot;
		{
			InternetCloseHandle(hFind);
			InternetCloseHandle(hFtpSession);
			InternetCloseHandle(hIntSession);
			ButtonSwitch(hwndStatus, hwndButton, NULL);
			_endthread();
		}

		//Datei vom FTP-Server auf den lokalen Datenträger kopieren - aber nur, wenn sie dort noch nicht existiert
		wsprintf(szBuffer, TEXT(&quot;Lese Date $s...&quot;), finddata.cFileName, TRUE, FILE_ATTRIBUTE_NORMAL, 
					FTP_TRANSFER_TYPE_BINARY, 0);
	}
	while(InternetFindNextFile(hFind, &amp;finddata));

	InternetCloseHandle(hFind);
	InternetCloseHandle(hFtpSession);
	InternetCloseHandle(hIntSession);

	ButtonSwitch(hwndStatus, hwndButton, TEXT(&quot;Download aus dem Internet beendet&quot;));
}
</code></pre>
<p>und hier die Fehlermeldung:</p>
<pre><code>SmashFTP error LNK2019: Nicht aufgeloestes externes Symbol __imp__FtpSetCurrentDirectoryA@8, verwiesen in Funktion _FtpThread
SmashFTP error LNK2019: Nicht aufgeloestes externes Symbol __imp__FtpFindFirstFileA@20, verwiesen in Funktion _FtpThread
SmashFTP error LNK2019: Nicht aufgeloestes externes Symbol __imp__InternetCloseHandle@4, verwiesen in Funktion _FtpThread
SmashFTP error LNK2019: Nicht aufgeloestes externes Symbol __imp__InternetConnectA@32, verwiesen in Funktion _FtpThread
SmashFTP error LNK2019: Nicht aufgeloestes externes Symbol __imp__InternetFindNextFileA@8, verwiesen in Funktion _FtpThread
SmashFTP error LNK2019: Nicht aufgeloestes externes Symbol __imp__InternetOpenA@20, verwiesen in Funktion _FtpThread
SmashFTP fatal error LNK1120: 6 unaufgeloeste externe Verweise
</code></pre>
<p>Danke schonmal für eure Hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/893302</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/893302</guid><dc:creator><![CDATA[Zoran]]></dc:creator><pubDate>Sun, 16 Oct 2005 09:48:15 GMT</pubDate></item><item><title><![CDATA[Reply to FTP-Client und nicht aufgelöstes externes Symbol on Sun, 16 Oct 2005 09:49:49 GMT]]></title><description><![CDATA[<p><a href="http://www.google.de/search?hl=de&amp;q=InternetCloseHandle&amp;btnG=Suche&amp;meta=" rel="nofollow">http://www.google.de/search?hl=de&amp;q=InternetCloseHandle&amp;btnG=Suche&amp;meta=</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/893303</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/893303</guid><dc:creator><![CDATA[Maxi]]></dc:creator><pubDate>Sun, 16 Oct 2005 09:49:49 GMT</pubDate></item><item><title><![CDATA[Reply to FTP-Client und nicht aufgelöstes externes Symbol on Sun, 16 Oct 2005 09:52:44 GMT]]></title><description><![CDATA[<p>MSDN... natürlich.</p>
<p>Danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/893306</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/893306</guid><dc:creator><![CDATA[Zoran]]></dc:creator><pubDate>Sun, 16 Oct 2005 09:52:44 GMT</pubDate></item><item><title><![CDATA[Reply to FTP-Client und nicht aufgelöstes externes Symbol on Sun, 16 Oct 2005 09:56:33 GMT]]></title><description><![CDATA[<p>Zoran schrieb:</p>
<blockquote>
<p>MSDN... natürlich.</p>
</blockquote>
<p>Wie immer... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--smiling_face_with_sunglasses"
      title="8)"
      alt="😎"
    /></p>
<p>Bye, TGGC (<a href="http://tggc.tg.funpic.de/index.php?cat=4" rel="nofollow">Demo or Die</a>)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/893310</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/893310</guid><dc:creator><![CDATA[TGGC]]></dc:creator><pubDate>Sun, 16 Oct 2005 09:56:33 GMT</pubDate></item><item><title><![CDATA[Reply to FTP-Client und nicht aufgelöstes externes Symbol on Sun, 16 Oct 2005 15:09:52 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/893505</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/893505</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sun, 16 Oct 2005 15:09:52 GMT</pubDate></item><item><title><![CDATA[Reply to FTP-Client und nicht aufgelöstes externes Symbol on Sun, 16 Oct 2005 15:31:45 GMT]]></title><description><![CDATA[<p>du musst Wininet.lib linken <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/893525</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/893525</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Sun, 16 Oct 2005 15:31:45 GMT</pubDate></item><item><title><![CDATA[Reply to FTP-Client und nicht aufgelöstes externes Symbol on Sun, 16 Oct 2005 19:35:45 GMT]]></title><description><![CDATA[<p>das steht auch im petzold wenn mich mein sinn nicht täuscht <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/893717</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/893717</guid><dc:creator><![CDATA[Inspector Gadget]]></dc:creator><pubDate>Sun, 16 Oct 2005 19:35:45 GMT</pubDate></item></channel></rss>