问题描述
我正在使用Visual C ++来调用扩展MAPI。我发现内置MAPIAllocateBuffer和MAPIFreeBuffer在频繁分配和释放后效率不高,因为它会导致大量碎片。有没有办法覆盖这两个函数
并自己执行内存管理?
I am using Visual C++ to call Extended MAPI. I find the build-in MAPIAllocateBuffer and MAPIFreeBuffer is not very efficient after frequent allocation and deallocation, as it will cause a lot of fragments. Is there a way to override these two functions and perform the memory management by myself?
THanks
推荐答案
除非MAPI可以修改内存指针并分配新的缓冲区(例如IAddrBook :: ResolveNames),否则你不是需要使用MAPIAllocateBuffer分配传递给各种MAPI函数的内存。
Unless MAPI can modify the memory pointer and allocate a new buffer (e.g. IAddrBook::ResolveNames), you are not required to allocate memory passed to various MAPI functions using MAPIAllocateBuffer.
这篇关于覆盖MAPIAllocateBuffer& MAPIFreeBuffer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!