Win32 file locking mechanisms are reliable if they run on a remote CIFS share. There were many flat file databases that worked reliably enough, using these mechanisms for decades.
They are unreliable if they are made on a remote NFS share (as Jim Lewis mentioned).