Hello,
I don't know on which platform you are running... But I guess you need to use the OS API.
If on Windows, maybe this helps:
http://www.oehive.org/node/442and
http://msdn.microsoft.com/en-us/library/aa363858.aspx
I guess if both processes try to lock the file exclusively the CreateFileA method will return an error which is explained in the MSDN article.
Let me know, if that works for you!
Mike
Problem solved, thanx!