This method is called just after invoking the IMalloc::Alloc method, taking as input a pointer to the IMalloc::Alloc caller's allocation and returning a pointer to the actual allocation.
void* PostAlloc( void* pActual );
- [in] Pointer to the allocation done by IMalloc::Alloc.
A pointer to the beginning of the memory block actually allocated. This pointer is also returned to the caller of IMalloc::Alloc. If debug information is written at the front of the caller's allocation, this should be a forward offset from pActual. The value is the same as pActual if debug information is appended or if no debug information is attached.
When a spy object implementing the IMallocSpy interface is registered with the CoRegisterMallocSpy function, COM calls IMallocSpy::PostAlloc after any call to IMalloc::Alloc. It takes as input a pointer to the allocation done by the call to IMalloc::Alloc, and returns a pointer to the beginning of the total allocation, which could include a forward offset from the other value if the IMallocSpy::PreAlloc method was implemented to attach debug information to the allocation in this way. If not, the same pointer is returned and also becomes the return value to the caller of IMalloc::Alloc.
To determine whether the platform supports this interface, see Determining Supported COM APIs.
OS Versions: Windows CE 3.0 and later.
Header: Objidl.h, Objidl.idl.
Link Library: Ole32.lib
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.