Compartir a través de


IMallocSpy::PostAlloc (Windows CE 5.0)

Send Feedback

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);

Parameters

  • pActual
    [in] Pointer to the allocation done by IMalloc::Alloc.

Return Values

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.

Remarks

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.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Objidl.h, Objidl.idl.
Link Library: Ole32.lib

See Also

CoRegisterMallocSpy | CoRevokeMallocSpy | IMallocSpy | IMalloc::Alloc | IMallocSpy::PreAlloc

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.