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

Method CreateThread

Source/Client/NM_Engine/ThreadFunctions.cpp:165–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165HANDLE CThreadFunctions::CreateThread(int iCustomThreadCode, LPTHREAD_START_ROUTINE pFunc, LPVOID lpParam, LPDWORD pdwThreadId)
166{
167 DEBUG_LOG(LL_SYS, "Thread creation has been started! Thread code: %d Vista+ %d", iCustomThreadCode, IsWindowsVistaOrGreater());
168
169 auto dwThreadId = DWORD_PTR(0);
170 auto hThread = g_nmApp->DynamicWinapiInstance()->NTHelper()->CreateThread(pFunc, lpParam, &dwThreadId);
171 DEBUG_LOG(LL_SYS, "Thread creation completed(%d) Result: %d - Thread: %p", iCustomThreadCode, g_nmApp->DynamicWinapiInstance()->IsValidHandle(hThread), hThread);
172
173 if (pdwThreadId) *pdwThreadId = dwThreadId;
174 return hThread;
175}
176
177DWORD CThreadFunctions::GetThreadID(HANDLE hThread)
178{

Callers

nothing calls this directly

Calls 4

IsWindowsVistaOrGreaterFunction · 0.85
NTHelperMethod · 0.80
DynamicWinapiInstanceMethod · 0.80
IsValidHandleMethod · 0.80

Tested by

no test coverage detected