Article View: borland.public.cppbuilder.nativeapi
Article #8912Starting an app in the background
From: Peter Rees
Date: Mon, 30 Aug 2004 20:55
Date: Mon, 30 Aug 2004 20:55
25 lines
1731 bytes
1731 bytes
Hi all,
I am using the following code to start another process ( exe file ). I want
the application that I am starting ( child ) to go into the background and
this application ( parent ) to remain in the foreground.
Can someone advise what I need to do to accomplish this
TIA
Peter
// --- snip ----
memset(&sStartUpInfo,0, sizeof(sStartUpInfo)) ;
sStartUpInfo.cb = sizeof(sStartUpInfo) ;
sStartUpInfo.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES ;
sStartUpInfo.hStdInput = GetStdHandle( STD_INPUT_HANDLE ) ;
sStartUpInfo.hStdOutput= GetStdHandle( STD_OUTPUT_HANDLE );
sStartUpInfo.hStdError = GetStdHandle( STD_ERROR_HANDLE );
sStartUpInfo.wShowWindow = SW_SHOWDEFAULT ;
nExitCode =CreateProcess(NULL, cParam, NULL, NULL, FALSE,
CREATE_NEW_CONSOLE |
NORMAL_PRIORITY_CLASS,NULL,NULL, &sStartUpInfo, &sProcessInfo) ;
Technical Details
Message-ID:
<4133938c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,227ce0fabfae12c2,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Peter Rees" <peter@NOOSPAMMrees.co.nz> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Starting an app in the background Date: Tue, 31 Aug 2004 08:55:57 +1200 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 219.88.101.36 Message-ID: <4133938c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1093899148 219.88.101.36 (30 Aug 2004 13:52:28 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail