| 166 | #endif |
| 167 | |
| 168 | bool CNM_App::InitializeMainCheckThread() |
| 169 | { |
| 170 | DEBUG_LOG(LL_SYS, "Thread creation has been started!"); |
| 171 | |
| 172 | auto ulFuncSize = g_nmApp->ThreadManagerInstance()->GetThreadFuncSize((LPBYTE)NoMercyClientMainRoutine); |
| 173 | if (!ulFuncSize || ulFuncSize > 1024) |
| 174 | { |
| 175 | DEBUG_LOG(LL_ERR, "Not valid thread func size: %u", ulFuncSize); |
| 176 | return false; |
| 177 | } |
| 178 | |
| 179 | auto thread = g_nmApp->ThreadManagerInstance()->CreateCustomThread(SELF_THREAD_NMMAINROUTINE, NoMercyClientMainRoutine, ulFuncSize, nullptr, 15000 + 1000, true); |
| 180 | if (!IS_VALID_SMART_PTR(thread) || thread->IsCorrect() == false) |
| 181 | { |
| 182 | DEBUG_LOG(LL_ERR, "Thread can NOT created! Error: %u", g_winapiApiTable->GetLastError()); |
| 183 | return false; |
| 184 | } |
| 185 | |
| 186 | DEBUG_LOG(LL_SYS, "Info - %u[%p->%p][%d-%s] - Completed! Shared:%p Custom:%p", |
| 187 | thread->GetId(), thread->GetHandle(), thread->GetStartAddress(), thread->GetCustomCode(), thread->GetThreadCustomName().c_str(), thread, thread.get()); |
| 188 | |
| 189 | return true; |
| 190 | } |
nothing calls this directly
no test coverage detected