ReactOS 0.4.15-dev-7958-gcd0bb1a
ATL::CComSafeDeleteCriticalSection Class Reference

#include <atlcore.h>

Inheritance diagram for ATL::CComSafeDeleteCriticalSection:
Collaboration diagram for ATL::CComSafeDeleteCriticalSection:

Public Member Functions

 CComSafeDeleteCriticalSection ()
 
 ~CComSafeDeleteCriticalSection ()
 
HRESULT Lock ()
 
HRESULT Init ()
 
HRESULT Term ()
 
- Public Member Functions inherited from ATL::CComCriticalSection
 CComCriticalSection ()
 
virtual ~CComCriticalSection ()
 
HRESULT Lock ()
 
HRESULT Unlock ()
 
HRESULT Init ()
 
HRESULT Term ()
 

Private Attributes

bool m_bInitialized
 

Additional Inherited Members

- Public Attributes inherited from ATL::CComCriticalSection
CRITICAL_SECTION m_sec
 

Detailed Description

Definition at line 127 of file atlcore.h.

Constructor & Destructor Documentation

◆ CComSafeDeleteCriticalSection()

ATL::CComSafeDeleteCriticalSection::CComSafeDeleteCriticalSection ( )
inline

Definition at line 132 of file atlcore.h.

133 {
134 m_bInitialized = false;
135 }

◆ ~CComSafeDeleteCriticalSection()

ATL::CComSafeDeleteCriticalSection::~CComSafeDeleteCriticalSection ( )
inline

Definition at line 137 of file atlcore.h.

138 {
139 Term();
140 }

Member Function Documentation

◆ Init()

HRESULT ATL::CComSafeDeleteCriticalSection::Init ( )
inline

Definition at line 148 of file atlcore.h.

149 {
150 HRESULT hResult;
151
153 hResult = CComCriticalSection::Init();
154 if (SUCCEEDED(hResult))
155 m_bInitialized = true;
156 return hResult;
157 }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
#define SUCCEEDED(hr)
Definition: intsafe.h:50

◆ Lock()

HRESULT ATL::CComSafeDeleteCriticalSection::Lock ( )
inline

Definition at line 142 of file atlcore.h.

143 {
145 return CComCriticalSection::Lock();
146 }

◆ Term()

HRESULT ATL::CComSafeDeleteCriticalSection::Term ( )
inline

Definition at line 159 of file atlcore.h.

160 {
161 if (!m_bInitialized)
162 return S_OK;
163 m_bInitialized = false;
164 return CComCriticalSection::Term();
165 }
#define S_OK
Definition: intsafe.h:52

Referenced by ~CComSafeDeleteCriticalSection().

Member Data Documentation

◆ m_bInitialized

bool ATL::CComSafeDeleteCriticalSection::m_bInitialized
private

Definition at line 130 of file atlcore.h.

Referenced by CComSafeDeleteCriticalSection(), Init(), Lock(), and Term().


The documentation for this class was generated from the following file: