"The application was unable to start correctly" after including vld.h

I included vld.h, vld.lib and vld_x86.dll on my Win32 project with visual studio 2010. It builds properly but when I execute, it crashes with this message:

"The application was unable  to start correctly (0xc0150002). Click OK to close the application."

I run it with Dependency Walker but it shows side by side error as follows:

Error: The Side-by-Side configuration information for "D:\project\..\debug\VLD_X86.DLL" contains errors. The application has failed to start because its side-by-side configuration is incorrect.)

I have tried various ways including tinkering around with the manifest as suggested here:

https://vld.codeplex.com/discussions/360243

It only runs properly if I commented the following line on vld.h

// Force a symbolic reference to the global VisualLeakDetector class object from
// the DLL. This ensures that the DLL is loaded and linked with the program,
// even if no code otherwise imports any of the DLL's exports.
//#pragma comment(linker, "/include:__imp_?g_vld@@3VVisualLeakDetector@@A")

However, if I commented out that line, the vld doesn't output anything at all (just like no vld integration)

Anyone having this problem before? Any suggestions will be appreciated, thanks in advance!


I had this problem too, you need to add all these files to the same directory as your vld_x86.dll/vl_x64.dll:

Microsoft.DTfW.DHL.manifest

dbghelp.dll

Which came from the Win32/Win64 bin folder from Visual Leak Detector. Found this from: https://vld.codeplex.com/wikipage?title=Building%20Visual%20Leak%20Detector%20from%20Source


I had this problem (this error message), too. In my case the vld_x86.dll, most likely in another than the expected version, was preinstalled and registered by some other software. (everybody likes VLD, it seems) Thus, it was loaded instead of the vld_x86.dll in the path VLD was built to. Unregistering the foreign DLL solved the problem.

Hence, you might want to check the output for loading of DLLs from exotic paths.


IF YOU ARE USING VISUAL STUDIOS: -The simplest fix if you have not been messing with your project properties in the include, linker sections make sure that you did not manually add VLD. Instead clear the includes you made in here and save your project. -Close it then install the latest VLD and it will automatically create the includes parent inheritance for your visual studios projects including environment paths as well.


Other might still get into the issue; A potential fix is to install VLD version 2.5.1, can be downloaded from github: https://github.com/KindDragon/vld/releases/tag/v2.5.1

It brings the fix explained above, it includes dbghelp.dll


I got such error when I tried to run a project just after installing vld. A solution for me was re-login. Because vld installer adds new paths to PATH and VS doesn't see them without re-login. Otherwise you can use a solution with copying files dbghelp.dll and .manifest.