Initially, you need to know whether the file is open or not. One way of doing this is to use the CreateFile API with the exclusive access flag set. If you get a valid file handle, the file is closed otherwise the file is open.
Personally, I wouldn't seek to close the process which has the file open, I would wait until the file is closed and then update.
Take Care
Matt
If at first you don't succeed, skydiving is not for you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.