HI, I would like to use the file system as a lock between two processes, on windows xp. that is, given the file name "file_lock", the process gets a lock, trying to create the file "file_lock" if it does not already exist. If it already exists, the lock cannot be obtained.
i.e.
FileStream fs=new FileStream("c:\\file_lock, FileMode.CreateNew);
Will this work? Is file creation if the file does not already exist atomic?
Thank!
Jacko source
share