Skip to content

Latest commit

 

History

History
83 lines (62 loc) · 3.28 KB

nf-objidl-imallocspy-prefree.md

File metadata and controls

83 lines (62 loc) · 3.28 KB
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.PreFree
IMallocSpy::PreFree (objidl.h)
Performs operations required before calling IMalloc::Free. This method ensures that the pointer passed to Free points to the beginning of the actual allocation.
IMallocSpy interface [COM]
PreFree method
IMallocSpy.PreFree
IMallocSpy::PreFree
PreFree
PreFree method [COM]
PreFree method [COM]
IMallocSpy interface
_com_imallocspy_prefree
com.imallocspy_prefree
objidl/IMallocSpy::PreFree
com\imallocspy_prefree.htm
com
528eedac-e8cc-4dc7-8287-c023ebefb72c
12/05/2018
IMallocSpy interface [COM],PreFree method, IMallocSpy.PreFree, IMallocSpy::PreFree, PreFree, PreFree method [COM], PreFree method [COM],IMallocSpy interface, _com_imallocspy_prefree, com.imallocspy_prefree, objidl/IMallocSpy::PreFree
objidl.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
ObjIdl.idl
Windows
19H1
IMallocSpy::PreFree
objidl/IMallocSpy::PreFree
c++
APIRef
kbSyntax
COM
ObjIdl.h
IMallocSpy.PreFree

IMallocSpy::PreFree

-description

Performs operations required before calling IMalloc::Free. This method ensures that the pointer passed to Free points to the beginning of the actual allocation.

-parameters

-param pRequest [in]

A pointer to the block of memory that the caller is passing to Free.

-param fSpyed [in]

Indicates whether the block of memory to be freed was allocated while the current spy was active.

-returns

The value to be passed to IMalloc::Free.

-remarks

If IMallocSpy::PreAlloc modified the original allocation request passed to IMalloc::Alloc (or IMalloc::Realloc), PreFree must supply a pointer to the actual allocation, which COM will pass to IMalloc::Free. For example, if the PreAlloc/PostAlloc pair attached a header used to store debug information to the beginning of the caller's allocation, PreFree must return a pointer to the beginning of this header so that all of the block that was allocated can be freed.

-see-also

IMalloc::Free

IMallocSpy

IMallocSpy::PostFree