Compartilhar via


IMallocSpy::PostAlloc (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

void* PostAlloc(
  void* pActual 
);

Parameters

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

Return Value

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

Header objidl.h, objidl.idl
Library ole32.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

IMallocSpy
CoRegisterMallocSpy
CoRevokeMallocSpy
IMalloc::Alloc
IMallocSpy::PreAlloc