windows-nt/Source/XPSP1/NT/public/sdk/inc/stllock.h

43 lines
700 B
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
//***************************************************************************
//
// Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
//
// stllock.h
//
// Purpose: Critical section class
//
//***************************************************************************
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef _STLLOCK_H_
#define _STLLOCK_H_
class CCritSec : public CRITICAL_SECTION
{
public:
CCritSec()
{
InitializeCriticalSection(this);
}
~CCritSec()
{
DeleteCriticalSection(this);
}
void Enter()
{
EnterCriticalSection(this);
}
void Leave()
{
LeaveCriticalSection(this);
}
};
#endif