Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • Last Modified:

Logging information to a Text file from multiple process

Is it possible to write to a text file accross process in VB.Net ? How to make it thread safe?
I have aprocess A, Process B and C all writing information to a centralized text file. I tried to use the Lock() and UnLock(). But when Process A locks it, when process B tries to write, I Get exception that other process is using the file. Is there a way to wait till the lock is released and write to the text file.

Any help would be appreciated
0
nvenkata
Asked:
nvenkata
  • 2
1 Solution
 
Nirmalan NagenthiranCommented:
0
 
Nirmalan NagenthiranCommented:
Sorry the code provided in the article is C#, but still you get some idea.
0
 
nvenkataAuthor Commented:
Thanks for the pointer. It really helps
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now