<?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[Datei öffnen &#x2F; Informationen auslesen]]></title><description><![CDATA[<p>Hi Leute!</p>
<p>Wie kann ich eine Datei, die mit FtpGetFile erstellt wurde und gerade beschrieben wird, öffnen, sodass ich die Größe auslesen kann? Ich möchte im Intervall die Größe auslesen und somit einen Fortschrittsbalken steuern und die Geschwindigkeit berechnen. Die Methoden CFile::Open, CreateFile, und fopen funzten bei mir nicht. Habt ihr irgendwelche Ideen? Am liebsten währe mir eine MFC-Lösung, deswegen poste ich hier.<br />
Win9x/VC6.0/Platform-SDK Feb2003</p>
<p>Danke im Voraus!</p>
<p>Christian</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/50733/datei-öffnen-informationen-auslesen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 31 May 2026 15:01:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/50733.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 02 Oct 2003 15:21:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Thu, 02 Oct 2003 15:21:45 GMT]]></title><description><![CDATA[<p>Hi Leute!</p>
<p>Wie kann ich eine Datei, die mit FtpGetFile erstellt wurde und gerade beschrieben wird, öffnen, sodass ich die Größe auslesen kann? Ich möchte im Intervall die Größe auslesen und somit einen Fortschrittsbalken steuern und die Geschwindigkeit berechnen. Die Methoden CFile::Open, CreateFile, und fopen funzten bei mir nicht. Habt ihr irgendwelche Ideen? Am liebsten währe mir eine MFC-Lösung, deswegen poste ich hier.<br />
Win9x/VC6.0/Platform-SDK Feb2003</p>
<p>Danke im Voraus!</p>
<p>Christian</p>
]]></description><link>https://www.c-plusplus.net/forum/post/365104</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/365104</guid><dc:creator><![CDATA[CKrause]]></dc:creator><pubDate>Thu, 02 Oct 2003 15:21:45 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Sun, 05 Oct 2003 10:37:35 GMT]]></title><description><![CDATA[<p>Hat keiner eine Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/366166</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/366166</guid><dc:creator><![CDATA[CKrause]]></dc:creator><pubDate>Sun, 05 Oct 2003 10:37:35 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Sun, 05 Oct 2003 11:44:28 GMT]]></title><description><![CDATA[<p>ich bin mir nicht so sicher wie du das meinst. Willst du vieleicht ein &quot;Öffnen&quot;-Dialog?</p>
<p>klenes Beispiel.</p>
<pre><code class="language-cpp">CFileDialog m_ldFile(TRUE); 
double m_dLdFileGroesse;        /* Variable fuer File-Groesse */

// Festlegen, dass die File einen bestimmten Datei-Typ entsprechen soll
m_ldFile.m_ofn.lpstrDefExt = &quot;jpg&quot;;   /* Bin mir aber auch nicht sicher
                                         müsstest du mal ausprobieren */

if (m_ldFile.DoModal() == IDOK) {
    /* 
     * Hier kommt jetzt dein Teil hin, wo du die File Groesse
     * bestimmst --- wie das geht habe ich keine Ahnung.
     */
}
</code></pre>
<p>Vieleicht ist das ein kleiner Ansatz.</p>
<p>Ich weis nicht ob ich dir damit helfen konnte - oder ob das überhaubt dein Problem ist</p>
<p>mfg, the flyingCoder.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/366189</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/366189</guid><dc:creator><![CDATA[flyingCoder]]></dc:creator><pubDate>Sun, 05 Oct 2003 11:44:28 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Sun, 05 Oct 2003 11:54:01 GMT]]></title><description><![CDATA[<p>CKrause schrieb:</p>
<blockquote>
<p>Hi Leute!</p>
<p>. Die Methoden CFile::Open, CreateFile, und fopen funzten bei mir nicht.<br />
Christian</p>
</blockquote>
<p>Was funktioniert da nicht ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/366200</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/366200</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Sun, 05 Oct 2003 11:54:01 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Sun, 05 Oct 2003 12:06:31 GMT]]></title><description><![CDATA[<p>Die Datei wird von FtpGetFile explizit geöffnet sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/366207</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/366207</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Sun, 05 Oct 2003 12:06:31 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Sun, 05 Oct 2003 12:38:15 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/963">@deus</a>: Mir ist klar, dass die Datei geöffnet ist, aber wenn ich in Windows diese Datei mit der rechten Maustaste anklicke und auf Eigenschaften gehe, zeigt er mir die momentane Größe, während des Downloads an. Ich denke, dass muss über Tricks doch irgendwie programmatisch lösbar sein. Denke ich.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/366217</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/366217</guid><dc:creator><![CDATA[CKrause]]></dc:creator><pubDate>Sun, 05 Oct 2003 12:38:15 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Sun, 05 Oct 2003 12:42:59 GMT]]></title><description><![CDATA[<p>CFile::GetStatus ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/366218</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/366218</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Sun, 05 Oct 2003 12:42:59 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Sun, 05 Oct 2003 17:22:39 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/156">@Unix-Tom</a>:</p>
<p>von fopen bekomme ich gar keinen Fehler<br />
von CreateFile(); bekomme ich: &quot;Die Netzwerkanforderung wird nicht unterstützt.&quot;<br />
von CFile::OpenFile bekomme ich: &quot;The process cannot access the file because it is being used by another process.&quot;</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/963">@deus</a>:</p>
<p>und CFile::GetStatus bekommt keine Größe rein, die bleibt 0</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/4772">@flyingcoder</a>:</p>
<p>ich meine etwas anderes</p>
<p>Aber Danke schonmal für eure Mühe!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/366354</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/366354</guid><dc:creator><![CDATA[CKrause]]></dc:creator><pubDate>Sun, 05 Oct 2003 17:22:39 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Mon, 06 Oct 2003 06:43:34 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>was übergibst du FtpGetFile in dwFlagsAndAttributes? Hier kannst du den shareMode einstellen. Hast du das gemacht?</p>
<p>Grüße, Volle.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/366522</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/366522</guid><dc:creator><![CDATA[Volle]]></dc:creator><pubDate>Mon, 06 Oct 2003 06:43:34 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Mon, 06 Oct 2003 14:21:14 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/290">@volle</a>:</p>
<p>MSDNL sagt: dwLocalFlagsAndAttributes<br />
File attributes for the new file. Can be any combination of the FILE_ATTRIBUTE_* flags used by theCreateFile function. For more information on FILE_ATTRIBUTE_* attributes, see CreateFile in the Platform SDK.</p>
<p>da ist doch kein share mode dabei, oder zumindest akzeptiert FtpGetFile FILE_SHARE_READ nicht, sondern nimmt es meiner Meinung nach als FILE_ATTRIBUTE_READONLY, da es dem selben Wert entspricht:<br />
Auszug aus WinNT.h:</p>
<p>#define FILE_SHARE_READ 0x00000001 &lt;---<br />
#define FILE_SHARE_WRITE 0x00000002<br />
#define FILE_SHARE_DELETE 0x00000004<br />
#define FILE_ATTRIBUTE_READONLY 0x00000001 &lt;---<br />
#define FILE_ATTRIBUTE_HIDDEN 0x00000002<br />
#define FILE_ATTRIBUTE_SYSTEM 0x00000004<br />
#define FILE_ATTRIBUTE_DIRECTORY 0x00000010</p>
<p>Also, ich habs probiert und es geht nicht, oder habe ich was falsch gemacht?</p>
<p>BOOL a = FtpGetFile(hFtp, srcfile, dstfile, TRUE, FILE_SHARE_READ, FTP_TRANSFER_TYPE_BINARY, 0);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/366852</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/366852</guid><dc:creator><![CDATA[CKrause]]></dc:creator><pubDate>Mon, 06 Oct 2003 14:21:14 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Wed, 08 Oct 2003 11:21:32 GMT]]></title><description><![CDATA[<p>hat keiner mehr eine Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/368227</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/368227</guid><dc:creator><![CDATA[CKrause]]></dc:creator><pubDate>Wed, 08 Oct 2003 11:21:32 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Fri, 10 Oct 2003 23:13:35 GMT]]></title><description><![CDATA[<p>no fucking way?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/370170</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/370170</guid><dc:creator><![CDATA[CKrause]]></dc:creator><pubDate>Fri, 10 Oct 2003 23:13:35 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Sat, 11 Oct 2003 07:16:18 GMT]]></title><description><![CDATA[<p>Wenn man in der MSDN genau schaut stellt man fest das es diese Flags für diese Funktion nicht gibt</p>
<blockquote>
<p>#define FILE_SHARE_READ 0x00000001 &lt;---<br />
#define FILE_SHARE_WRITE 0x00000002<br />
#define FILE_SHARE_DELETE 0x00000004</p>
</blockquote>
<blockquote>
<p>CFtpConnection::GetFile<br />
BOOL GetFile( LPCTSTR pstrRemoteFile, LPCTSTR pstrLocalFile, BOOL bFailIfExists = TRUE, DWORD dwAttributes = FILE_ATTRIBUTE_NORMAL, DWORD dwFlags = FTP_TRANSFER_TYPE_BINARY, DWORD dwContext = 1 );</p>
<p>Return Value</p>
<p>Nonzero if successful; otherwise 0. If the call fails, the Win32 functionGetLastError may be called to determine the cause of the error.</p>
<p>Parameters</p>
<p>pstrRemoteFile</p>
<p>A pointer to a null-terminated string containing the name of a file to retrieve from the FTP server.</p>
<p>pstrLocalFile</p>
<p>A pointer to a null-terminated string containing the name of the file to create on the local system.</p>
<p>bFailIfExists</p>
<p>Indicates whether the file name may already be used by an existing file. If the local file name already exists, and this parameter is TRUE, GetFile fails. Otherwise, GetFile will erase the existing copy of the file.</p>
<p>dwAttributes</p>
<p>Indicates the attributes of the file. This can be any combination of the following FILE_ATTRIBUTE_* flags.</p>
<p>FILE_ATTRIBUTE_ARCHIVE The file is an archive file. Applications use this attribute to mark files for backup or removal.</p>
<p>FILE_ATTRIBUTE_COMPRESSED The file or directory is compressed. For a file, compression means that all of the data in the file is compressed. For a directory, compression is the default for newly created files and subdirectories.</p>
<p>FILE_ATTRIBUTE_DIRECTORY The file is a directory.</p>
<p>FILE_ATTRIBUTE_NORMAL The file has no other attributes set. This attribute is valid only if used alone. All other file attributes override FILE_ATTRIBUTE_NORMAL:</p>
<p>FILE_ATTRIBUTE_HIDDEN The file is hidden. It is not to be included in an ordinary directory listing.</p>
<p>FILE_ATTRIBUTE_READONLY The file is read only. Applications can read the file but cannot write to it or delete it.</p>
<p>FILE_ATTRIBUTE_SYSTEM The file is part of or is used exclusively by the operating system.</p>
<p>FILE_ATTRIBUTE_TEMPORARY The file is being used for temporary storage. Applications should write to the file only if absolutely necessary. Most of the file’s data remains in memory without being flushed to the media because the file will soon be deleted.<br />
dwFlags</p>
<p>Specifies the conditions under which the transfer occurs. This parameter can be any of the dwFlags values described inFtpGetFile in the Platform SDK.</p>
<p>dwContext</p>
<p>The context identifier for the file retrieval. See Remarks for more information about dwContext.</p>
<p>Remarks</p>
<p>Call this member function to get a file from an FTP server and store it on the local machine.</p>
<p>GetFile is a high-level routine that handles all of the overhead associated with reading a file from an FTP server and storing it locally. Applications that only retrieve file data, or that require close control over the file transfer, should use OpenFile and CInternetFile::Read instead.</p>
<p>If dwFlags is FILE_TRANSFER_TYPE_ASCII, translation of file data also converts control and formatting characters to Windows equivalents. The default transfer is binary mode, where the file is downloaded in the same format as it is stored on the server.</p>
<p>Both pstrRemoteFile and pstrLocalFile can be either partially qualified filenames relative to the current directory or fully qualified. A backslash (\) or forward slash (/) can be used as the directory separator for either name. GetFile translates the directory name separators to the appropriate characters before they are used.</p>
<p>Override the dwContext default to set the context identifier to a value of your choosing. The context identifier is associated with this specific operation of the CFtpConnection object created by its CInternetSession object. The value is returned to CInternetSession::OnStatusCallback to provide status on the operation with which it is identified. See the articleInternet First Steps: WinInet for more information about the context identifier.</p>
<p>CFtpConnection Overview | Class Members | Hierarchy Chart</p>
<p>See Also CInternetConnection</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/370200</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/370200</guid><dc:creator><![CDATA[PAD]]></dc:creator><pubDate>Sat, 11 Oct 2003 07:16:18 GMT</pubDate></item><item><title><![CDATA[Reply to Datei öffnen &#x2F; Informationen auslesen on Sat, 11 Oct 2003 11:18:12 GMT]]></title><description><![CDATA[<p>ja, sag ich doch</p>
]]></description><link>https://www.c-plusplus.net/forum/post/370264</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/370264</guid><dc:creator><![CDATA[CKrause]]></dc:creator><pubDate>Sat, 11 Oct 2003 11:18:12 GMT</pubDate></item></channel></rss>