Calls an application-supplied function for all _CLIENT_BLOCK types in the heap (debug version only).
Pointer to the application-supplied function callback function. The first parameter to this function points to the data. The second parameter is the context pointer that is passed to the call to _CrtDoForAllClientObjects.
Pointer to the application-supplied context to pass to the application-supplied function.
The _CrtDoForAllClientObjects function searches the heap's linked list for memory blocks with the _CLIENT_BLOCK type and calls the application-supplied function when a block of this type is found. The found block and the context parameter are passed as arguments to the application-supplied function. During debugging, an application can track a specific group of allocations by explicitly calling the debug heap functions to allocate the memory and specifying that the blocks be assigned the _CLIENT_BLOCK block type. These blocks can then be tracked separately and reported on differently during leak detection and memory state reporting.
If the _CRTDBG_ALLOC_MEM_DF bit field of theflag is not turned on, _CrtDoForAllClientObjects immediately returns. When is not defined, calls to _CrtDoForAllClientObjects are removed during preprocessing.
For more information about the _CLIENT_BLOCK type and how it can be used by other debug functions, see. For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see .
If pfn is NULL, the invalid parameter handler is invoked, as described in . If execution is allowed to continue, is set to EINVAL and the function returns.
Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003
For more compatibility information, seein the Introduction.
Libraries: Debug versions ofonly.