Share via


ICorDebugProcess::GetHelperThreadID Method

Gets the operating system (OS) thread ID of the debugger's internal helper thread.

HRESULT GetHelperThreadID (
    [out] DWORD *pThreadID
);

Parameters

  • pThreadID
    [out] A pointer to the OS thread ID of the debugger's internal helper thread.

Remarks

During managed and unmanaged debugging, it is the debugger's responsibility to ensure that the thread with the specified ID remains running if it hits a breakpoint placed by the debugger. A debugger may also wish to hide this thread from the user. If no helper thread exists in the process yet, the GetHelperThreadID method returns zero in *pThreadID.

You cannot cache the thread ID of the helper thread, because it may change over time. You must re-query the thread ID at every stopping event.

The thread ID of the debugger's helper thread will be correct on every unmanaged ICorDebugManagedCallback::CreateThread event, thus allowing a debugger to determine the thread ID of its helper thread and hide it from the user. A thread that is identified as a helper thread during an unmanaged ICorDebugManagedCallback::CreateThread event will never run managed user code.

Requirements

Platforms: See .NET Framework System Requirements.

Header: CorDebug.idl. CorDebug.h

Library: CorGuids.lib

.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0

See Also

Reference

ICorDebugProcess Interface

ICorDebugProcess2 Interface