Re: Questions of CreateFile and WriteFile

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Ken Hagan (K.Hagan_at_thermoteknix.co.uk)
Date: 02/14/05


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.



Relevant Pages

  • Re: NIS 2003 vs NIS 2003 Pro
    ... Plan to use NetBEUI for file sharing ... > turned off until I decide on a second level of protection. ... Software Quality Assurance Analyst ... Norton Internet Security ...
    (comp.security.firewalls)
  • Re: FIle Sharing XP home and PRO
    ... > How to Manually Open Ports in Internet Connection Firewall in Windows XP ... The ICF does not prevent LAN file sharing, ... > protected by NTFS file/folder protection so that even if a user can access ...
    (microsoft.public.windowsxp.customize)
  • Re: FIle Sharing XP home and PRO
    ... If they have a firewall that is not configured to allow file sharing ... I said in my opinion. ... You'll notice the link to the "more powerful way to control file sharing.." ... protected by NTFS file/folder protection so that even if a user can access ...
    (microsoft.public.windowsxp.customize)
  • RE: no one ever thought of this
    ... It seems that the Win 98 computer has the better protection. ... I was able to change the file sharing of the WP Pro laptop, G40, so that the Win98 Aptiva can modify its ACCESS files. ...
    (microsoft.public.windowsxp.network_web)