다음을 통해 공유


IDebugProcess2::EnumThreads

Retrieves a list of all the threads running in the process.

HRESULT EnumThreads(
   IEnumDebugThreads2** ppEnum
);
int EnumThreads(
   out IEnumDebugThreads2 ppEnum
);

Parameters

  • ppEnum
    [out] Returns an IEnumDebugThreads2 object that contains a list of all threads in all programs in the process.

Return Value

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

Remarks

This method enumerates the threads running in each program and then combines them into a process view of the threads. A single thread may run in multiple programs; this method enumerates that thread only once.

This method presents a list of the process's threads without duplicates. Otherwise, to enumerate the threads running in a particular program, use the IDebugProgram2::EnumThreads method.

See Also

Reference

IDebugProcess2

IEnumDebugThreads2

IDebugThread2

IDebugProgram2::EnumThreads