Снаскоку не получилось.
в stdafx.h:
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
В DllMain:
if (dwReason == DLL_PROCESS_ATTACH)
{
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
...
букет ошибок:
Compiling...
StdAfx.cpp
d:\program files\microsoft visual studio\vc98\include\malloc.h(105) : error C2059: syntax error : 'constant'
d:\program files\microsoft visual studio\vc98\include\malloc.h(105) : error C2733: second C linkage of overloaded function '_calloc_dbg' not allowed
d:\program files\microsoft visual studio\vc98\include\malloc.h(105) : see declaration of '_calloc_dbg'
тоже самое для _free_dbg,_malloc_dbg,_realloc_dbg,_expand_dbg,_msize_dbg