https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-entercriticalsection?redirectedfrom=MSDN
EnterCriticalSection function (synchapi.h) - Win32 apps | Microsoft Learn
Waits for ownership of the specified critical section object. The function returns when the calling thread is granted ownership.
functionhappsmicrosoftlearn