ReactOS  0.4.13-dev-257-gfabbd7c
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(expr)
Definition: atlcore.h:42
LONG HRESULT
Definition: typedefs.h:77
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ Lock()

HRESULT ATL::CComSafeDeleteCriticalSection::Lock ( void  )
inline

Definition at line 142 of file atlcore.h.

143  {
145  return CComCriticalSection::Lock();
146  }
#define ATLASSERT(expr)
Definition: atlcore.h:42

◆ 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:59

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: