Board index » delphi » File sharing/locking in Delphi/Pascal
m.a.vaug...@larc.nasa.gov (Mark Vaughan)
![]() Delphi Developer |
Tue, 21 Jul 1998 03:00:00 GMT
File sharing/locking in Delphi/Pascal
In article <4esqoo$...@spider.rmplc.co.uk>,
aing...@rmplc.co.uk (Andy Ingham) wrote: ]-I have written a few network applications for the college where I work ]-but I am having problems with sharing violation errors from windows, ]-which I can't trap with IOResult. I used to write my applications in ]-VB3, which had the "Open <filename> for Input Shared" method of ]-opening files. I know there is something called FileMode, but I don't ]-know the extended modes above 2, or how to use it. ]- ]-Can anyone help? A bit of example code would be nice. ]- ]-Thanks, ]- ]-Andy. ]- ]- here's a response given to this question sometime earlier. I've Mark Vaughan --------------------------------------------------------------------------- FROM: G...@epix.net (Greg P) In article <95Sep05135635.andib...@IH.USA.Com>, jgla...@lansoft.com (Jon Glazer) says: >I need to open a file in share mode on a Novell Network. The file in const {FileMode constants 1 from column A 'and' one from column B} Frinstance, to open a file for Read Only but allow others on the Net to share it: FileMode := fmRO + fmDN; {read only, deny none} open for Read Only, don't let ANYone else have access: FileMode := fmRO + fmDA; etc. Hope this helps. Oh... run this immediate before Reset/Rewrite when you open the file. --------------------------------------------------------------------------- |