<?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[Name der MDB über GetModuleFileName finden?]]></title><description><![CDATA[<p>Visual C++ 2008<br />
x86 - xp Prof<br />
MS Access</p>
<p>Hallo,</p>
<p>mit dieser Funktion erhalte ich den Namen MSACCESS.EXE</p>
<pre><code class="language-cpp">...
char		szAppPath[MAX_PATH] = &quot;&quot;;
std::string	sAppDir;
// Hier wird der Pfad der DLL wg. hInstance
//::GetModuleFileNameA(hInstance, szAppPath, sizeof(szAppPath) - 1);

// und hier von MSACCESS.exe wg. NULL angezeigt/eingelesen
::GetModuleFileNameA(NULL, szAppPath, sizeof(szAppPath) - 1);
sAppDir = szAppPath;

// nicht Pfad sondern ModulName auslesen
sAppDir = sAppDir.substr(sAppDir.rfind(&quot;\\&quot;)+1,sAppDir.length());
...
</code></pre>
<p>Gibt es auch eine Möglichkeit, um den Namen der MDB zu erfahren?</p>
<p>Vielen Dank</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/271501/name-der-mdb-über-getmodulefilename-finden</link><generator>RSS for Node</generator><lastBuildDate>Sat, 29 Aug 2026 12:53:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/271501.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 29 Jul 2010 14:14:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Name der MDB über GetModuleFileName finden? on Thu, 29 Jul 2010 14:14:56 GMT]]></title><description><![CDATA[<p>Visual C++ 2008<br />
x86 - xp Prof<br />
MS Access</p>
<p>Hallo,</p>
<p>mit dieser Funktion erhalte ich den Namen MSACCESS.EXE</p>
<pre><code class="language-cpp">...
char		szAppPath[MAX_PATH] = &quot;&quot;;
std::string	sAppDir;
// Hier wird der Pfad der DLL wg. hInstance
//::GetModuleFileNameA(hInstance, szAppPath, sizeof(szAppPath) - 1);

// und hier von MSACCESS.exe wg. NULL angezeigt/eingelesen
::GetModuleFileNameA(NULL, szAppPath, sizeof(szAppPath) - 1);
sAppDir = szAppPath;

// nicht Pfad sondern ModulName auslesen
sAppDir = sAppDir.substr(sAppDir.rfind(&quot;\\&quot;)+1,sAppDir.length());
...
</code></pre>
<p>Gibt es auch eine Möglichkeit, um den Namen der MDB zu erfahren?</p>
<p>Vielen Dank</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1933600</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1933600</guid><dc:creator><![CDATA[01Beginner]]></dc:creator><pubDate>Thu, 29 Jul 2010 14:14:56 GMT</pubDate></item></channel></rss>