isle/LEGO1/mxcriticalsection.h
Joshua Peisach 33048db81a
Define WIN32_LEAN_AND_MEAN when importing windows.h
This way, when preprocessing, only the relevant windows API structures
will be generated.
2023-09-08 14:18:44 -04:00

25 lines
450 B
C++

#ifndef MXCRITICALSECTION_H
#define MXCRITICALSECTION_H
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
class MxCriticalSection
{
public:
__declspec(dllexport) MxCriticalSection();
__declspec(dllexport) ~MxCriticalSection();
__declspec(dllexport) static void SetDoMutex();
void Enter();
void Leave();
private:
CRITICAL_SECTION m_criticalSection;
HANDLE m_mutex;
};
#endif // MXCRITICALSECTION_H