IDebugThread2::Suspend

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Suspends a thread.

Syntax

HRESULT Suspend ( 
   DWORD *pdwSuspendCount
);
HRESULT Suspend ( 
   out uint pdwSuspendCount
);

Parameters

pdwSuspendCount
[out] Returns the suspend count after the suspend operation.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

Each call to this method increments the suspend count above 0. This suspend count is displayed in the Threads debug window.

For each call to this method, there must be a later call to the Resume method.

See also