FILE_SHARE_READ and FILE_SHARE_WRITE

From: PEACEMAKER (do.not.email_at_yo.mamas.hairy.ass.com)
Date: 06/30/04


Date: Wed, 30 Jun 2004 11:56:53 -0400

I have an application that needs to be able to open any file for reading.
Currently I only use FILE_SHARE_READ but I looking at the docs it mentions
that if a file was opened by another processes with FILE_SHARE_WRITE then
all subsequent open operations on the file has to include this flag or
opening will fail (eg if I only specificy FILE_SHARE_READ). The docs don't
say what happens in the reverse case.. eg a file is created with
FILE_SHARE_READ, but I attempt to open it with
FILE_SHARE_READ|FILE_SHARE_WRITE. Which flags should I use to be able to
open all shared files without any problems?



Relevant Pages

  • Re: Fast pancake flipping
    ... >> You can reverse an entire sequence by inverting a boolean flag. ... traversing the list, start by following the "next" links. ... routine, between flips. ...
    (comp.programming)
  • [PATCH] Fix forcedeth reversing the MAC address on suspend
    ... For cards that initially have the MAC address stored in reverse order, ... Unfortunately this flag, which is stored in a register of the card, ... The flag is still required because at least kexec will never write back ...
    (Linux-Kernel)
  • Re: Bushnell Pinseeker 1500 w/slope
    ... "I have the Pinseeker 1500 without slope, ... I've been able to hit a pin at 480 yards with it, ... flag, making sure there are no tree branches or other objects in front. ... The reading then indicates the distance to the nearest ...
    (rec.sport.golf)
  • Reading multiple file
    ... is that I want to read my test vectors from a number of files. ... process(sysrst_n, clk, flag) ... -- Here's where we start reading from a directory of files. ... file_loop: while not endfileloop ...
    (comp.lang.vhdl)
  • Re: Threading: Stopping, restarting, etc
    ... Steve wrote: ... I agree that I should not create the thread in the ctor, ... after reading your post. ... flag being checked, it's like Jon Skeet's article that Larry posted. ...
    (microsoft.public.dotnet.languages.csharp)