⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 critsect.cpp

📁 C++编程实践与技巧一书各章节的源码
💻 CPP
字号:
/////////////////////////////////////////////////////////////////////
// Class Creator Version 2.0.000 Copyrigth (C) Poul A. Costinsky 1994
///////////////////////////////////////////////////////////////////
// Implementation File critsect.cpp
// class CWizCriticalSection
//
// 29/05/1995 13:08                             Author: Poul
///////////////////////////////////////////////////////////////////


#include "stdafx.h"

#include "critsect.h"


#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
#define new DEBUG_NEW

///////////////////////////////////////////////////////////////////
// class CWizCriticalSection

//*****************************************************************
void	CWizCriticalSection::Init()
{
	ASSERT(m_bInited == FALSE);
	::InitializeCriticalSection(&m_cCriticalSection);
	m_bInited = TRUE;
}
//*****************************************************************
// Default Constructor
CWizCriticalSection::CWizCriticalSection(BOOL bInit)
	: m_bInited (FALSE)
{
	if (bInit)
		Init();
}
//*****************************************************************
// Destructor
CWizCriticalSection::~CWizCriticalSection()
{
	::DeleteCriticalSection(&m_cCriticalSection);
}
//*****************************************************************

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -