Locking a File
Posted on 2004-03-25
I have a program that will be run via RF connection. There will be multiple handhelds running this program, which means that one computer will be running multiple instances of the program. The problem is that I need to be able to lock a file and make the other instances wait until the file is unlocked.
I am using one file (call it GLOBAL.TXT) and this file will be read from and written too by multiple instances of 2 different programs. Can someone start me off on how to lock the file and make the other files wait there turn? Sometype of a empty loop that runs until the file is unlocked?
Thanks for any help.