IMallocSpy::PostAlloc method (objidl.h)

Performs operations required after calling IMalloc::Alloc.

Syntax

void * PostAlloc(
  [in] void *pActual
);

Parameters

[in] pActual

The pointer returned from Alloc.

Return value

This method returns a pointer to the beginning of the block of memory actually allocated. This pointer is also returned to the caller of 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 IMallocSpy is registered using the CoRegisterMallocSpy function, COM calls PostAlloc after any call to Alloc. It takes as input a pointer to the allocation done by the call to 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 Alloc.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header objidl.h

See also

IMalloc::Alloc

IMallocSpy

IMallocSpy::PreAlloc