<?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[Pfad der Application data herausfinden]]></title><description><![CDATA[<p>Hallo,</p>
<p>die Dokumente meiner SDI-Applikation werden in dem Ordner Anwendungsdaten abgespeichert. Wie kann ich herausfinden wo dieser Pfad beim Anwender liegt?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/193878/pfad-der-application-data-herausfinden</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 04:27:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/193878.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Oct 2007 09:19:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Mon, 01 Oct 2007 09:19:23 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>die Dokumente meiner SDI-Applikation werden in dem Ordner Anwendungsdaten abgespeichert. Wie kann ich herausfinden wo dieser Pfad beim Anwender liegt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1375790</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1375790</guid><dc:creator><![CDATA[maRKus23]]></dc:creator><pubDate>Mon, 01 Oct 2007 09:19:23 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Mon, 01 Oct 2007 09:28:07 GMT]]></title><description><![CDATA[<p>SHGetFolderPath<br />
<a href="http://msdn2.microsoft.com/en-us/library/ms647764.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/ms647764.aspx</a><br />
siehe Liste der CSIDL...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1375799</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1375799</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 01 Oct 2007 09:28:07 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Mon, 01 Oct 2007 10:55:36 GMT]]></title><description><![CDATA[<p>ich bekomme 2 Fehlermeldungen, und weiß nicht woran es liegt. Hier mal mein Code und die Fehlermeldungen.</p>
<pre><code class="language-cpp">/* open the default document */
	/* get the path name of the default doc */
	CString szPath;
	SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, szPath);
</code></pre>
<pre><code class="language-cpp">'SHGetFolderPath': Bezeichner wurde auch mit einer argumentbezogenen Suche nicht gefunden
 'SHGFP_TYPE_CURRENT': nichtdeklarierter Bezeichner
 Die Datei 'SIPDAT.dat' sollte nicht in einem Benutzerprofilordner installiert werden, da er möglicherweise nicht für alle Benutzer verfügbar ist.
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1375861</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1375861</guid><dc:creator><![CDATA[maRKus23]]></dc:creator><pubDate>Mon, 01 Oct 2007 10:55:36 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Mon, 01 Oct 2007 11:21:43 GMT]]></title><description><![CDATA[<p>Doku gelesen und einen</p>
<pre><code class="language-cpp">#include &lt;shlobj.h&gt;
</code></pre>
<p>gemacht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1375879</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1375879</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 01 Oct 2007 11:21:43 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Mon, 01 Oct 2007 11:23:56 GMT]]></title><description><![CDATA[<p>Ich habe ein #include &quot;shlobj.h&quot; gemacht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1375885</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1375885</guid><dc:creator><![CDATA[maRKus23]]></dc:creator><pubDate>Mon, 01 Oct 2007 11:23:56 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Mon, 01 Oct 2007 11:25:45 GMT]]></title><description><![CDATA[<p>Und das hast Du auch berücksichtigt:</p>
<pre><code class="language-cpp">_WIN32_IE &gt;= 0x0500
</code></pre>
<p>?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1375888</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1375888</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 01 Oct 2007 11:25:45 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Mon, 01 Oct 2007 11:29:28 GMT]]></title><description><![CDATA[<p>Bei mir ist _WIN32_IE = 0x0400.<br />
Was nun?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1375890</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1375890</guid><dc:creator><![CDATA[maRKus23]]></dc:creator><pubDate>Mon, 01 Oct 2007 11:29:28 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Mon, 01 Oct 2007 13:16:11 GMT]]></title><description><![CDATA[<p>Was wohl? Natürlich auf mindestens 0x0500 setzen umd diese Funktion zu verwenden.</p>
<p>Nach 437 Posts von Dir würde ich voraussetzen, dass Du gelernt hast die MSDN zu lesen und auch zumindestens zu verstehen, was die Requirements unten am Ende der Funktion bedeuten.</p>
<p>Siehe auch:<br />
<a href="http://msdn2.microsoft.com/en-us/library/aa383745.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/aa383745.aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1375967</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1375967</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 01 Oct 2007 13:16:11 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Tue, 02 Oct 2007 08:07:44 GMT]]></title><description><![CDATA[<p>hab ich ja versucht. Mir fehlt wohl die DLL shell32.dll. In welchen Ordner muss ich diese kopieren? Nee hab sie gefunden. Dann weiß ich nicht warum es immer noch nicht funktioniert. Habe _WIN32_IE_ auf 0x0500 gesetzt und den Header eingebunden. und die Funktion wird nicht vom Compiler erkannt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1376332</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1376332</guid><dc:creator><![CDATA[maRKus23]]></dc:creator><pubDate>Tue, 02 Oct 2007 08:07:44 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Tue, 02 Oct 2007 08:21:37 GMT]]></title><description><![CDATA[<p>Und wo hast Du das gemacht?<br />
Hoffentlich in der stdafx.h bevor Du was anderes includest.</p>
<p>Die shell32.dll gehört zum OS, die kann nicht fehlen!<br />
Außerdem wird die erst benötigt wenn Dein Programm läuft...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1376344</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1376344</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 02 Oct 2007 08:21:37 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Tue, 02 Oct 2007 08:42:06 GMT]]></title><description><![CDATA[<p>Ah okay, jetzt wird die Funktion ausgeführt. Allerdings bekomme ich eine ASSERTION.</p>
<p>Mein Code:</p>
<pre><code class="language-cpp">/* open the default document */
	/* get the path name of the default doc */
	LPSTR pszPath = new char;
	SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, NULL, pszPath);
	szPath = pszPath;
	delete pszPath;
	szPath = szPath + &quot;\\&quot; + &quot;SipromT&quot; + &quot;\\&quot; + &quot;SIPDAT.dat&quot;;
	OnOpenDocument(szPath);
</code></pre>
<p>und der file dbgheap in dem ASSERTION auftritt:</p>
<pre><code class="language-cpp">#ifdef CRTDLL
        else if ( __active_heap == __V5_HEAP )
        {
            __old_sbh_region_t * preg;
            __old_sbh_page_t *   ppage;
            __old_page_map_t *   pmap;
            if ( (pmap = __old_sbh_find_block( pHdr(pUserData), &amp;preg, &amp;ppage )) !=
                 NULL )
            {
                if ( *pmap )
                    return TRUE;
                else
                    return FALSE;
            }
            else if ( (_osver &amp; 0x8000) != 0 )
                return TRUE;
            else
                return HeapValidate( _crtheap, 0, pHdr(pUserData) );
        }
#endif  /* CRTDLL */
        else    //  __active_heap == _SYSTEM_HEAP
#endif  /* _WIN64 */
        {
            return HeapValidate( _crtheap, 0, pHdr(pUserData) );
        }

#else  /* WINHEAP */

        /*
         * Go through the heap regions and see if the pointer lies within one
         * of the regions of the local heap.
         *
         * Pointers from non-local heaps cannot be handled. For example, a
         * non-local pointer may come from a DLL that has the CRT linked-in.
         *
         */

        for (i = 0; (base = _heap_regions[i]._regbase) != NULL &amp;&amp;
                i &lt; _HEAP_REGIONMAX; i++)
        {
            if (pUserData &gt;= base &amp;&amp; pUserData &lt;
                    (void *)(((char *)base)+_heap_regions[i]._currsize))
                return TRUE;
        }

        return FALSE;

#endif  /* WINHEAP */
</code></pre>
<p>Wo liegt denn mein Fehler?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1376359</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1376359</guid><dc:creator><![CDATA[maRKus23]]></dc:creator><pubDate>Tue, 02 Oct 2007 08:42:06 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Tue, 02 Oct 2007 09:11:48 GMT]]></title><description><![CDATA[<p>Ja verstehe ich!</p>
<p>Was hast Du als Zeiger auf den Pfad überbegen, der normalerweise die Größe _MAX_PATH haben soll? Einen Puffer mit einem Byte... nett!<br />
Noch neter: Du löscht den Speicher bevor er benutzt werden kann, auch nett!<br />
Warum verwendest Du überhaupt new?</p>
<p>Ich empfehle Dir dringends mal ein paar Basics zu C/C++ zu lernen.</p>
<p>Weiterhin: Hast Du Dir schon mal Gedanken um Rückgabewerte gemacht. Was passiert wenn der User Escape drückt?</p>
<pre><code class="language-cpp">TCHAR szPath[_MAX_PATH];
SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, NULL, szPath);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1376373</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1376373</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 02 Oct 2007 09:11:48 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Tue, 02 Oct 2007 11:20:32 GMT]]></title><description><![CDATA[<p>Danke, jetzt klappts!</p>
<p>Martin Richter schrieb:</p>
<blockquote>
<p>Weiterhin: Hast Du Dir schon mal Gedanken um Rückgabewerte gemacht. Was passiert wenn der User Escape drückt?</p>
</blockquote>
<p>In meinem Programm pasiert nichts wenn der Anwender Escape drückt.<br />
Was sollte deiner Meinung nach passieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1376462</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1376462</guid><dc:creator><![CDATA[maRKus23]]></dc:creator><pubDate>Tue, 02 Oct 2007 11:20:32 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad der Application data herausfinden on Tue, 02 Oct 2007 11:37:14 GMT]]></title><description><![CDATA[<p>maRKus23 schrieb:</p>
<blockquote>
<p>Martin Richter schrieb:</p>
<blockquote>
<p>Weiterhin: Hast Du Dir schon mal Gedanken um Rückgabewerte gemacht. Was passiert wenn der User Escape drückt?</p>
</blockquote>
<p>In meinem Programm pasiert nichts wenn der Anwender Escape drückt.<br />
Was sollte deiner Meinung nach passieren?</p>
</blockquote>
<p>Vergiss es. Sorry! War mit meinen Gedanken bei der Pfadauswahl (SHBrowseForFolder) und nicht beim Laden der Standardpfade...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1376473</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1376473</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 02 Oct 2007 11:37:14 GMT</pubDate></item></channel></rss>