0

I am looking for different ways to pause and resume programmatically a particular process via its process ID under Windows.

Process suspend/resume tool does it with SuspendThread / ResumeThread but warns about multi-threaded programs and deadlock problems.

Or Detect Threads of any process ID.

I need method deadlocks or uses another method?

Prefered languages : C#

Ishmaeel
  • 14,138
  • 9
  • 71
  • 83
  • It is a bad idea because it will create concurrency issues because the assumptions about concurrency in the code those threads are running will be broken unless they are designed to be paused. To help you we need to understand why you think pausing will help you: please expand your question to explain why you want to pause a thread. – Richard Jul 24 '14 at 09:05
  • SuspendThread is only safe to do when you suspend *all* the threads in the process. Like a debugger does. – Hans Passant Jul 24 '14 at 09:47

1 Answers1

0

as you see in this stackoverflow question there is one way to do this.

There are also other ways to do this.

Community
  • 1
  • 1
user3840692
  • 273
  • 2
  • 13