2023-06-12 14:46:44 -04:00
|
|
|
#ifndef MXCRITICALSECTION_H
|
|
|
|
#define MXCRITICALSECTION_H
|
|
|
|
|
2023-06-27 22:04:07 -04:00
|
|
|
#include <windows.h>
|
2023-06-12 14:46:44 -04:00
|
|
|
|
2023-10-24 19:38:27 -04:00
|
|
|
class MxCriticalSection {
|
2023-06-12 14:46:44 -04:00
|
|
|
public:
|
2023-10-24 19:38:27 -04:00
|
|
|
__declspec(dllexport) MxCriticalSection();
|
|
|
|
__declspec(dllexport) ~MxCriticalSection();
|
|
|
|
__declspec(dllexport) static void SetDoMutex();
|
|
|
|
void Enter();
|
|
|
|
void Leave();
|
2023-06-12 14:46:44 -04:00
|
|
|
|
|
|
|
private:
|
2023-10-24 19:38:27 -04:00
|
|
|
CRITICAL_SECTION m_criticalSection;
|
|
|
|
HANDLE m_mutex;
|
2023-06-12 14:46:44 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MXCRITICALSECTION_H
|