<?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 unsichtbar klappt nicht]]></title><description><![CDATA[<p>hallo, ich habe folgendes getestet:</p>
<pre><code class="language-cpp">int processid = NULL;

	string m_firefoxPath = &quot;C:\\Program Files (x86)\\Mozilla Firefox&quot;;

	STARTUPINFO si;
	PROCESS_INFORMATION pi;

	ZeroMemory( &amp;si, sizeof(si) );
	si.cb = sizeof(si);
	si.wShowWindow = SW_HIDE;
	ZeroMemory( &amp;pi, sizeof(pi) );

	string m_EXE = m_firefoxPath + &quot;\\firefox.exe&quot;;

	int hProcess = CreateProcessA( m_EXE.c_str( ), NULL, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, m_firefoxPath.c_str( ), LPSTARTUPINFOA(&amp;si), &amp;pi );

	if( !hProcess )
	{	
		cout &lt;&lt; &quot;CreateProcess failed&quot; &lt;&lt; GetLastError() &lt;&lt; endl;
		return;
	}
	else
		processid = int(pi.dwProcessId);

	CloseHandle( pi.hProcess );
	CloseHandle( pi.hThread );

	hProcess = NULL;

	HWND h = GetTopWindow( 0 );

	while ( h )
	{
		DWORD pid;
		DWORD dwTheardId = GetWindowThreadProcessId( h, NULL );

		if ( pid == processid )
		{
			cout &lt;&lt; &quot;Found!&quot; &lt;&lt; endl;
			ShowWindow(h,SW_MINIMIZE);
			UpdateWindow(h);
			break;
        }

		h = GetNextWindow( h , GW_HWNDNEXT);
	}
</code></pre>
<p>klappt nur leider 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/topic/245653/createprocess-unsichtbar-klappt-nicht</link><generator>RSS for Node</generator><lastBuildDate>Fri, 03 Apr 2026 18:42:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/245653.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Jul 2009 18:09:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to createprocess unsichtbar klappt nicht on Thu, 16 Jul 2009 18:10:15 GMT]]></title><description><![CDATA[<p>hallo, ich habe folgendes getestet:</p>
<pre><code class="language-cpp">int processid = NULL;

	string m_firefoxPath = &quot;C:\\Program Files (x86)\\Mozilla Firefox&quot;;

	STARTUPINFO si;
	PROCESS_INFORMATION pi;

	ZeroMemory( &amp;si, sizeof(si) );
	si.cb = sizeof(si);
	si.wShowWindow = SW_HIDE;
	ZeroMemory( &amp;pi, sizeof(pi) );

	string m_EXE = m_firefoxPath + &quot;\\firefox.exe&quot;;

	int hProcess = CreateProcessA( m_EXE.c_str( ), NULL, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, m_firefoxPath.c_str( ), LPSTARTUPINFOA(&amp;si), &amp;pi );

	if( !hProcess )
	{	
		cout &lt;&lt; &quot;CreateProcess failed&quot; &lt;&lt; GetLastError() &lt;&lt; endl;
		return;
	}
	else
		processid = int(pi.dwProcessId);

	CloseHandle( pi.hProcess );
	CloseHandle( pi.hThread );

	hProcess = NULL;

	HWND h = GetTopWindow( 0 );

	while ( h )
	{
		DWORD pid;
		DWORD dwTheardId = GetWindowThreadProcessId( h, NULL );

		if ( pid == processid )
		{
			cout &lt;&lt; &quot;Found!&quot; &lt;&lt; endl;
			ShowWindow(h,SW_MINIMIZE);
			UpdateWindow(h);
			break;
        }

		h = GetNextWindow( h , GW_HWNDNEXT);
	}
</code></pre>
<p>klappt nur leider 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/1744459</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1744459</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Thu, 16 Jul 2009 18:10:15 GMT</pubDate></item><item><title><![CDATA[Reply to createprocess unsichtbar klappt nicht on Thu, 16 Jul 2009 18:26:15 GMT]]></title><description><![CDATA[<p>Starte es doch auf einem eigenen Desktop <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1744466</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1744466</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 16 Jul 2009 18:26:15 GMT</pubDate></item><item><title><![CDATA[Reply to createprocess unsichtbar klappt nicht on Thu, 16 Jul 2009 19:15:51 GMT]]></title><description><![CDATA[<p>Jochen Kalmbach schrieb:</p>
<blockquote>
<p>Starte es doch auf einem eigenen Desktop <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>hä, wie soll ich das jetzt verstehen?<br />
Ich möchte unsichtbar firefox öffnen und dann eine eingabe simulieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1744483</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1744483</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Thu, 16 Jul 2009 19:15:51 GMT</pubDate></item><item><title><![CDATA[Reply to createprocess unsichtbar klappt nicht on Fri, 17 Jul 2009 08:51:35 GMT]]></title><description><![CDATA[<p>Besser wäre vermutlich noch eine eigene WindowStation zu verwenden...<br />
Also entweder: CreateDesktop oder CreateWindowStation<br />
Und bei CreateProcess dann den Parameter &quot;lpDesktop&quot; von StartupInfo entsprechend füllen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1744668</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1744668</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Fri, 17 Jul 2009 08:51:35 GMT</pubDate></item></channel></rss>