<?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[EXE in EXE einbinden?]]></title><description><![CDATA[<p>Ist es möglich eine andere EXE in eine eigene einzubetten, sodass man nurnoch eine hat?</p>
<p>Ich möchte nämlich ein Programm ca 20mal starten. Dafür wollte ich ein neues schreiben. bis dahin klappt ja alles, allerdings habe ich nun 2 Dateien. Von dahher wollte ich gerne das erste Programm in mein Programm einbinden und dass es sich dann dort selbst 20 mal starten...<br />
Kann ich das eine Programm in meins einbinden?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/224013/exe-in-exe-einbinden</link><generator>RSS for Node</generator><lastBuildDate>Fri, 02 Oct 2026 18:25:56 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/224013.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Oct 2008 09:35:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to EXE in EXE einbinden? on Sat, 04 Oct 2008 09:35:56 GMT]]></title><description><![CDATA[<p>Ist es möglich eine andere EXE in eine eigene einzubetten, sodass man nurnoch eine hat?</p>
<p>Ich möchte nämlich ein Programm ca 20mal starten. Dafür wollte ich ein neues schreiben. bis dahin klappt ja alles, allerdings habe ich nun 2 Dateien. Von dahher wollte ich gerne das erste Programm in mein Programm einbinden und dass es sich dann dort selbst 20 mal starten...<br />
Kann ich das eine Programm in meins einbinden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1593253</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1593253</guid><dc:creator><![CDATA[----]]></dc:creator><pubDate>Sat, 04 Oct 2008 09:35:56 GMT</pubDate></item><item><title><![CDATA[Reply to EXE in EXE einbinden? on Sat, 04 Oct 2008 10:07:09 GMT]]></title><description><![CDATA[<p>du kannst die exe als ressource vom typ RT_RCDATA in deine Application einbinden, zur Laufzeit in eine temporäre Datei schreiben und dann ausführen.</p>
<p>So oder so ähnlich sieht dann das speichern der ressource in eine datei aus:</p>
<pre><code class="language-cpp">const char* filename=&quot;irgendEinDatainame.exe&quot;;
  HRSRC hResource;
  HGLOBAL hResourceLoaded;
  LPBYTE lpBuffer;

  hResource = FindResource(NULL, MAKEINTRESOURCE(IDR_ID_DEINER_RESSOURCE), RT_RCDATA);
  if (NULL != hResource)
  {
      hResourceLoaded = LoadResource(NULL, hResource);
      if (NULL != hResourceLoaded)        
      {
          lpBuffer = (LPBYTE) LockResource(hResourceLoaded);            
          if (NULL != lpBuffer)            
          {                
              DWORD dwFileSize,
                    dwBytesWritten;
              HANDLE hFile;

              dwFileSize = SizeofResource(NULL, hResource);

              hFile = CreateFile(filename,
                                 GENERIC_WRITE,
                                 0,
                                 NULL,
                                 CREATE_ALWAYS,
                                 FILE_ATTRIBUTE_NORMAL,
                                 NULL);

              if (INVALID_HANDLE_VALUE != hFile)
              {
                  WriteFile(hFile, lpBuffer, dwFileSize, &amp;dwBytesWritten, NULL);
                  CloseHandle(hFile);
              }
           }
       }
  }
</code></pre>
<p>einen Dateinamen kannst du mit GetTempFileName erzeugen.</p>
<p>Ob man die auch direkt vom Speicher ausführen kann weiß ich nicht, ich denke dass geht nicht so einfach.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1593258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1593258</guid><dc:creator><![CDATA[vlad_tepesch]]></dc:creator><pubDate>Sat, 04 Oct 2008 10:07:09 GMT</pubDate></item><item><title><![CDATA[Reply to EXE in EXE einbinden? on Mon, 06 Oct 2008 18:18:09 GMT]]></title><description><![CDATA[<p>Danke schonmal, allerdings kenne ich mich nich so gut aus, der Code funktioniert nicht...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1594415</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1594415</guid><dc:creator><![CDATA[---]]></dc:creator><pubDate>Mon, 06 Oct 2008 18:18:09 GMT</pubDate></item><item><title><![CDATA[Reply to EXE in EXE einbinden? on Tue, 07 Oct 2008 06:00:49 GMT]]></title><description><![CDATA[<blockquote>
<p>der Code funktioniert nicht...</p>
</blockquote>
<p>Huch... überschwemm uns nicht mit allzuviel nützlicher information...<br />
Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1594565</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1594565</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Tue, 07 Oct 2008 06:00:49 GMT</pubDate></item><item><title><![CDATA[Reply to EXE in EXE einbinden? on Tue, 07 Oct 2008 09:18:58 GMT]]></title><description><![CDATA[<p>Wenn ich auf meine EXE klicke, dann wird nichts ausgeführt. Ressource etc sind eingebunden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1594664</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1594664</guid><dc:creator><![CDATA[---]]></dc:creator><pubDate>Tue, 07 Oct 2008 09:18:58 GMT</pubDate></item><item><title><![CDATA[Reply to EXE in EXE einbinden? on Tue, 07 Oct 2008 09:33:19 GMT]]></title><description><![CDATA[<p>Mit welcher IDE arbeitest du? Microsoft Visual Studio C++? Falls ja, probier doch mal ob du die exe als Resource einbinden kannst. Dann kannst du sie ganz easy aufrufen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1594676</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1594676</guid><dc:creator><![CDATA[Kóyaánasqatsi]]></dc:creator><pubDate>Tue, 07 Oct 2008 09:33:19 GMT</pubDate></item><item><title><![CDATA[Reply to EXE in EXE einbinden? on Tue, 07 Oct 2008 10:30:52 GMT]]></title><description><![CDATA[<p>Ja, mit MC VC++ EE.<br />
Kannst Du mir das genauer Erklären? Ich hab die Exe als Ressource vom typ RT_RCDATA. Wie führ ich die dann aus?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1594715</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1594715</guid><dc:creator><![CDATA[---]]></dc:creator><pubDate>Tue, 07 Oct 2008 10:30:52 GMT</pubDate></item><item><title><![CDATA[Reply to EXE in EXE einbinden? on Tue, 07 Oct 2008 10:34:36 GMT]]></title><description><![CDATA[<p>1. Falsches Forum. Gehört nach WinAPI<br />
2. Hat Dir vlad_tepesch bereits Code gegeben um die Resource zu extrahieren.<br />
3. Ausführen dann einfach mit ShellExcute(Ex) oder CreateProcess</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1594718</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1594718</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 07 Oct 2008 10:34:36 GMT</pubDate></item><item><title><![CDATA[Reply to EXE in EXE einbinden? on Tue, 07 Oct 2008 17:37:29 GMT]]></title><description><![CDATA[<p>Ja, aber es passiert einfach nichts, wenn ich es ausführe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595003</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595003</guid><dc:creator><![CDATA[---]]></dc:creator><pubDate>Tue, 07 Oct 2008 17:37:29 GMT</pubDate></item><item><title><![CDATA[Reply to EXE in EXE einbinden? on Tue, 07 Oct 2008 18:47:43 GMT]]></title><description><![CDATA[<p>GetLastError sagt Dir was?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1595059</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1595059</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 07 Oct 2008 18:47:43 GMT</pubDate></item></channel></rss>