Freigeben über


ICorProfilerInfo::GetCurrentThreadID Method

Gets the ID of the current thread, if it is a managed thread.

HRESULT GetCurrentThreadID(
    [out] ThreadID *pThreadId);

Parameters

Parameter Description

pThreadId

[out] A pointer to the returned ID of the managed thread.

Remarks

If the current thread is an internal runtime thread or other unmanaged thread, GetCurrentThreadID returns CORPROF_E_NOT_MANAGED_THREAD as the HRESULT, and the returned value of the pThreadId parameter will be NULL.

Requirements

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

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Version: 2.0

See Also

Reference

ICorProfilerInfo Interface