RE: Replicating a Directory - Accessing / coping files locked by another process
- From: v-raygon@xxxxxxxxxxxxxxxxxxxx (Rhett Gong [MSFT])
- Date: Tue, 03 May 2005 09:25:55 GMT
Hello Todor Todorov,
It should not be ReadDirectoryChangesW which give you share violation when
a 3rd app is going to copy, but depends on the sharemode you used when
obtaining a handle to the directory.
I am not sure what share mode you used with CreateFile. But from your
description of error which the 3rd app report. you did probably not specify
FILE_SHARE_READ when calling CreateFile to get the handle to the directory.
There are 3 share mode you can use:
FILE_SHARE_READ -- Enables subsequent operations or other process to obtain
read access
FILE_SHARE_WRITE -- Enables subsequent operations or other process to
obtain write access
FILE_SHARE_DELETE -- Enables subsequent operations or other process to
obtain delete access
For more details, please reference dwShareMode in CreateFile doc.
Please let me know if my answer helps you resolve the problem. If there is
anything more I can assist you, please feel free to let me know.
Thanks,
Rhett Gong [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn
This posting is provided "AS IS" with no warranties and confers no rights.
.
- Follow-Ups:
- Re: Replicating a Directory - Accessing / coping files locked by another process
- From: Todor Todorov
- Re: Replicating a Directory - Accessing / coping files locked by another process
- References:
- Replicating a Directory - Accessing / coping files locked by another process
- From: Todor Todorov
- Replicating a Directory - Accessing / coping files locked by another process
- Prev by Date: Re: How to detect when a console child process is waiting for input?
- Next by Date: C:\WINNT\system32\dllcache question?
- Previous by thread: Replicating a Directory - Accessing / coping files locked by another process
- Next by thread: Re: Replicating a Directory - Accessing / coping files locked by another process
- Index(es):
Relevant Pages
|