<?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[InternetWriteFile]]></title><description><![CDATA[<p>hallo allerseits!</p>
<p>nach nun fast einer woche(!) suchen, lesen und fehlersuchen geb ichs fast auf, eine datei auf einen ftp-server zu laden.</p>
<p>meine letzte hoffnung ist, dass mir hier eventuell jemand weiterhelfen kann.</p>
<p>prinzipell wird folgende funktion aus meiner klasse als thread aufgerufen - funktioniert einwandfrei.<br />
weiters werden auch die daten auf den ftp-server hochgeladen - funktioniert soweit auch.</p>
<p>ABER: dwNumberOfBytesWritten bleibt IMMER auf 0 stehen - lasse mir das jede sekunde mit meiner ausgabe-wrapper-funktion CFTPmt::_fptr_appLoggerFnc() im hintergrund über die konsole ausgeben.</p>
<p>hier mal die funktion:</p>
<pre><code class="language-cpp">unsigned int __stdcall CFTPmt::thread_UploadFile_Binaray( LPVOID lpvoidParam )
{
	// wait one second to give time to the system
	Sleep(1000);

	// cast lpvoid-data
	UPLOADFILE_BIN * pUploadFileBin = (UPLOADFILE_BIN*)lpvoidParam;

	// text output to application
	CFTPmt::_fptr_appLoggerFnc( L&quot;Preparing File for upload: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );

	// read raw filedata into memory
	FILE * pFile;
	long lSize;
	char * buffer_RAWData;
	size_t result;

	pFile = _wfopen ( pUploadFileBin-&gt;wsLocalFilename.c_str() , L&quot;rb&quot; );
	if (pFile==NULL) 
	{
		// text output to application
		CFTPmt::_fptr_appLoggerFnc( L&quot;Error opening File: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );
		pUploadFileBin-&gt;bError = TRUE;

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	// obtain file size:
	fseek (pFile , 0 , SEEK_END);
	lSize = ftell (pFile);
	rewind (pFile);

	std::wostringstream wossa;
	wossa &lt;&lt; L&quot;filesize in kb: &quot; &lt;&lt; ( lSize / 1024 ) &lt;&lt; L&quot;\n&quot; &lt;&lt; L&quot;filesize in b: &quot; &lt;&lt; ( lSize ) &lt;&lt; L&quot;\n&quot;;
	CFTPmt::_fptr_appLoggerFnc( wossa.str() );

	if ( lSize &lt;= 0 )
	{
		// text output to application
		CFTPmt::_fptr_appLoggerFnc( L&quot;Error getting File information: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );
		pUploadFileBin-&gt;bError = TRUE;

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	// allocate memory to contain the whole file:
	buffer_RAWData = (char*) malloc (sizeof(char)*lSize);

	if (buffer_RAWData == NULL) 
	{
		// text output to application
		CFTPmt::_fptr_appLoggerFnc( L&quot;Error: Out of memory!\n&quot; );
		pUploadFileBin-&gt;bError = TRUE;

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	ZeroMemory( buffer_RAWData, sizeof(char)*lSize );

	std::wostringstream wossb;
	wossb &lt;&lt;  L&quot;memory alloc size: &quot; &lt;&lt; sizeof(char)*lSize &lt;&lt; L&quot;\n&quot;;
	CFTPmt::_fptr_appLoggerFnc( wossb.str() );

	// copy the file into the buffer:
	result = fread (buffer_RAWData,1, lSize ,pFile);
	if (result != lSize)
	{
		// text output to application
		CFTPmt::_fptr_appLoggerFnc( L&quot;Error reading File: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );
		pUploadFileBin-&gt;bError = TRUE;

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	// text output to application
	CFTPmt::_fptr_appLoggerFnc( L&quot;Successfully read File: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );	

	// the whole file is now loaded in the memory buffer.

	// terminate
	fclose (pFile);

	// -------------------------------------- upload
	// open remote-ftp-file for uploading
	HINTERNET hOpenFile = FtpOpenFileW(
		CFTPmt::_FTPConn.hConnect,
		pUploadFileBin-&gt;wsRemoteFilename.c_str(),
		GENERIC_WRITE,
		FTP_TRANSFER_TYPE_BINARY,
		NULL
		);
	if( hOpenFile == NULL )
	{
		// text output to application
		CFTPmt::_fptr_appLoggerFnc( L&quot;Error uploading File: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );
		pUploadFileBin-&gt;bError = TRUE;

		// free memory
		free (buffer_RAWData);

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	CFTPmt::_fptr_appLoggerFnc( L&quot;FtpOpenFileW ok: \n&quot; );

	// progress upload
	DWORD dwNumberOfBytesWritten = 0;
	BOOL res;

	std::wostringstream status;
	while ( dwNumberOfBytesWritten &lt; sizeof(char)*lSize )
	{
		res = InternetWriteFile(
			hOpenFile,
			buffer_RAWData,
			sizeof(char)*lSize,
			&amp;dwNumberOfBytesWritten
			);

		status.str(L&quot;&quot;);
		status &lt;&lt; ( dwNumberOfBytesWritten / 1024 ) &lt;&lt; L&quot; / &quot; &lt;&lt; ( sizeof(char)*lSize / 1024 ) &lt;&lt; L&quot; KB res=&quot; &lt;&lt; res &lt;&lt; &quot;\n&quot;;
		CFTPmt::_fptr_appLoggerFnc( status.str() );
		Sleep(1000);
	}

	if( !res )
	{
		// text output to application
		std::wostringstream wosserrupl;
		wosserrupl &lt;&lt; L&quot;Error uploading File: &quot; &lt;&lt; pUploadFileBin-&gt;wsLocalFilename &lt;&lt; L&quot;\n&quot; &lt;&lt; ( CFTPmt::getLastFTP_Response() ) &lt;&lt; L&quot;\n&quot;;
		CFTPmt::_fptr_appLoggerFnc( wosserrupl.str() );

		pUploadFileBin-&gt;bError = TRUE;

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	std::wostringstream wossupl;
	wossupl &lt;&lt;  L&quot;Uploading File OK. \n&quot; &lt;&lt; ( CFTPmt::getLastFTP_Response() ) &lt;&lt; L&quot;\n&quot;;
	CFTPmt::_fptr_appLoggerFnc( wossupl.str() );

	// --------------------------------------- end upload 

	// call the 'thread-finished' function
	CFTPmt::onUploadFile_Binaray( pUploadFileBin );

	// end calling thread - doesn't close the thread handle
	unsigned int retVal = 0;
	_endthreadex( retVal );
	return retVal;

}
</code></pre>
<p>danke schon mal für eure hilfe<br />
lg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/225982/internetwritefile</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 12:10:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/225982.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Oct 2008 18:56:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to InternetWriteFile on Mon, 27 Oct 2008 18:56:42 GMT]]></title><description><![CDATA[<p>hallo allerseits!</p>
<p>nach nun fast einer woche(!) suchen, lesen und fehlersuchen geb ichs fast auf, eine datei auf einen ftp-server zu laden.</p>
<p>meine letzte hoffnung ist, dass mir hier eventuell jemand weiterhelfen kann.</p>
<p>prinzipell wird folgende funktion aus meiner klasse als thread aufgerufen - funktioniert einwandfrei.<br />
weiters werden auch die daten auf den ftp-server hochgeladen - funktioniert soweit auch.</p>
<p>ABER: dwNumberOfBytesWritten bleibt IMMER auf 0 stehen - lasse mir das jede sekunde mit meiner ausgabe-wrapper-funktion CFTPmt::_fptr_appLoggerFnc() im hintergrund über die konsole ausgeben.</p>
<p>hier mal die funktion:</p>
<pre><code class="language-cpp">unsigned int __stdcall CFTPmt::thread_UploadFile_Binaray( LPVOID lpvoidParam )
{
	// wait one second to give time to the system
	Sleep(1000);

	// cast lpvoid-data
	UPLOADFILE_BIN * pUploadFileBin = (UPLOADFILE_BIN*)lpvoidParam;

	// text output to application
	CFTPmt::_fptr_appLoggerFnc( L&quot;Preparing File for upload: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );

	// read raw filedata into memory
	FILE * pFile;
	long lSize;
	char * buffer_RAWData;
	size_t result;

	pFile = _wfopen ( pUploadFileBin-&gt;wsLocalFilename.c_str() , L&quot;rb&quot; );
	if (pFile==NULL) 
	{
		// text output to application
		CFTPmt::_fptr_appLoggerFnc( L&quot;Error opening File: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );
		pUploadFileBin-&gt;bError = TRUE;

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	// obtain file size:
	fseek (pFile , 0 , SEEK_END);
	lSize = ftell (pFile);
	rewind (pFile);

	std::wostringstream wossa;
	wossa &lt;&lt; L&quot;filesize in kb: &quot; &lt;&lt; ( lSize / 1024 ) &lt;&lt; L&quot;\n&quot; &lt;&lt; L&quot;filesize in b: &quot; &lt;&lt; ( lSize ) &lt;&lt; L&quot;\n&quot;;
	CFTPmt::_fptr_appLoggerFnc( wossa.str() );

	if ( lSize &lt;= 0 )
	{
		// text output to application
		CFTPmt::_fptr_appLoggerFnc( L&quot;Error getting File information: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );
		pUploadFileBin-&gt;bError = TRUE;

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	// allocate memory to contain the whole file:
	buffer_RAWData = (char*) malloc (sizeof(char)*lSize);

	if (buffer_RAWData == NULL) 
	{
		// text output to application
		CFTPmt::_fptr_appLoggerFnc( L&quot;Error: Out of memory!\n&quot; );
		pUploadFileBin-&gt;bError = TRUE;

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	ZeroMemory( buffer_RAWData, sizeof(char)*lSize );

	std::wostringstream wossb;
	wossb &lt;&lt;  L&quot;memory alloc size: &quot; &lt;&lt; sizeof(char)*lSize &lt;&lt; L&quot;\n&quot;;
	CFTPmt::_fptr_appLoggerFnc( wossb.str() );

	// copy the file into the buffer:
	result = fread (buffer_RAWData,1, lSize ,pFile);
	if (result != lSize)
	{
		// text output to application
		CFTPmt::_fptr_appLoggerFnc( L&quot;Error reading File: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );
		pUploadFileBin-&gt;bError = TRUE;

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	// text output to application
	CFTPmt::_fptr_appLoggerFnc( L&quot;Successfully read File: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );	

	// the whole file is now loaded in the memory buffer.

	// terminate
	fclose (pFile);

	// -------------------------------------- upload
	// open remote-ftp-file for uploading
	HINTERNET hOpenFile = FtpOpenFileW(
		CFTPmt::_FTPConn.hConnect,
		pUploadFileBin-&gt;wsRemoteFilename.c_str(),
		GENERIC_WRITE,
		FTP_TRANSFER_TYPE_BINARY,
		NULL
		);
	if( hOpenFile == NULL )
	{
		// text output to application
		CFTPmt::_fptr_appLoggerFnc( L&quot;Error uploading File: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );
		pUploadFileBin-&gt;bError = TRUE;

		// free memory
		free (buffer_RAWData);

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	CFTPmt::_fptr_appLoggerFnc( L&quot;FtpOpenFileW ok: \n&quot; );

	// progress upload
	DWORD dwNumberOfBytesWritten = 0;
	BOOL res;

	std::wostringstream status;
	while ( dwNumberOfBytesWritten &lt; sizeof(char)*lSize )
	{
		res = InternetWriteFile(
			hOpenFile,
			buffer_RAWData,
			sizeof(char)*lSize,
			&amp;dwNumberOfBytesWritten
			);

		status.str(L&quot;&quot;);
		status &lt;&lt; ( dwNumberOfBytesWritten / 1024 ) &lt;&lt; L&quot; / &quot; &lt;&lt; ( sizeof(char)*lSize / 1024 ) &lt;&lt; L&quot; KB res=&quot; &lt;&lt; res &lt;&lt; &quot;\n&quot;;
		CFTPmt::_fptr_appLoggerFnc( status.str() );
		Sleep(1000);
	}

	if( !res )
	{
		// text output to application
		std::wostringstream wosserrupl;
		wosserrupl &lt;&lt; L&quot;Error uploading File: &quot; &lt;&lt; pUploadFileBin-&gt;wsLocalFilename &lt;&lt; L&quot;\n&quot; &lt;&lt; ( CFTPmt::getLastFTP_Response() ) &lt;&lt; L&quot;\n&quot;;
		CFTPmt::_fptr_appLoggerFnc( wosserrupl.str() );

		pUploadFileBin-&gt;bError = TRUE;

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	std::wostringstream wossupl;
	wossupl &lt;&lt;  L&quot;Uploading File OK. \n&quot; &lt;&lt; ( CFTPmt::getLastFTP_Response() ) &lt;&lt; L&quot;\n&quot;;
	CFTPmt::_fptr_appLoggerFnc( wossupl.str() );

	// --------------------------------------- end upload 

	// call the 'thread-finished' function
	CFTPmt::onUploadFile_Binaray( pUploadFileBin );

	// end calling thread - doesn't close the thread handle
	unsigned int retVal = 0;
	_endthreadex( retVal );
	return retVal;

}
</code></pre>
<p>danke schon mal für eure hilfe<br />
lg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1605718</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1605718</guid><dc:creator><![CDATA[alexm]]></dc:creator><pubDate>Mon, 27 Oct 2008 18:56:42 GMT</pubDate></item><item><title><![CDATA[Reply to InternetWriteFile on Tue, 28 Oct 2008 10:42:05 GMT]]></title><description><![CDATA[<p>Die Schleife ist doch unsinnig:</p>
<pre><code class="language-cpp">while ( dwNumberOfBytesWritten &lt; sizeof(char)*lSize ) 
    {
</code></pre>
<p>Du schreibst doch alles auf einmal? Warum willst Du das öfters machen.<br />
Zudem veränderst Du nicht die Zeiger... Wenn Du in mehreren Blöcken schreiben würdest, nur dann würde eine Schleife hier Sinn machen.</p>
<p>Zudem sehe ich keine Prüfung ob ein Fehler auftritt! Was ist den res? Was sagt GetLastError?</p>
<p>Die Schleife bricht ja nicht mal bei einem Fehler ab. Bau doch erstmal eine richtige Fehlerbehandlung ein...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1605969</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1605969</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 28 Oct 2008 10:42:05 GMT</pubDate></item><item><title><![CDATA[Reply to InternetWriteFile on Tue, 28 Oct 2008 16:30:05 GMT]]></title><description><![CDATA[<p>hi!</p>
<p>ich hab mal den upload-teil wie folgt umgebaut</p>
<pre><code class="language-cpp">// --------------------------------------------------------------------------------------- upload

	// open remote-ftp-file for uploading

	// text output to application
	CFTPmt::_fptr_appLoggerFnc( L&quot;open remote-ftp-file for uploading: &quot; + pUploadFileBin-&gt;wsRemoteFilename + L&quot;\n&quot; );

	HINTERNET hOpenFile = FtpOpenFileW(
		CFTPmt::_FTPConn.hConnect,
		pUploadFileBin-&gt;wsRemoteFilename.c_str(),
		GENERIC_WRITE,
		FTP_TRANSFER_TYPE_BINARY|INTERNET_FLAG_RESYNCHRONIZE,
		NULL
		);

	// exit thread if FtpOpenFileW fails
	if( hOpenFile == NULL )
	{
		// text output to application
		CFTPmt::_fptr_appLoggerFnc( L&quot;Error opening remote file for upload: &quot; + pUploadFileBin-&gt;wsLocalFilename + L&quot;\n&quot; );
		pUploadFileBin-&gt;bError = TRUE;

		// free memory
		free (buffer_RAWData);

		// call the 'thread-finished' function
		CFTPmt::onUploadFile_Binaray( pUploadFileBin );

		// end calling thread - doesn't close the thread handle
		unsigned int retVal = 0;
		_endthreadex( retVal );
		return retVal;
	}

	// FtpOpenFileW result was ok
	CFTPmt::_fptr_appLoggerFnc( L&quot;FtpOpenFileW ok: \n&quot; );

	// progress upload
	DWORD dwNumberOfBytesWritten = 0;
	BOOL res;
	int	nChunkSize = 1024;
	BOOL doProcess = TRUE;
	std::wostringstream	status;
	UINT tryAgainTimes = 3;
	BOOL waiting = FALSE;

	while ( doProcess ) // dwNumberOfBytesWritten &lt; sizeof(char)*lSize
	{
		if( !waiting )
		{
			res = InternetWriteFile(
				hOpenFile,
				buffer_RAWData,
				nChunkSize, // sizeof(char)*lSize
				&amp;dwNumberOfBytesWritten
				);
		}

		if ( !res )
		{
			// text output to application
			status.str(L&quot;&quot;);
			status &lt;&lt; L&quot;Error uploading File: &quot; &lt;&lt; pUploadFileBin-&gt;wsLocalFilename &lt;&lt; L&quot;\n LAST ERROR: &quot; &lt;&lt; GetLastError() &lt;&lt; L&quot; - &quot; &lt;&lt; ( CFTPmt::getLastFTP_Response() ) &lt;&lt; L&quot; res = &quot; &lt;&lt; res &lt;&lt; L&quot;\n&quot;;
			CFTPmt::_fptr_appLoggerFnc( status.str() );

			if( GetLastError() == 997 &amp;&amp; tryAgainTimes &gt; 0 ) // 997 = asynchronous I/O operation is pending !?
			{
				waiting = TRUE;
				status.str(L&quot;&quot;);
				status &lt;&lt; L&quot;waiting for server - will try again &quot; &lt;&lt; tryAgainTimes &lt;&lt; L&quot; times ...\n&quot;;
				CFTPmt::_fptr_appLoggerFnc( status.str() );
				tryAgainTimes --;
				Sleep(1000);
			}
			else
			{
				// set error flag for user of this class
				pUploadFileBin-&gt;bError = TRUE;

				// call the 'thread-finished' function
				CFTPmt::onUploadFile_Binaray( pUploadFileBin );

				// end calling thread - doesn't close the thread handle
				unsigned int retVal = 0;
				_endthreadex( retVal );
				return retVal;
			}			
		}
		else
		{
			status.str(L&quot;&quot;);
			status &lt;&lt; ( dwNumberOfBytesWritten / 1024 ) &lt;&lt; L&quot; / &quot; &lt;&lt; ( sizeof(char)*lSize / 1024 ) &lt;&lt; L&quot; KB res=&quot; &lt;&lt; res &lt;&lt; &quot;\n&quot;;
			CFTPmt::_fptr_appLoggerFnc( status.str() );
			Sleep(1000);
			buffer_RAWData += nChunkSize;
			waiting = FALSE;
		}

	}

	status.str(L&quot;&quot;);
	status &lt;&lt;  L&quot;Uploading File OK. \n&quot; &lt;&lt; ( CFTPmt::getLastFTP_Response() ) &lt;&lt; L&quot;\n&quot;;
	CFTPmt::_fptr_appLoggerFnc( status.str() );
</code></pre>
<p>nun gibt es 2 symptome die auftreten:</p>
<p>1.) am ftp-server existiert dieses file noch nicht dann lädt mein programm das file zwar im hintergrund hoch ( feststellbar im filezilla und F5 drücken ... )<br />
meldet aber folgende fehler:</p>
<pre><code>Connection to the FTP-Server established ...

APP: onOpenFTPConnection called in MAIN b=0

Preparing File for upload: D:\alexTestbilder.rar
filesize in kb: 17270
filesize in b: 17684836
memory alloc size: 17684836
Successfully read File: D:\alexTestbilder.rar

open remote-ftp-file for uploading: /httpdocs/picture_library/alexTestbilder.rar

FtpOpenFileW ok:

Error uploading File: D:\alexTestbilder.rar
 LAST ERROR: 997 - ErrorId = 0 Error Message:  res = 0
waiting for server - will try again 3 times ...

Error uploading File: D:\alexTestbilder.rar
 LAST ERROR: 997 - ErrorId = 0 Error Message:  res = 0
waiting for server - will try again 2 times ...

Error uploading File: D:\alexTestbilder.rar
 LAST ERROR: 997 - ErrorId = 0 Error Message:  res = 0
waiting for server - will try again 1 times ...

Error uploading File: D:\alexTestbilder.rar
 LAST ERROR: 997 - ErrorId = 0 Error Message:  res = 0

APP: onUploadFile_Binaray called in MAIN b=1

Connection to the FTP-Server closed ...
Connection to the Internet closed ...
</code></pre>
<p>danach ist die datei am server ca. 1MB gross.</p>
<p>wenn ich nun nochmal das programm starte, hängt es ca 1 minute beim aufruf von</p>
<pre><code class="language-cpp">FtpOpenFileW
</code></pre>
<p>und bricht dann mit meiner fehlermeldung</p>
<pre><code>Error opening remote file for upload: D:\alexTestbilder.rar
</code></pre>
<p>ab. das file am server ist nun zwar da aber nur mehr 0kb gross.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1606165</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1606165</guid><dc:creator><![CDATA[alexm]]></dc:creator><pubDate>Tue, 28 Oct 2008 16:30:05 GMT</pubDate></item></channel></rss>