views:

56

answers:

1

I am looking to monitor a folder for create events using the FileSystemWatcher in c#. The problem is that another 3rd party process is also watching that folder, I need (if possible) for my process to receive the create event before the 3rd party process.

Is there a way in managed or unmanaged code that I can give my process a higher priority?

+2  A: 

Even if you give your application a higher priority, there is no guarantee that your application will receive the event first. Even if you promote your application to the highest priority, at some point, the other application will get a slice of processing time and it could receive the event then.

Pete OHanlon