Look at the FileShare enumeration used by the FileStream class.

Another option is to use a named mutex and have each process lock/unlock the mutex.