MFC Dialog APP Dialog tipe project creation Problem "error hresult-e fail has been returned from a call to a Com component"

Ferhat Güler 20 Reputation points
2025-01-13T13:03:28.84+00:00

I am Using VS 2022 Community Edition, When I create MFC Dialog base Aplication by using wizart at the end I receive "error hresult-e fail has been returned from a call to a Com component" error. VS give error and I cant see project created in Visual Studio Screen. But When I check the Folder I see the created project. When I open it seems work, I can compale it is run. But resource file is not accesible and Dialod Design Screen is not Exist. For solve the situation I reinstal VS 2022, I try different MFC and ATL version (143,139), nothings help me. Also I they "gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll" acording to recommendation.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,822 questions
{count} votes

Accepted answer
  1. Michael Taylor 56,091 Reputation points
    2025-01-13T14:52:51.39+00:00

    This indicates an issue with the installation of your VS instance. The basic project template creates the project but it fails doing the post-creation work because of a COM-related issue. Unfortunately determining what is failing isn't trivial.

    You mentioned you reinstalled VS so I assume you're running the latest update. Do you have any extensions installed? If so then disable or remove them temporarily. You might also try doing a repair instead of a reinstall.

    I notice you are creating the project in a repo. Is that directory structure empty? Try creating the project in a simple directory like C:\temp. If it works there then something about your project path it doesn't like. Not sure what though since this looks like you're using the default path.

    Since it is COM related it is possible that Windows is having a problem activating a COM object. Is there anything in the Windows Event Log related to this?

    You can try running VS with the /log parameter (dev.exe /log LogFilePathAndName). This will generate a log file. After the error replicates then look in the log file to see what error is occurring.

    Can you create a regular C++ project, not MFC?

    If none of that works then you might need to use Report a Problem to report the issue to MS so they can look at the technical details.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.