🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: CreateProcess() passing cmd line args

#16067
From: CC
Date: Mon, 02 Jun 2003 18:13
36 lines
1955 bytes
Remy - Many thanks again:)
CurtC
"CC" <Xcurtc@tmscorp.com> wrote in message
news:3ed7bb90@newsgroups.borland.com...
> Greetings;
> I'm using CreateProcess() to invoke another program.
>
> Ex:
> char *appname = "c:\mytest.exe";
> char *args="/myarg1";
>
> When I call :
>
> CreateProcess(appname, args, .......);
>
> When application "mytest.exe"  calls  ParamCount(), the value is Zero.
>
> It seems to be that I cannot pass arguments as the 2nd parameter to
> CreateProcess()?
>
> The application does work when I include the full command line such as:
> char *fullcmdline = "c:\mytest.exe /myarg1";
> CreateProcess(NULL,fullcmdline,.....);
> This works,
>
> I'm really confused on how to call this api - should arguments passed in
> separately? or on full command line?
> What then is the purpose of having the first 2 parameters for
> CreateProcess() Why not have just a
> command line?
>
> Any insight would be much appreciated.
> Thanks
> CurtC
>
>
Technical Details
Message-ID: <3edb93aa$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ed7bb90@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-06-02 11:20:09 PST
From: "CC" <Xcurtc@tmscorp.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ed7bb90@newsgroups.borland.com>
Subject: Re: CreateProcess() passing cmd line args
Date: Mon, 2 Jun 2003 13:13:39 -0500
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 208.254.250.201
Message-ID: <3edb93aa$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1054577578 208.254.250.201 (2 Jun 2003 11:12:58 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail