MCPcopy Create free account
hub / github.com/NoMercy-ac/NoMercy / GetThreadStartAddress

Method GetThreadStartAddress

Source/Client/NM_Engine/ThreadFunctions.cpp:64–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64DWORD CThreadFunctions::GetThreadStartAddress(HANDLE hThread)
65{
66 DWORD dwCurrentThreadAddress = 0;
67 auto ntStatus = g_winapiApiTable->NtQueryInformationThread(hThread, ThreadQuerySetWin32StartAddress, &dwCurrentThreadAddress, sizeof(dwCurrentThreadAddress), NULL);
68 if (!NT_SUCCESS(ntStatus))
69 {
70 DEBUG_LOG(LL_ERR, "GetThreadStartAddress fail! Thread: %p Status: %p", hThread, ntStatus);
71 return dwCurrentThreadAddress;
72 }
73 return dwCurrentThreadAddress;
74}
75
76DWORD CThreadFunctions::GetMainThreadId()
77{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected