Hi Jan
Jan Dijkstra wrote:
I don't know about other OS-es, but on a Windows server files sometimes retain
a state of in-use, despite no process having the file open. It doesn't happen
often, but the problem raises it's ugly head from time to time.
Are you using ::CreateFile ?
Because have seen ::CreateFile give ERROR_SHARING_VIOLATION where
there was no process using the file and when using FileCreate or
TFileStream everything worked fine.
https://support.microsoft.com/en-us/kb/316609
And I found this in another NG:
Check out the NET FILE command:
C:\>net help file
The syntax of this command is:
NET FILE
[id [/CLOSE]]
NET FILE closes a shared file and removes file locks. When used without
options, it lists the open files on a server. The listing includes the
identification number assigned to an open file, the pathname of the
file, the username, and the number of locks on the file.
This command works only on computers running the Server service.
id Is the identification number of the file.
/CLOSE Closes an open file and removes file locks. Type this command
from the server where the file is shared.
Best regards
Asger
Connect with Us