AFX_ALLOC_HOOK AfxSetAllocHook( AFX_ALLOC_HOOK
pfnAllocHook );
pfnAllocHook
The name of the function to call. The function must return a BOOL value and accept size_t, BOOL, and long arguments.
Sets a hook that enables calling of the specified function each time memory is allocated.
The hook function is described below.