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

Function OnThreadAttached

Source/Client/NM_Engine/Self_DestroyModuleLinks.cpp:9–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include "ThreadFunctions.h"
8
9void OnThreadAttached()
10{
11 if (IS_VALID_SMART_PTR(g_winapiApiTable) && g_winapiApiTable->GetCurrentThreadId)
12 {
13 if (IS_VALID_SMART_PTR(g_nmApp) && g_nmApp->AppIsInitiliazed())
14 {
15 DEBUG_LOG(LL_SYS, "Thread attached! TID: %u", g_winapiApiTable->GetCurrentThreadId());
16
17 auto dwErrorType = 0UL;
18 if (g_nmApp->AnalyserInstance()->OnThreadCreated(g_winapiApiTable->GetCurrentThreadId(), 0, 0, &dwErrorType) == false)
19 {
20 g_nmApp->OnCloseRequest(EXIT_ERR_UNKNOWN_THREAD_ATTACHED, g_winapiApiTable->GetLastError(), (void*)dwErrorType);
21 return;
22 }
23 }
24 }
25}
26
27BOOL APIENTRY FakeMain(HMODULE hModule, DWORD dwReason, LPVOID)
28{

Callers

nothing calls this directly

Calls 4

AppIsInitiliazedMethod · 0.80
OnThreadCreatedMethod · 0.80
AnalyserInstanceMethod · 0.80
OnCloseRequestMethod · 0.80

Tested by

no test coverage detected