🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Retrieving the Start from directory

#6638
From: Remy Lebeau (TeamB)
Date: Wed, 20 Apr 2005 22:40
19 lines
1935 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:4266d972@newsgroups.borland.com...

> Well, I won't say "no way".  You can use WMI, but the code is quite ugly.
> You can also use the Toolhelp API, but then you have to walk through all
> running process IDs one at a time.  Plus, the Toolhelp API is not
available
> on NT4, if you need to support that platform.  Alternatively, you can use
> NtQueryInformationProcess(), which is only available on W2K or higher.

With that said, though, none of them will probably help you anyway, since a
BAT file is not an executable on its own, it is just an interpreted script
file that runs in the context of a console process.  So if an EXE were
loaded from a BAT File, the filename of the parent process would end up
being the console's filename, not the BAT filename.


Gambit
Technical Details
Message-ID: <4266d9e5$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.wiretrip.org!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4266bf60@newsgroups.borland.com> <4266c43b@newsgroups.borland.com> <4266c896$1@newsgroups.borland.com> <4266d972@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d14a13f082d61e40
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: <4266bf60@newsgroups.borland.com> <4266c43b@newsgroups.borland.com> <4266c896$1@newsgroups.borland.com> <4266d972@newsgroups.borland.com>
Subject: Re: Retrieving the Start from directory
Date: Wed, 20 Apr 2005 15:40:37 -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: <4266d9e5$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1114036709 68.69.17.41 (20 Apr 2005 15:38:29 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.wiretrip.org!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail