Article View: borland.public.cppbuilder.nativeapi
Article #8491Re: ShellExecute
From: David Ayre
Date: Tue, 19 Oct 2004 10:30
Date: Tue, 19 Oct 2004 10:30
66 lines
2761 bytes
2761 bytes
Thanks JF, I tried it and it worked fine. Cheers, David "David Ayre" <davidcayre@aol.com> wrote: > >Thanks JF, > >I'll give it a try. > >Cheers, > >David > > >JF Jolin <jfj@nospam.com> wrote: >>Sorry for the messy look. I hope this one will be fine. >> >>You could have a much better control over executable launching with >>CreateProcess() >> STARTUPINFO StartupInfo; >> PROCESS_INFORMATION ProcessInformation; >> BOOL bProcessOk; >> memset(&StartupInfo, 0, sizeof(STARTUPINFO)); >> StartupInfo.cb = sizeof(STARTUPINFO); >> StartupInfo.dwFlags = STARTF_USESHOWWINDOW; >> StartupInfo.wShowWindow = SW_SHOWNORMAL; >> memset(&ProcessInformation, 0, sizeof(PROCESS_INFORMATION)); >> /* >> Parameters Information for CreateProcess >> >> pointer to name of executable module pointer to command line string >> pointer to process security attributes >> pointer to thread security attributes >> handle inheritance flag >> creation flags >> pointer to new environment block >> pointer to current directory name >> pointer to STARTUPINFO >> pointer to PROCESS_INFORMATION >>*/ >> >> bProcessOk = CreateProcess( >> (LPCTSTR) NULL, >> (LPTSTR) szCommand, >> (LPSECURITY_ATTRIBUTES) NULL, >> (LPSECURITY_ATTRIBUTES) NULL, >> (BOOL) TRUE, >> (DWORD) CREATE_NEW_CONSOLE | >> NORMAL_PRIORITY_CLASS, >> (LPVOID) NULL, >> (LPCTSTR) NULL, >> (LPSTARTUPINFO) &StartupInfo, >> (LPPROCESS_INFORMATION) &ProcessInformation); >> >> >>-- >>JF Jolin >>[Montreal, Canada] >
Technical Details
Message-ID:
<4174ece3$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<416febd4$1@newsgroups.borland.com> <opsfztbx0ez6rw7b@newsgroups.borland.com> <opsfz1m71qz6rw7b@newsgroups.borland.com> <41737eca$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,345bff3d3bc63eb6 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "David Ayre" <davidcayre@aol.com> Sender: "David Ayre" <davidcayre@aol.com> Reply-To: "David Ayre" <davidcayre@aol.com> Subject: Re: ShellExecute Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 195.93.33.9 References: <416febd4$1@newsgroups.borland.com> <opsfztbx0ez6rw7b@newsgroups.borland.com> <opsfz1m71qz6rw7b@newsgroups.borland.com> <41737eca$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <4174ece3$1@newsgroups.borland.com> Date: 19 Oct 2004 03:30:59 -0700 X-Trace: newsgroups.borland.com 1098181859 207.105.83.66 (19 Oct 2004 03:30:59 -0700) Lines: 67 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail