<?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[Ausführen eienr Applikation]]></title><description><![CDATA[<p>Hallo, ich versuche gerade eien Applikation zu bauen, welche mittels einer GUI Text und Paswort abfragt und diese dann per gpg entschlüsselt.</p>
<p>Ich habe mittels Visual C++ 2005 Express schon eine gui zusammen bekommen.</p>
<p>Jedoch weis ich nicht, wie ich in C++ ein Programm ausführen kann.</p>
<p>Ich habe hier mal folgenden Beipspielcode in PHP, welcher das geforderte erledigt:</p>
<pre><code>putenv('GNUPGHOME='.$gpg_path);

 $descriptorspec = array(
   0 =&gt; array('pipe', 'r'),  // stdin is a pipe that the child will read from
   1 =&gt; array('pipe', 'w'),  // stdout is a pipe that the child will write to
   2 =&gt; array('pipe', 'w') // stderr is a file to write to
 );

 $cwd = $pfad;

 $content = 'Ddddddddddddddddddd';
 $passwd  = 'geheim';

 $parameter.=' --decrypt';
 $parameter.=' --armor '.$pfad.$zw;

 $process = proc_open('gpg '.$parameter, $descriptorspec, $pipes);

 if (is_resource($process)) 
 {
   list($stdin, $stdout, $sterr) = $pipes;

   // den verschlüsselten String ein streamen
   fwrite($stdin, $content);
   $content = '';

   $tmp = '';
   while (!feof($stdout))
    $tmp.=fgets($stdout);

   if (strpos($tmp, 'Geben Sie die Passphrase ein:')!==false)
   {
    fwrite($stdin, $passwd);

    $tmp = '';
    while (!feof($stdout))
     $tmp.=fgets($stdout);

    if (strpos($tmp, 'Geben Sie die Passphrase ein:')!==false)
    {
     $content = $tmp;
    } else {
     $content='Passwort flasch';
    }
    unset($tmp);
    fclose($stdin);
    fclose($stdout);
    fclose($sterr);

   } else {
    fclose($stdin);
    fclose($stdout);

    while (!feof($sterr))
     $content.=fgets($sterr);

    fclose($sterr);
   }

   $return_value = proc_close($process);
 }
</code></pre>
<p>PS bitte auch die benötigten bibliotheken bei schreiben.. bin absoluter C++ Anfanger (bisher nur kleien Konsolen Aplikationen geschrieben)</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/164351/ausführen-eienr-applikation</link><generator>RSS for Node</generator><lastBuildDate>Fri, 31 Jul 2026 01:50:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/164351.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Nov 2006 14:19:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ausführen eienr Applikation on Tue, 07 Nov 2006 14:19:49 GMT]]></title><description><![CDATA[<p>Hallo, ich versuche gerade eien Applikation zu bauen, welche mittels einer GUI Text und Paswort abfragt und diese dann per gpg entschlüsselt.</p>
<p>Ich habe mittels Visual C++ 2005 Express schon eine gui zusammen bekommen.</p>
<p>Jedoch weis ich nicht, wie ich in C++ ein Programm ausführen kann.</p>
<p>Ich habe hier mal folgenden Beipspielcode in PHP, welcher das geforderte erledigt:</p>
<pre><code>putenv('GNUPGHOME='.$gpg_path);

 $descriptorspec = array(
   0 =&gt; array('pipe', 'r'),  // stdin is a pipe that the child will read from
   1 =&gt; array('pipe', 'w'),  // stdout is a pipe that the child will write to
   2 =&gt; array('pipe', 'w') // stderr is a file to write to
 );

 $cwd = $pfad;

 $content = 'Ddddddddddddddddddd';
 $passwd  = 'geheim';

 $parameter.=' --decrypt';
 $parameter.=' --armor '.$pfad.$zw;

 $process = proc_open('gpg '.$parameter, $descriptorspec, $pipes);

 if (is_resource($process)) 
 {
   list($stdin, $stdout, $sterr) = $pipes;

   // den verschlüsselten String ein streamen
   fwrite($stdin, $content);
   $content = '';

   $tmp = '';
   while (!feof($stdout))
    $tmp.=fgets($stdout);

   if (strpos($tmp, 'Geben Sie die Passphrase ein:')!==false)
   {
    fwrite($stdin, $passwd);

    $tmp = '';
    while (!feof($stdout))
     $tmp.=fgets($stdout);

    if (strpos($tmp, 'Geben Sie die Passphrase ein:')!==false)
    {
     $content = $tmp;
    } else {
     $content='Passwort flasch';
    }
    unset($tmp);
    fclose($stdin);
    fclose($stdout);
    fclose($sterr);

   } else {
    fclose($stdin);
    fclose($stdout);

    while (!feof($sterr))
     $content.=fgets($sterr);

    fclose($sterr);
   }

   $return_value = proc_close($process);
 }
</code></pre>
<p>PS bitte auch die benötigten bibliotheken bei schreiben.. bin absoluter C++ Anfanger (bisher nur kleien Konsolen Aplikationen geschrieben)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1170494</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1170494</guid><dc:creator><![CDATA[GreenRover]]></dc:creator><pubDate>Tue, 07 Nov 2006 14:19:49 GMT</pubDate></item><item><title><![CDATA[Reply to Ausführen eienr Applikation on Tue, 07 Nov 2006 18:30:47 GMT]]></title><description><![CDATA[<ul>
<li>1. Wir sind hier im MFC Forum - Versuche es mal in <strong>Webzeugs</strong></li>
<li>2. Meines Wissens kann Visual C++ 2005 Express nicht PHP auswerten, denn</li>
<li>3. PHP ist nicht C++, sondern</li>
<li>5. nur eine &quot;Sprache&quot;<br />
die auf dem Webserver ausgeführt wird.</li>
</ul>
<p>Mit freundlichen Grüßen<br />
Rhombicosidodecahedron</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1170672</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1170672</guid><dc:creator><![CDATA[Rhombicosidodecahedron]]></dc:creator><pubDate>Tue, 07 Nov 2006 18:30:47 GMT</pubDate></item><item><title><![CDATA[Reply to Ausführen eienr Applikation on Tue, 07 Nov 2006 19:50:23 GMT]]></title><description><![CDATA[<p>So, und jetzt lesen wir die Frage einfach nochmal, vielleicht verstehen wir sie ja beim zweiten Mal <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1170721</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1170721</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Tue, 07 Nov 2006 19:50:23 GMT</pubDate></item><item><title><![CDATA[Reply to Ausführen eienr Applikation on Tue, 07 Nov 2006 19:57:58 GMT]]></title><description><![CDATA[<p>GreenRover schrieb:</p>
<blockquote>
<p>Jedoch weis ich nicht, wie ich in C++ ein Programm ausführen kann.</p>
</blockquote>
<p>- CRT: spawn / _execl / system<br />
- WinAPI: CreateProcess / ShellExecute<br />
- C++/CLI: System::Diagnostics::Process::Start</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1170729</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1170729</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 07 Nov 2006 19:57:58 GMT</pubDate></item><item><title><![CDATA[Reply to Ausführen eienr Applikation on Wed, 08 Nov 2006 13:33:04 GMT]]></title><description><![CDATA[<p>Danke @ Jochen.</p>
<p>Ich vermute mal, das CreateProcess am ähnlichsten sein dürfte oder?</p>
<p>Ich kann aber igent wie kein Anwendungsbeipspiel dafür finden.<br />
Nur das: <a href="http://msdn2.microsoft.com/en-us/library/ms885182.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/ms885182.aspx</a><br />
Aber das hilft mir noch 0 weiter.</p>
<p>Hat villeich noch jemand ein kleines code beispiel für mich.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1171090</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1171090</guid><dc:creator><![CDATA[GreenRover]]></dc:creator><pubDate>Wed, 08 Nov 2006 13:33:04 GMT</pubDate></item><item><title><![CDATA[Reply to Ausführen eienr Applikation on Wed, 08 Nov 2006 13:38:56 GMT]]></title><description><![CDATA[<p><a href="http://www.google.com/search?hl=en&amp;lr=&amp;safe=off&amp;q=CreateProcess+example+C%2B%2B&amp;btnG=Search" rel="nofollow">http://www.google.com/search?hl=en&amp;lr=&amp;safe=off&amp;q=CreateProcess+example+C%2B%2B&amp;btnG=Search</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1171096</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1171096</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Wed, 08 Nov 2006 13:38:56 GMT</pubDate></item><item><title><![CDATA[Reply to Ausführen eienr Applikation on Wed, 08 Nov 2006 13:55:02 GMT]]></title><description><![CDATA[<p>Zweites Beispiel in:<br />
<a href="http://msdn2.microsoft.com/en-gb/library/edze9h7e.aspx" rel="nofollow">http://msdn2.microsoft.com/en-gb/library/edze9h7e.aspx</a></p>
<p>Oder:<br />
<a href="http://support.microsoft.com/kb/190351" rel="nofollow">http://support.microsoft.com/kb/190351</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1171111</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1171111</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Wed, 08 Nov 2006 13:55:02 GMT</pubDate></item><item><title><![CDATA[Reply to Ausführen eienr Applikation on Sat, 11 Nov 2006 14:27:12 GMT]]></title><description><![CDATA[<p>soory ich lese und probier schon wieder fast ein tag und bekomme es einfach nicht zustande...</p>
<p>kann mir nicht einer den oben geposteten code schnell auf C++ übersetzen?</p>
<p>währe echt dankbar.</p>
<p>EDIT:<br />
Ich habe zwar schon ein paar tutorials durch wie diese:<br />
<a href="http://www.catch22.net/tuts/undoc01.asp" rel="nofollow">http://www.catch22.net/tuts/undoc01.asp</a><br />
Jedoch bekomm ich da immer nur folgenden Fehler.<br />
fatal error C1083: Cannot open include file: 'windows.h': No such file or directory</p>
<p>Diese Header Datei wird aber in sehr sher vielen Tutorials benötigt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1172406</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1172406</guid><dc:creator><![CDATA[GreenRover]]></dc:creator><pubDate>Sat, 11 Nov 2006 14:27:12 GMT</pubDate></item><item><title><![CDATA[Reply to Ausführen eienr Applikation on Mon, 13 Nov 2006 10:40:11 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;windows&gt;
</code></pre>
<p>hab ich aber selber noch nie includiert das macht das stdafx,h fuer mich #gg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1173487</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1173487</guid><dc:creator><![CDATA[EXDW]]></dc:creator><pubDate>Mon, 13 Nov 2006 10:40:11 GMT</pubDate></item><item><title><![CDATA[Reply to Ausführen eienr Applikation on Mon, 13 Nov 2006 17:03:17 GMT]]></title><description><![CDATA[<p>So nun habe ich eine Fehler..<br />
Zu der express version, muss man sich erstens das SDK saugen und es 2tens noch manuell verlinken..</p>
<p>aber nun schmeist mir das ganze folgenden fehler...</p>
<pre><code>d:\visual studio 2005\projects\test 123\test 123\undoc01.cpp(80) : error C2664: 'GetModuleFileNameW' : cannot convert parameter 2 from 'char [200]' to 'LPWCH'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
d:\visual studio 2005\projects\test 123\test 123\undoc01.cpp(83) : error C2664: 'CreateProcessW' : cannot convert parameter 2 from 'char [200]' to 'LPWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
d:\visual studio 2005\projects\test 123\test 123\undoc01.cpp(95) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'LPBYTE' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
d:\visual studio 2005\projects\test 123\test 123\undoc01.cpp(113) : error C2664: 'GetShortcutName' : cannot convert parameter 1 from 'char [200]' to 'TCHAR *'
</code></pre>
<p>auf das oben genannte tutorial.<br />
aber die parameter stimmen können sich doch nicht mal ebend geänder haben ?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1173827</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1173827</guid><dc:creator><![CDATA[GreenRover]]></dc:creator><pubDate>Mon, 13 Nov 2006 17:03:17 GMT</pubDate></item><item><title><![CDATA[Reply to Ausführen eienr Applikation on Mon, 13 Nov 2006 17:50:54 GMT]]></title><description><![CDATA[<p>im Visual Studio 2005 werden neue Projekte standardmäßig als Unicode kompiliert und nciht mehr als MultiByte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1173857</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1173857</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Mon, 13 Nov 2006 17:50:54 GMT</pubDate></item><item><title><![CDATA[Reply to Ausführen eienr Applikation on Tue, 14 Nov 2006 09:17:49 GMT]]></title><description><![CDATA[<p>Ähmmm und wie löse ich das Problem nun???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1174263</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1174263</guid><dc:creator><![CDATA[GreenRover]]></dc:creator><pubDate>Tue, 14 Nov 2006 09:17:49 GMT</pubDate></item><item><title><![CDATA[Reply to Ausführen eienr Applikation on Tue, 14 Nov 2006 10:34:29 GMT]]></title><description><![CDATA[<p>ersetze char durch TCHAR und &quot;mein string-inhalt&quot; durch _T(&quot;mein string-inhalt&quot;)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1174332</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1174332</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Tue, 14 Nov 2006 10:34:29 GMT</pubDate></item></channel></rss>