Article View: borland.public.cppbuilder.nativeapi
Article #10684Re: Obtaining process id
From: Chris ( Val )
Date: Thu, 25 Mar 2004 13:27
Date: Thu, 25 Mar 2004 13:27
30 lines
2079 bytes
2079 bytes
"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message news:4061cf64$1@newsgroups.borland.com... | | "Chris ( Val )" <chrisval@bigpond.com.au> wrote in message | news:40619ba9@newsgroups.borland.com... | | > My ultimate goal is to find out which application | > is locking a particular file, and log the process id | > and the offending application(exe) name into the | > database for further analysis. | | What you ask for is not provided by the Win32 API at all. You have to drop | down to a lower level and query the kernel directly, which is not a simple | task. What you ask for is possible in genernal, though, as demonstrated by | the "Process Explorer" and "Handle" utilities at http://www.sysinternals.com Hi Remy. I posted a response via google from work today, but I cant see it here. In any case, thanks for the help - it would explain why I could not find an API routine to do it. I have used process explorer and handle before, but it's just that I was asked to write such a function(in VB actually), and wanted to explore the possibilities of creating it. Cheers. Chris Val
Technical Details
Message-ID:
<4062de28$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40619ba9@newsgroups.borland.com> <4061cf64$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,8f802efbcb83e75e X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-03-25 05:40:08 PST From: "Chris \( Val \)" <chrisval@bigpond.com.au> Newsgroups: borland.public.cppbuilder.nativeapi References: <40619ba9@newsgroups.borland.com> <4061cf64$1@newsgroups.borland.com> Subject: Re: Obtaining process id Date: Fri, 26 Mar 2004 00:27:05 +1100 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 144.139.99.82 Message-ID: <4062de28$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1080221224 144.139.99.82 (25 Mar 2004 05:27:04 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail