Hi all,
How can I restrict a user to open the same file on multiple instances of the same application???? If you have word installed, then open multiple instances of it and try opening the same file on all the application...The user is restricted. How can I achieve this???
Thanks
Word does it like this: if it wants to open a file "foo.doc" it tries to create a file
"~$foo.doc". If it doesn't exist word creates it, writes the name of the user in
that file and opens "foo.doc".
If that funny file already exists, word 'knows' that another word instance is
already editing that file and it also knows who is editing that file.
When an editing session is done, word simply removes that "~$foo.doc" file
again.
This scenario works because file creation is an atomic process on most (if not
all) file systems.
kind regards,
Jos