Article View: comp.os.ms-windows.programmer.misc
Article #2447avoiding sharing violations
From: Berthold K.P. Horn
Date: Mon, 04 Jan 1993 13:09
Date: Mon, 04 Jan 1993 13:09
27 lines
1641 bytes
1641 bytes
I have a previewer application that checks every few seconds whether the file it is displaying has changed. If it finds it has changed it goes ahead and repaints the screen. Some other application creates (compiles) the file. The user typically will use an editor in one Windows to edit the source file, then run an application in another Window that `compiles' it, while viewing the result in a third Window. I want the viewing part to be automatically updated when the file is changed, (without explicit communication between the `compiler' and the `viewer'). Things work OK, if I do NOT have SHARE.EXE installed. If I do, I start to get sharing violations. I've tried several combinations of flags for OpenFile without any luck. I thought SHARE was supposed to help applications that want to get at the same file! So my question is, how can I determnine whether some other application has a particular file open so I don't try to open it and get slapped across the wrist? What combination of flags in OpenFile gives me some code that tells me the file is in use (or hangs me up until it it not), WITHOUT giving me these unpleasant `sharing violations'? Thanks. Berthold K.P. Horn Cambridge, Massachusetts, USA
Technical Details
Message-ID:
<1i9ctpINNbba@life.ai.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!gumby!yale!mintaka.lcs.mit.edu!ai-lab!kauai!bkphShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!gumby!yale!mintaka.lcs.mit.edu!ai-lab!kauai!bkph From: bkph@kauai.ai.mit.edu (Berthold K.P. Horn) Newsgroups: comp.os.ms-windows.programmer.misc Subject: avoiding sharing violations Date: 4 Jan 1993 13:09:13 GMT Organization: MIT Artificial Intelligence Lab Lines: 27 Message-ID: <1i9ctpINNbba@life.ai.mit.edu> NNTP-Posting-Host: kauai.ai.mit.edu