🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: CreateProcess() passing cmd line args

#16124
From: Bob Gonder
Date: Sat, 31 May 2003 17:54
30 lines
2388 bytes
"Remy Lebeau \(TeamB\)" wrote:
>"Bob Gonder"  wrote in message
>
>> I believe the docs suggest that you supply a full
>> command line as the second parameter, even if
>> you use the first also.
>> ie:
>> CreateProcess( "Command.exe", "Command.exe Parameters",....)
>
>That would probably do it, but I haven't tested it yet.  Though, I get no
>such impression from reading the docs as to needing to do that.

Quote:
If both lpApplicationName and lpCommandLine are non-NULL,
*lpApplicationName specifies the module to execute, and *lpCommandLine
specifies the command line. The new process can use GetCommandLine to
retrieve the entire command line. C runtime processes can use the argc
and argv arguments. 

To me, that implies lpApp.. is Not passed..only lpCommandline is
passed.  Since by convention, the first parameter on the command line
is the executable....  Also note:

Windows NT: If the executable module is a 16-bit application,
lpApplicationName should be NULL, and the string pointed to by
lpCommandLine should specify the executable module.

This is saying lpCommandLine should be the entire command line (in a
certain case).  It seems reasonable to me that Windows would just pass
lpCommandLine to the command line parser, without any funny business.
Technical Details
Message-ID: <qdqhdvsovs9dgm4ravtmt72ojl0k8jrdmb@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ed7bb90@newsgroups.borland.com> <3ed7d9d1$1@newsgroups.borland.com> <tc8gdv0dcqprq4q6ef4on5lsoipofdkgea@4ax.com> <3ed82b1b@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,bd638ff0f0e40f6
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-31 10:56:11 PST
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: CreateProcess() passing cmd line args
Date: Sat, 31 May 2003 10:54:34 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <qdqhdvsovs9dgm4ravtmt72ojl0k8jrdmb@4ax.com>
References: <3ed7bb90@newsgroups.borland.com> <3ed7d9d1$1@newsgroups.borland.com> <tc8gdv0dcqprq4q6ef4on5lsoipofdkgea@4ax.com> <3ed82b1b@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.31.185.207
X-Trace: newsgroups.borland.com 1054403620 67.31.185.207 (31 May 2003 10:53:40 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail