473,382 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Finding which program is using another file/DLL

me
Hi,

Im having a few issues with finding exactly which program may be
accessing a certain file. Lets say I need to replace a DLL with a
newer version, but I need to make sure its not being accessed.

Finding out if its in use isnt a problem, but I need to find out
exactly which process is using it so I can ask the user if they would
like to end that process to replace the file or not.

Anyone any ideas?

Regards, Daniel.
Feb 25 '07 #1
1 7518
There is a free ware program on the web called ForceDel which will delete
files locked by other apps. It searches the windows handle list, finds the
handles to the file, shows you what app has the handle, closes it and deletes
the file. I know this isnt exactly what you want to do but the good news is
its open source. Minor hitch is that its C++ but it should show you the
windows functions to call to perform the tasks and would be a good starter
for ten.

http://www.codeguru.com/Cpp/W-P/file...cle.php/c1287/

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"me@home.com" wrote:
Hi,

Im having a few issues with finding exactly which program may be
accessing a certain file. Lets say I need to replace a DLL with a
newer version, but I need to make sure its not being accessed.

Finding out if its in use isnt a problem, but I need to find out
exactly which process is using it so I can ask the user if they would
like to end that process to replace the file or not.

Anyone any ideas?

Regards, Daniel.
Feb 26 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Hal Vaughan | last post by:
I want to have a config file for my program, which means I need to know where the config file is. If I type: java myclass and it runs myclass.class, is there any way to obtain the location of...
1
by: Todd Johnson | last post by:
Hey, I have been working on a program that stores information for each user in a subdirectory of the directory in which the script is run. So if my script is in /home/someuser/myprogram, the...
0
by: ripripal | last post by:
I have created a VB.NET Windows application that reads an Access database. I point to where the database will be after the program is installed, but it can not find the database. I noticed that...
15
by: Twan Kennis | last post by:
Hi, I have a DB2 database on the IBM iSeries platform, on which I created several Stored Procedures with the SQLCODE as a return-parameter. These Stored Procedures are called from a Windows...
0
by: NSF12345 | last post by:
Iv developed a small program that looks for a file over our network, and copy it to the location of another computer. Im using the "If FileExists("\\oldpc\main share\Folder\file.txt") Then" way of...
5
by: tcwarrior | last post by:
Hi all. I am trying to write a little program where I extract some data out of a game in real time. The game writes some info to a log file, and I can access this in real time. The problem is that...
1
by: Empyrean | last post by:
I'm attempting to make my first program that involves file input, but I'm running into problems finding the .txt file. I placed the file inside the same folder as the rest of the project, but it...
1
by: avik1612 | last post by:
Hi, I have created a program to find text files in a particular directory or folder. and to find a particular word in that files i finding it difficult to put the list in an array and finding...
1
by: jason.cipriani | last post by:
Here is an example with 3 files, containing a template structure and also a template function. The header A.h declares a template structure A with a default (i.e. for any template parameter),...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.