ReactOS  0.4.12-dev-102-g4b7f1e0
ATL::CWin32Heap Class Reference

#include <atlmem.h>

Inheritance diagram for ATL::CWin32Heap:
Collaboration diagram for ATL::CWin32Heap:

Public Member Functions

 CWin32Heap ()
 
 CWin32Heap (_In_ HANDLE hHeap)
 
virtual ~CWin32Heap ()
 
_Ret_maybenull_ _Post_writable_byte_size_ (SizeBytes) virtual void *Allocate(_In_ size_t SizeBytes)
 
virtual void Free (_In_opt_ void *Buffer)
 
_Ret_maybenull_ _Post_writable_byte_size_ (SizeBytes) virtual void *Reallocate(_In_opt_ void *Buffer
 
virtual size_t GetSize (_Inout_ void *Buffer)
 
- Public Member Functions inherited from ATL::IAtlMemMgr
virtual ~IAtlMemMgr ()
 
virtual void Free (_Inout_opt_ void *Buffer)=0
 
virtual size_t GetSize (_In_ void *Buffer)=0
 

Public Attributes

HANDLE m_hHeap
 
_Ret_maybenull_ _In_ size_t SizeBytes
 
- Public Attributes inherited from ATL::IAtlMemMgr
virtual _Ret_maybenull_ _In_ size_t SizeBytes = 0
 

Detailed Description

Definition at line 35 of file atlmem.h.

Constructor & Destructor Documentation

◆ CWin32Heap() [1/2]

ATL::CWin32Heap::CWin32Heap ( )
inline

Definition at line 41 of file atlmem.h.

41  :
42  m_hHeap(NULL)
43  {
44  }
smooth NULL
Definition: ftsmooth.c:416
HANDLE m_hHeap
Definition: atlmem.h:38

◆ CWin32Heap() [2/2]

ATL::CWin32Heap::CWin32Heap ( _In_ HANDLE  hHeap)
inline

Definition at line 46 of file atlmem.h.

46  :
47  m_hHeap(hHeap)
48  {
49  ATLASSERT(hHeap != NULL);
50  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
smooth NULL
Definition: ftsmooth.c:416
HANDLE m_hHeap
Definition: atlmem.h:38

◆ ~CWin32Heap()

virtual ATL::CWin32Heap::~CWin32Heap ( )
inlinevirtual

Definition at line 52 of file atlmem.h.

53  {
54  }

Member Function Documentation

◆ _Post_writable_byte_size_() [1/2]

_Ret_maybenull_ ATL::CWin32Heap::_Post_writable_byte_size_ ( SizeBytes  )
inlinevirtual

Implements ATL::IAtlMemMgr.

Definition at line 58 of file atlmem.h.

61  {
63  }
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
_Ret_maybenull_ _In_ size_t SizeBytes
Definition: atlmem.h:80
HANDLE m_hHeap
Definition: atlmem.h:38

◆ _Post_writable_byte_size_() [2/2]

_Ret_maybenull_ ATL::CWin32Heap::_Post_writable_byte_size_ ( SizeBytes  )
virtual

Implements ATL::IAtlMemMgr.

◆ Free()

virtual void ATL::CWin32Heap::Free ( _In_opt_ void Buffer)
inlinevirtual

Definition at line 65 of file atlmem.h.

68  {
69  if (Buffer)
70  {
71  if (!::HeapFree(m_hHeap, 0, Buffer))
73  }
74  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
Definition: bufpool.h:45
#define HeapFree(x, y, z)
Definition: compat.h:394
HANDLE m_hHeap
Definition: atlmem.h:38

◆ GetSize()

virtual size_t ATL::CWin32Heap::GetSize ( _Inout_ void Buffer)
inlinevirtual

Definition at line 95 of file atlmem.h.

98  {
100  }
SIZE_T WINAPI HeapSize(HANDLE, DWORD, LPCVOID)
Definition: bufpool.h:45
HANDLE m_hHeap
Definition: atlmem.h:38

Member Data Documentation

◆ m_hHeap

HANDLE ATL::CWin32Heap::m_hHeap

Definition at line 38 of file atlmem.h.

◆ SizeBytes

_Ret_maybenull_ _In_ size_t ATL::CWin32Heap::SizeBytes
Initial value:
{
if (SizeBytes == 0)
{
return NULL;
}
if (Buffer == NULL)
{
}

Definition at line 80 of file atlmem.h.


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