English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm writing a program that needs to read, then delete a file that is currently in use by another process.
How can I get my program to have priority?
Note: shuting down the process that is using the file is an option.

Using Visual Basic.Net for Windows XP.

Thanks in advance for any answers!!!!!!

2007-11-19 07:43:24 · 2 answers · asked by Mackenzie 3 in Computers & Internet Programming & Design

What about only reading the file?

2007-11-19 08:25:47 · update #1

2 answers

You would almost have to shut down the intervening process otherwise you could cause memory leaks.

There are ways of removing the memory pointers... but its just easier to close anything else using it.

2007-11-19 08:04:34 · answer #1 · answered by Anonymous · 0 0

If the file is in use by an independent process, then the short answer is, you can't. Any modern OS prevents processes from interfering with one another or from allocating their resources.

On the other hand, if the file was created by one thread in a process, another thread of the SAME process could be written to manipulate that file.

2007-11-19 16:07:56 · answer #2 · answered by jgoulden 7 · 0 0

fedest.com, questions and answers