#ifndef _NTPSAPI_H
// User processes and threads
#if (PHNT_MODE != PHNT_MODE_KERNEL)
// begin_rev
#define THREAD_CREATE_FLAGS_SKIP_THREAD_ATTACH 0x00000002 // NtCreateThreadEx only
View code on GitHubThis flags indicates that the new thread should not call any DllMain callbacks with DLL_THREAD_ATTACH reason on loaded modules. Keep in mind that this flags might introduce compatibility issues because threads started with it have some of their state not initialized. See this blog post for more details.
Using this flag sets the SkipThreadAttach flag in the TEB of the new thread.
THREAD_CREATE_FLAGS_NONETHREAD_CREATE_FLAGS_CREATE_SUSPENDEDTHREAD_CREATE_FLAGS_HIDE_FROM_DEBUGGERTHREAD_CREATE_FLAGS_LOADER_WORKERTHREAD_CREATE_FLAGS_SKIP_LOADER_INITTHREAD_CREATE_FLAGS_BYPASS_PROCESS_FREEZE