🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Command Line parameters of external process

#5289
From: Remy Lebeau (TeamB)
Date: Wed, 14 Sep 2005 17:50
19 lines
1777 bytes
"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: <432862ea@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43285cf6@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
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <43285cf6@newsgroups.borland.com>
Subject: Re: Command Line parameters of external process
Date: Wed, 14 Sep 2005 10:50:44 -0700
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <432862ea@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1126720234 68.69.17.41 (14 Sep 2005 10:50:34 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail