| 915 | #endif |
| 916 | |
| 917 | bool CNM_App::InitCheckModuleModifications() |
| 918 | { |
| 919 | DEBUG_LOG(LL_SYS, "Thread creation has been started!"); |
| 920 | |
| 921 | auto ulFuncSize = g_nmApp->ThreadManagerInstance()->GetThreadFuncSize((LPBYTE)CheckModuleModificationsRoutine); |
| 922 | if (!ulFuncSize || ulFuncSize > 1024) |
| 923 | { |
| 924 | DEBUG_LOG(LL_ERR, "Not valid thread func size: %u", ulFuncSize); |
| 925 | return false; |
| 926 | } |
| 927 | |
| 928 | auto thread = g_nmApp->ThreadManagerInstance()->CreateCustomThread(SELF_THREAD_MMAPMODULES, CheckModuleModificationsRoutine, ulFuncSize, nullptr, 5000 + 1000, false); |
| 929 | if (!IS_VALID_SMART_PTR(thread) || thread->IsCorrect() == false) |
| 930 | { |
| 931 | DEBUG_LOG(LL_ERR, "Thread can NOT created! Error: %u", g_winapiApiTable->GetLastError()); |
| 932 | return false; |
| 933 | } |
| 934 | |
| 935 | DEBUG_LOG(LL_SYS, "Info - %u[%p->%p][%d-%s] - Completed! Shared:%p Custom:%p", |
| 936 | thread->GetId(), thread->GetHandle(), thread->GetStartAddress(), thread->GetCustomCode(), thread->GetThreadCustomName().c_str(), thread, thread.get()); |
| 937 | |
| 938 | return true; |
| 939 | } |
| 940 |
nothing calls this directly
no test coverage detected