Debugging Tools for Windows

GetThreadIdsByIndex

The GetThreadIdsByIndex method returns the engine and system thread IDs for the specified threads in the current process.

HRESULT
  IDebugSystemObjects::GetThreadIdsByIndex(
    IN ULONG  Start,
    IN ULONG  Count,
    OUT OPTIONAL PULONG  Ids,
    OUT OPTIONAL PULONG  SysIds
    );

Parameters

Start
Specifies the index of the first thread whose IDs are requested.
Count
Specifies the number of threads whose IDs are requested.
Ids
Receives the engine thread IDs. If Ids is NULL, this information is not returned; otherwise, Ids is treated as an array of Count ULONG valuess.
SysIds
Receives the system thread IDs. If SysIds is NULL, this information is not returned; otherwise, SysIds is treated as an array of Count ULONG values.

Return Value

S_OK
The method was successful.

This method may also return error values. See Return Values for more details.

Interface Version

GetThreadIdsByIndex is available in all versions of IDebugSystemObjects.

Comments

The index of the first thread is zero. The index of the last thread is the number of threads returned by GetNumberThreads minus one.

For more information about threads, see Threads and Processes.

Requirements

Headers: Defined in Dbgeng.h. Include Dbgeng.h.

Build machine: CAPEBUILD