Installs an application-defined function to dump _CLIENT_BLOCK type memory blocks (debug version only).
_CRT_DUMP_CLIENT _CrtSetDumpClient ( _CRT_DUMP_CLIENT pfnNewDump );
pfnNewDump
_CrtSetDumpClient lets the application hook its own function to dump objects stored in _CLIENT_BLOCK memory blocks into the C runtime debug memory dump process. As a result, every time a debug dump function such as _CrtMemDumpAllObjectsSince or _CrtDumpMemoryLeaks dumps a _CLIENT_BLOCK memory block, the application's dump function is called as well. _CrtSetDumpClient provides an application with an easy method for detecting memory leaks and validating or reporting the contents of data stored in _CLIENT_BLOCK blocks. When _DEBUG is not defined, preprocessing removes calls to _CrtSetDumpClient.
_CrtSetDumpClient installs the new application-defined dump function specified in pfnNewDump
and returns the previously defined dump function. An example of a client block dump function is as follows:
void DumpClientFunction( void *userPortion, size_t blockSize );
The userPortion
argument is a pointer to the beginning of the user data portion of the memory block and blockSize
specifies the size of the allocated memory block in bytes. The client block dump function must return VOID. The pointer to the client dump function passed to _CrtSetDumpClient is of type _CRT_DUMP_CLIENT, as defined in Crtdbg.h:
typedef void (__cdecl *_CRT_DUMP_CLIENT)( void *, size_t );
For more information about functions that operate on _CLIENT_BLOCK type memory blocks, see Writing your own debug hook functions. You can use _CrtReportBlockType to return information about block types and subtypes.
The previously defined client block dump function.
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.13 | intime/rt/include/crtdbg.h | crtdbg.h | clib.lib |