<?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[CreateProcess &amp;amp; WaitForIdleInput]]></title><description><![CDATA[<p>Hi,</p>
<p>ich will einen process erzeugen und dann darauf warten das dieser bereit ist, jedoch löst wait for idle input zu früh für den process aus so das er die eingaben die dann an ihn geschikt werden <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /> nicht verarbeitet, ich weiß das z.B. AutoIt da ne funktion hat die das hinkriegt, weiß da jemand rat wie ich das mache das er sich dann meldet wenn der prozess für eingaben bereit ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/233906/createprocess-amp-waitforidleinput</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 19:20:58 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/233906.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 10 Feb 2009 18:58:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CreateProcess &amp;amp; WaitForIdleInput on Tue, 10 Feb 2009 18:58:58 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ich will einen process erzeugen und dann darauf warten das dieser bereit ist, jedoch löst wait for idle input zu früh für den process aus so das er die eingaben die dann an ihn geschikt werden <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /> nicht verarbeitet, ich weiß das z.B. AutoIt da ne funktion hat die das hinkriegt, weiß da jemand rat wie ich das mache das er sich dann meldet wenn der prozess für eingaben bereit ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1661342</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1661342</guid><dc:creator><![CDATA[Schurke]]></dc:creator><pubDate>Tue, 10 Feb 2009 18:58:58 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess &amp;amp; WaitForIdleInput on Tue, 10 Feb 2009 19:25:44 GMT]]></title><description><![CDATA[<p>Wie sendest Du die Eingaben? WaitForInputIdle macht es genau richtig.<br />
Wenn Du allerdings meinst mit SendMessage und WM_KEYDOWN Nachrichten Eingaben zu simulieren, dann mag das sicherlich so nicht gehen...<br />
<a href="http://blog.m-ri.de/index.php/2007/12/27/die-unsitte-tastatureingaben-mit-wm_keydown-nachrichten-zu-simulieren/" rel="nofollow">http://blog.m-ri.de/index.php/2007/12/27/die-unsitte-tastatureingaben-mit-wm_keydown-nachrichten-zu-simulieren/</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1661359</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1661359</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 10 Feb 2009 19:25:44 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess &amp;amp; WaitForIdleInput on Thu, 12 Feb 2009 10:39:42 GMT]]></title><description><![CDATA[<p>Ich emulier die tastendrücke mit SendInput <sup>_</sup></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1662355</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1662355</guid><dc:creator><![CDATA[Schurke]]></dc:creator><pubDate>Thu, 12 Feb 2009 10:39:42 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess &amp;amp; WaitForIdleInput on Thu, 12 Feb 2009 10:46:14 GMT]]></title><description><![CDATA[<p>Dann werden die Eingabe auch gequeued und kommen an... Ansonsten könntest Du zusätzlich warten das Fenster des Prozess wirklich im Vordergrund liegt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1662365</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1662365</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Thu, 12 Feb 2009 10:46:14 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess &amp;amp; WaitForIdleInput on Thu, 12 Feb 2009 11:33:20 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">BOOL CALLBACK MyEnProcc( HWND hwnd, LPARAM lParam){
  CallParams * Call = (CallParams*)lParam;
  SetFocus(hwnd);
  short VK = 0;
  INPUT input;
  std::fill(reinterpret_cast &lt; char* &gt; ( &amp;input ), reinterpret_cast &lt; char* &gt; ( &amp;input )+sizeof(INPUT),0);
  input.type = INPUT_KEYBOARD;
  for ( unsigned int i = 0; i &lt; Call-&gt;User.length(); i++ ){
    char Key = std::tolower(Call-&gt;User[i]);
    input.ki.wVk = VkKeyScanEx( Key, GetKeyboardLayout( NULL ) );
    SendInput(1,&amp;input,sizeof(INPUT));
  }
  AttachThreadInput( GetCurrentThreadId(), Call-&gt;WoW.dwThreadId, false );
return false;

}
</code></pre>
<pre><code class="language-cpp">Start ( std::string WoWPath, std::string DNS, std::string User, std::string Password ){

  CallParams * Call = new CallParams;
  Call-&gt;User = User;
  Call-&gt;Pass = Password;
  STARTUPINFO SInfo;
  std::fill ( (__int8*)&amp;SInfo, (__int8*)&amp;SInfo + sizeof(STARTUPINFO), 0);
  SInfo.cb = sizeof(STARTUPINFO);
  std::fill ( (__int8*)&amp;Call-&gt;WoW, (__int8*)&amp;Call-&gt;WoW + sizeof(PROCESS_INFORMATION), 0);
  BOOL bResult;
  bool Success = CreateProcess( ( WoWPath + (std::string)&quot;\\wow.exe&quot; ).c_str(), &quot;&quot;, 0, 0, false, NORMAL_PRIORITY_CLASS, 0, 0, &amp;SInfo, &amp;Call-&gt;WoW );
  if ( Success ){
    WaitForInputIdle(Call-&gt;WoW.hProcess,INFINITE);
    if ( AttachThreadInput( GetCurrentThreadId(), Call-&gt;WoW.dwThreadId, true ) ){
     bResult = EnumThreadWindows( Call-&gt;WoW.dwThreadId, (WNDENUMPROC)MyEnProcc, (LPARAM)Call );
    }

  }
}
</code></pre>
<p>Hmm aber ürgentwas stimmt da noch nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1662405</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1662405</guid><dc:creator><![CDATA[Schurke]]></dc:creator><pubDate>Thu, 12 Feb 2009 11:33:20 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess &amp;amp; WaitForIdleInput on Thu, 12 Feb 2009 11:41:44 GMT]]></title><description><![CDATA[<p>Wenn Direct-Input verwendet wird funktioniert SendInput IMHO nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1662413</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1662413</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Thu, 12 Feb 2009 11:41:44 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess &amp;amp; WaitForIdleInput on Thu, 12 Feb 2009 12:00:20 GMT]]></title><description><![CDATA[<p>*IMHO google* , Naja es funktioniert, das habe ich schon getestet. jedoch etwas zu früh, es erkennt die messages nur wenn ich dem progrmam selbst sage wann das fenster wirklich fertig ist im aufbau</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1662426</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1662426</guid><dc:creator><![CDATA[Schurke]]></dc:creator><pubDate>Thu, 12 Feb 2009 12:00:20 GMT</pubDate></item></channel></rss>