We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Error Code: 0xc0150002 -  Unable to run a program written in VC++ on any visual studio platform !!

Medium Priority
Last Modified: 2013-11-26
I am using OpenCV libraries to write a small program to find the edge of an image. I configured the visual studio completely as directed by OpenCV website. The program has compiled with 0 errors. But when I try to run it, it gives me the following error message:

Error Code: 0xC0150002 : The application failed to initialize properly. Click on Ok to terminate the application

I tried the same program on VS2005, VS.net 2003 and VS 2008. All of them compile the program without any errors but give the same error message. Surprisingly the code compiles and also runs on a different system in our lab.

The OS on my system is WinXP SP3 (Build 2600).
#include "stdafx.h"
#include "cxtypes.h"
#include "cv.h"
#include "highgui.h"
#include "cvaux.h"
#include "cxmisc.h"
void main()
		IplImage *originalImage = cvLoadImage("D:\\Blurry_Detection\\Fujinon\\mayo_test_video\\2.EP\\clear_image\\01378.jpg",-1);
		IplImage *grayScaleImage = cvCreateImage(cvSize(701,468),8,1);
		IplImage *edgeImage = cvCreateImage(cvSize(701,468), 8, 1);
		cvCvtColor(originalImage, grayScaleImage, CV_BGR2GRAY);
		cvSobel(grayScaleImage, edgeImage, 1, 0, 1);
		cvShowImage("EdgeImage", edgeImage);

Open in new window

Watch Question


.NET Framework Version 2.0 SP2 is already installed on my system. When I am trying to uninstall it in order to re-install .NET Framework Version 2.0, I get an error message saying that I cannot uninstall .net framework v2.0 SP2 because other applications are dependent on it. I am attaching a screen shot of different .net frameworks that got installed when I installed my Windows XP SP3. I am also attaching a screen shot of what happens when I try to remove .net framework 2.0 SP2 in order to install .net framework 2.0.

See if this tool will help you>
Removal tool to fix .NET Framework install failures:
See if this tool will help you>
Removal tool to fix .NET Framework install failures:
installing microsoft vc++ 2005 redistributable has solved the problem.


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Just taking a WAG at what could have caused the previous install of the vc++ 2005 redistributable not to work well with your application - possibly, on the previous installation, there may have been some application running (or service) that caused the installation to almost be correct. Just a guess.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.