Muokkaa

Jaa


IDebugProcess2::EnumThreads

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

Syntax

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 EnumThreads method.

See also