10 __interface
__declspec(uuid("654F7EF5-CFDF-4df9-A450-6C6A13C622C0")) IAtlMemMgr
13 _Ret_maybenull_
_Post_writable_byte_size_(SizeBytes
) void* Allocate(
18 _Inout_opt_
void* Buffer
21 _Ret_maybenull_
_Post_writable_byte_size_(SizeBytes
) void* Reallocate(
22 _Inout_updates_bytes_opt_(SizeBytes
) void* Buffer
,
31 class CWin32Heap
: public IAtlMemMgr
42 CWin32Heap(_In_ HANDLE hHeap
) :
45 ATLASSERT(hHeap
!= NULL
);
54 _Ret_maybenull_
_Post_writable_byte_size_(SizeBytes
) virtual void* Allocate(
58 return ::HeapAlloc(m_hHeap
, 0, SizeBytes
);
68 FreeOk
= ::HeapFree(m_hHeap
, 0, Buffer
);
69 ATLASSERT(FreeOk
== TRUE
);
73 _Ret_maybenull_
_Post_writable_byte_size_(SizeBytes
) virtual void* Reallocate(
74 _In_opt_
void* Buffer
,
86 return Allocate(SizeBytes
);
89 return ::HeapReAlloc(m_hHeap
, 0, Buffer
, SizeBytes
);
92 virtual size_t GetSize(
96 return ::HeapSize(m_hHeap
, 0, Buffer
);