471,075 Members | 815 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,075 software developers and data experts.

please help, The process cannot access the file...

I am calling a dll in my C# project, when I try to access its log file, I
got error "
The process cannot access the file "xxxxxxx" because it is being used by
another process.
". I suspect the dll doesn't close its log file immediately, but I can not
do nothing about it. Since I can open the log file in File explorer(when I
tried to delete it, I got a file share violation, that is for sure), I think
I could open and read the file in my project. Why I could not do that? any
idea?
Thanks!

Nov 22 '05 #1
4 1762
Hi david,

Try opening file with File.OpenRead method.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"david" <wy*****@hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
I am calling a dll in my C# project, when I try to access its log file, I
got error "
The process cannot access the file "xxxxxxx" because it is being used by
another process.
". I suspect the dll doesn't close its log file immediately, but I can not
do nothing about it. Since I can open the log file in File explorer(when I
tried to delete it, I got a file share violation, that is for sure), I think I could open and read the file in my project. Why I could not do that? any
idea?
Thanks!

Nov 22 '05 #2
Hi david,

Try opening file with File.OpenRead method.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"david" <wy*****@hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
I am calling a dll in my C# project, when I try to access its log file, I
got error "
The process cannot access the file "xxxxxxx" because it is being used by
another process.
". I suspect the dll doesn't close its log file immediately, but I can not
do nothing about it. Since I can open the log file in File explorer(when I
tried to delete it, I got a file share violation, that is for sure), I think I could open and read the file in my project. Why I could not do that? any
idea?
Thanks!

Nov 22 '05 #3
That was exactly I did and it didn't work.

"Miha Markic" <miha at rthand com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi david,

Try opening file with File.OpenRead method.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"david" <wy*****@hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
I am calling a dll in my C# project, when I try to access its log file, I got error "
The process cannot access the file "xxxxxxx" because it is being used by
another process.
". I suspect the dll doesn't close its log file immediately, but I can not do nothing about it. Since I can open the log file in File explorer(when I tried to delete it, I got a file share violation, that is for sure), I

think
I could open and read the file in my project. Why I could not do that? any idea?
Thanks!


Nov 22 '05 #4
That was exactly I did and it didn't work.

"Miha Markic" <miha at rthand com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Hi david,

Try opening file with File.OpenRead method.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"david" <wy*****@hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl...
I am calling a dll in my C# project, when I try to access its log file, I got error "
The process cannot access the file "xxxxxxx" because it is being used by
another process.
". I suspect the dll doesn't close its log file immediately, but I can not do nothing about it. Since I can open the log file in File explorer(when I tried to delete it, I got a file share violation, that is for sure), I

think
I could open and read the file in my project. Why I could not do that? any idea?
Thanks!


Nov 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Sam | last post: by
4 posts views Thread by Brad Isaacs | last post: by
2 posts views Thread by JerryWEC | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.