C++ How to create thread and mutex?

DWORD may be masked by Unreal. You can make it visible by including these lines:

#include "AllowWindowsPlatformTypes.h" 
 #include <thread>
 #include "HideWindowsPlatformTypes.h"

But if you just want to use a mutex, FPThreadsCriticalSection is the way to go; unless your trying to include a third-party library that require std::mutex. A critical section is a single process mutex, so it’s faster that asking the OS to create a resource just to synchronize two threads in the same process. You always can include your project .h in any file to have access to the Core Unreal module.