[DUG] LAN file sharing locking

JeremyN at FrontierSoftware.com.au JeremyN at FrontierSoftware.com.au
Wed Aug 24 17:03:35 NZST 2005


> Where would I start to look for a component or 
> sample code that would enable only one user to 
> have a file open on a shared LAN drive. Any other 
> user who tries to open the same file should get a 
> sensible "file in use" message.


Check out the fmShareExclusive for TFileStream.
What the other user gets will depend on what application they are using to
try and open the file. If it's yours, you can handle this the way you want.

cheers,
Jeremy


More information about the Delphi mailing list