Article View: borland.public.cppbuilder.nativeapi
Article #3981Re: How to find if a DLL is still loaded
From: Ed Mulroy
Date: Mon, 10 Apr 2006 19:51
Date: Mon, 10 Apr 2006 19:51
23 lines
1744 bytes
1744 bytes
I think that worked under 16 bit Windows but under Win32 I don't think
access will tell if the file is loaded.
It calls GetFileAttribues and massages the result to decide what to return.
Nothing in the result tells if the file is loaded.
. Ed
> Bob Gonder wrote in message
> news:tf3l32phnths5uo1u53tbh73rsl42315mr@4ax.com...
>
>>> I wish to know if a DLL which is loaded from another process is
>>> still loaded and running. I don't call the DLL myself but just wish
>>> to know if it is still loaded in memory.
>
>> try to rename/delete the file.
>
> Might be nicer to use
> if( 0 == access(filename,2) )
> { //DLL is free
> }else{
> //DLL in use or read-only
> }
Technical Details
Message-ID:
<443ac53e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<443a4e43$1@newsgroups.borland.com> <443a8d67@newsgroups.borland.com> <tf3l32phnths5uo1u53tbh73rsl42315mr@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,14aae0d621067c62 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Ed Mulroy" <dont_email_me@bitbuc.ket> Newsgroups: borland.public.cppbuilder.nativeapi References: <443a4e43$1@newsgroups.borland.com> <443a8d67@newsgroups.borland.com> <tf3l32phnths5uo1u53tbh73rsl42315mr@4ax.com> Subject: Re: How to find if a DLL is still loaded Date: Mon, 10 Apr 2006 15:51:07 -0400 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 66.57.117.102 Message-ID: <443ac53e@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1144702270 66.57.117.102 (10 Apr 2006 13:51:10 -0700) X-Authenticated-User: edmulroy Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail