Called just after invoking IMalloc::Alloc, taking as input a pointer to the IMalloc::Alloc caller's allocation, and returning a pointer to the actual allocation.
void * PostAlloc(
void * pActual //Pointer to the allocation actually 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 IMallocSpy is registered with CoRegisterMallocSpy, 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 IMallocSpy::Prealloc 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.
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in objidl.h.
IMalloc::Alloc, IMallocSpy::PreAlloc, CoRegisterMallocSpy, CoRevokeMallocSpy