mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Check if GetThreadDescription() is supported.
This functionality is available since Win 10 1607.
This commit is contained in:
parent
402d749d13
commit
a6c6943a6c
@ -485,6 +485,8 @@ void SysTraceSendExternalName( uint64_t thread )
|
|||||||
hnd = OpenThread( THREAD_QUERY_LIMITED_INFORMATION, FALSE, DWORD( thread ) );
|
hnd = OpenThread( THREAD_QUERY_LIMITED_INFORMATION, FALSE, DWORD( thread ) );
|
||||||
}
|
}
|
||||||
if( hnd != 0 )
|
if( hnd != 0 )
|
||||||
|
{
|
||||||
|
if( _GetThreadDescription )
|
||||||
{
|
{
|
||||||
PWSTR tmp;
|
PWSTR tmp;
|
||||||
_GetThreadDescription( hnd, &tmp );
|
_GetThreadDescription( hnd, &tmp );
|
||||||
@ -498,6 +500,7 @@ void SysTraceSendExternalName( uint64_t thread )
|
|||||||
threadSent = true;
|
threadSent = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
const auto pid = GetProcessIdOfThread( hnd );
|
const auto pid = GetProcessIdOfThread( hnd );
|
||||||
if( !threadSent && NtQueryInformationThread && _EnumProcessModules && _GetModuleInformation && _GetModuleBaseNameA )
|
if( !threadSent && NtQueryInformationThread && _EnumProcessModules && _GetModuleInformation && _GetModuleBaseNameA )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user