IMallocSpy::PreGetSize (Compact 2013)
This method is called by COM just prior to any call to the IMalloc::GetSize method.
The IMallocSpy::PreGetSize method receives as its pRequest parameter the pointer the caller is passing to IMalloc::GetSize.
The pointer to the true allocation is then passed to IMalloc::GetSize as its pv parameter.
IMalloc::GetSize then returns the size determined, and COM passes this value to the IMallocSpy::PostGetSize method in cbActual.
|The size determined by IMalloc::GetSize is the value returned by the Win32 function HeapSize. Implementers of IMallocSpy::PostGetSize cannot assume that if cbActual is sizeof(debug_header), the value is the actual size of the user's allocation.|
To determine whether the platform supports this interface, see Determining Supported COM APIs.