Partager via


ICorDebugProcess::GetHelperThreadID Method

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

HRESULT GetHelperThreadID (
    [out] DWORD *pThreadID
);

Parameters

Parameter Description

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 Method 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 Method event will never run managed user code.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: CorDebug.idl

Library: CorGuids.lib

.NET Framework Version: 2.0, 1.1, 1.0

See Also

Reference

ICorDebugProcess Interface
ICorDebugProcess2 Interface