🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Command Line parameters of external process

#5290
From: boost
Date: Wed, 14 Sep 2005 18:45
31 lines
2062 bytes
Yeah I agree, but an app named TaskInfo does it... I would like to think 
that there is a straightforward way to get that information, hope anyone 
can come up with any tip.

thanks for the help

boost

Remy Lebeau (TeamB) wrote:
> "boost" <boost@boostnetwork.net> wrote in message
> news:43285cf6@newsgroups.borland.com...
> 
> 
>>I would like to know how to get the parameters in the
>>commandline used to launch a process running on the system.
> 
> 
> That information is not directly available outside of the original process.
> A process can query its own command-line, but a process cannot directly
> query the command-line of another process.  The only way I can think of
> doing it is to write a DLL and then inject it into the process that you want
> to query.  The DLL becomes part of the process and thus can then call
> GetCommandLine() and send the data back to your application via WM_COPYDATA
> or any other form of IPC (inter-process communication) that you want to use.
> There might be other ways to accomplish the same thing, but I do not know
> them.
> 
> 
> Gambit
> 
> 
Technical Details
Message-ID: <43286f61@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <43285cf6@newsgroups.borland.com> <432862ea@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,729416537093a304
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 14 Sep 2005 20:45:10 +0200
From: boost <boost@boostnetwork.net>
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Command Line parameters of external process
References: <43285cf6@newsgroups.borland.com> <432862ea@newsgroups.borland.com>
In-Reply-To: <432862ea@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 83.36.42.36
Message-ID: <43286f61@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1126723425 83.36.42.36 (14 Sep 2005 11:43:45 -0700)
Lines: 31
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail