0

I have an Windows service.It uses Filewatcher API to watch for any new files and start processing the file.

Suppose If i want to stop the file processing during runtime (Note I want to stop the active file processing)how can I do that from any external windows application.

Note: Already I am communicating with the windows service from the external windows application

web dunia
  • 9,381
  • 18
  • 52
  • 64

2 Answers2

0

Communicate to the windows service to stop processing and set FileSystsemWatcher.EnableRaisingEvents to false. When you want to continue processing, communicate to the service and set it back to true.

Without more detail about how you're actually communicating between processes, I can't provide much more detail.

Peter Ritchie
  • 35,463
  • 9
  • 80
  • 98
0

If you external application is a .NET windows application, please refer to the following SO Question

Community
  • 1
  • 1
Patrick D'Souza
  • 3,491
  • 2
  • 22
  • 39