O'Reilly logo

Windows® via C/C++, Fifth Edition by Christophe Nasarre, Jeffrey Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Suspending and Resuming a Process

The concept of suspending or resuming a process doesn’t exist for Windows because processes are never scheduled CPU time. However, I have been asked numerous times how to suspend all the threads in a process. In the special case of a debugger handling a debug event returned by WaitForDebugEvent, Windows freezes all the threads in the debuggee process until the debugger calls ContinueDebugEvent. You can also use the "Suspend Process" feature of Process Explorer from Sysinternals (http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/ProcessExplorer.mspx) to achieve the same effect: all the threads in the process are suspended.

Windows doesn’t offer any other way to suspend all threads in a process because ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required