Re: Questions of CreateFile and WriteFile
From: Ken Hagan (K.Hagan_at_thermoteknix.co.uk)
Date: 02/14/05
- Next message: Bill Davy: "We're stuck with VC6. Best low-cost route to decent STL and Unicode compatible streams?"
- Previous message: Ken Hagan: "Re: Dual-processor servers"
- In reply to: Arnaud Debaene: "Re: Questions of CreateFile and WriteFile"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 14 Feb 2005 11:22:01 -0000
> ad wrote:
>
>> To share the access to "fileName" among threads in a process, does
>> FLAG have to be set to "GENERIC_WRITE|GENERIC_READ" too?
Arnaud Debaene wrote:
> File sharing and protection is at process level : Threads of the same
> process have complete access to one another resources.
As I read it, the original poster was talking about opening the file
for a second time (and getting a second handle). I believe in this
case it doesn't matter that the second access is from the same process
as the first, it has to follow the usual file sharing rules.
However, if the HANDLE returned from the first call is made available
as a global variable then, yes, there's nothing to stop a second thread
from using it.
- Next message: Bill Davy: "We're stuck with VC6. Best low-cost route to decent STL and Unicode compatible streams?"
- Previous message: Ken Hagan: "Re: Dual-processor servers"
- In reply to: Arnaud Debaene: "Re: Questions of CreateFile and WriteFile"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|