Closing File Handles

  • Thread starter Thread starter Kangan
  • Start date Start date
K

Kangan

Hi,
I am new to coding in Windows. I need to know if its
possible to close all the handles open (If there are any)
to a particular file. The assumption here is that, I do
not know if there is any handle open to the file or not.
Since I do not have access to a project, I have to handle
this in my part of the code. If it is possible to close
all the open handles to a file, please point me to some
kind of documentation or something which can guide me.
Thanks
Kangan
 
I am new to coding in Windows. I need to know if its
possible to close all the handles open (If there are any)
to a particular file.

Assume its not.

Some system dependent low-level tools may be able to do it, but you
shouldn't design your application that way. Some other process has
presumably got the file open for a reason, and you'll be breaking it.

You should code your application to cater for the situation gracefully
- if possible.

Dave
 
Back
Top