UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:objidl.IMallocSpy.PreGetSize |
IMallocSpy::PreGetSize (objidl.h) |
Performs operations required before calling IMalloc::GetSize. |
|
com\imallocspy_pregetsize.htm |
com |
7bebc327-490e-4a41-8043-5d7211e645f5 |
12/05/2018 |
IMallocSpy interface [COM],PreGetSize method, IMallocSpy.PreGetSize, IMallocSpy::PreGetSize, PreGetSize, PreGetSize method [COM], PreGetSize method [COM],IMallocSpy interface, _com_imallocspy_pregetsize, com.imallocspy_pregetsize, objidl/IMallocSpy::PreGetSize |
objidl.h |
Windows |
Windows 2000 Professional [desktop apps only] |
Windows 2000 Server [desktop apps only] |
ObjIdl.idl |
Windows |
19H1 |
|
|
|
|
|
|
Performs operations required before calling IMalloc::GetSize.
The pointer that the caller is passing to GetSize.
Indicates whether the block of memory was allocated while the current spy was active.
A pointer to the actual allocation for which the size is to be determined.
The PreGetSize method receives as its pRequest parameter the pointer the caller is passing to IMalloc::GetSize. It must then return a pointer to the actual allocation, which may have altered pRequest in the implementation of either the PreAlloc or the PreRealloc method of IMallocSpy. The pointer to the true allocation is then passed to GetSize as its pv parameter.
IMalloc::GetSize then returns the size determined, and COM passes this value to IMallocSpy::PostGetSize in cbActual.
The size determined by GetSize is the value returned by the HeapSize function. This is the size originally requested. For example, a memory allocation request of 27 bytes returns an allocation of 32 bytes and GetSize returns 27.