Hi,
I don't know if it is a bug or I am using fpflock incorrectly. I wanted to use fpflock to lock a file (and be sure that only one process at a time can have access to my file).
At first, I tried AssignFile and passed the TextFile(Text) variable to fpflock with LOCK_EX. It didn't work and both processes can access the file. Both print "After Flock".
Then I modify the code, and used fpopen instead of AssignFile and passed the cInt variable to fpflock . This worked.
I attached the codes of both experiments.
Amir
