RE: Writing/reading files
- From: jetan@xxxxxxxxxxxxxxxxxxxx ("Jeffrey Tan[MSFT]")
- Date: Tue, 02 May 2006 02:19:32 GMT
Hi Bala,
Thanks for your post!
No, I do not think there is any perfect solution for this issue. This is
controlled by the first opener process. The first opener process can
specify the share mode with other processes, for example, it can specify
share read, share write or share readwrite etc... However, if your process
read operation always gets the exception "The process cannot access the
file "filename" because it is being used by another process.", it means the
opener did not specify share read mode. In Windows security area, the
security operation must obey *trust* rule. That is if the owner does not
trust you, you can not change the owner behavior, or there is a security
hole in the design.
So in our situation, the owner process does not want to share with others,
in another word, it does not turst others, so we have to obey the rule.
The best practise is handling this exception and display a user friendly
"file in use" dialog to the end user.(This is also what Windows Explorer
does)
Hope this helps!
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- Re: Writing/reading files
- From: Bala Nagarajan
- Re: Writing/reading files
- References:
- Writing/reading files
- From: Bala Nagarajan
- Writing/reading files
- Prev by Date: Re: How do I do a master-detail on the same table?
- Next by Date: RE: Line number in win form datagrid
- Previous by thread: Writing/reading files
- Next by thread: Re: Writing/reading files
- Index(es):
Relevant Pages
|