Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Client Block Hook Functions 

This topic applies to:

Visual Studio Edition

Visual Basic

C#

C++

J#

Express

No

No

Native

No

Standard

No

No

Native

No

Pro/Team

No

No

Native

No

If you want to validate or report the contents of the data stored in _CLIENT_BLOCK blocks, you can write a function specifically for this purpose. The function that you write must have a prototype similar to the following, as defined in CRTDBG.H:

void YourClientDump(void *, size_t)

In other words, your hook function should accept a void pointer to the beginning of the allocation block, together with a size_t type value indicating the size of the allocation, and return void. Other than that, its contents are up to you.

Once you have installed your hook function using _CrtSetDumpClient, it will be called every time a _CLIENT_BLOCK block is dumped. You can then use _CrtReportBlockType to get information on the type or subtype of dumped blocks.

The pointer to your function that you pass to _CrtSetDumpClient is of type _CRT_DUMP_CLIENT, as defined in CRTDBG.H:

typedef void (__cdecl *_CRT_DUMP_CLIENT)
   (void *, size_t);

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.