🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8480

Re: ShellExecute

#8480
From: David Ayre
Date: Mon, 18 Oct 2004 08:28
54 lines
2515 bytes
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: <41737eca$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <416febd4$1@newsgroups.borland.com> <opsfztbx0ez6rw7b@newsgroups.borland.com> <opsfz1m71qz6rw7b@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>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <41737eca$1@newsgroups.borland.com>
Date: 18 Oct 2004 01:28:58 -0700
X-Trace: newsgroups.borland.com 1098088138 207.105.83.66 (18 Oct 2004 01:28:58 -0700)
Lines: 55
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail