Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7434439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:50:20+00:00 2026-05-29T09:50:20+00:00

I have a C++ program calling an interface I’ve implemented in C#. I’m consistently

  • 0

I have a C++ program calling an interface I’ve implemented in C#. I’m consistently getting the error 0x80131023 HOST_E_CLRNOTAVAILABLE which is defined as CLR has been disabled due to unrecoverable error. The c++ program doesn’t produce this error unless my program is being called but I can’t see any of my functions in the stack trace. Does anyone have any tips on how go about identifying the problem?

EDIT:
I’m using late binding to create an IDispatch interface.

 IUnknown* pUnknown;
 hRC = CoCreateInstance(
        MyProgID,                  
        0,                          
        CLSCTX_ALL,                 
        IID_IUnknown,               
        (void**) &pUnknown);        
hRC = pUnknown->QueryInterface(
        IID_IDispatch,              
        (void**) &_pService );      
pUnknown->Release();  

Then invoking with:

hRC = _pService->Invoke(
        _DispIDs[nDispIDIndex], IID_NULL, LOCALE_USER_DEFAULT,
        METHOD_TO_CALL, &Disp, &VarResult, NULL, NULL ); 

It calls most of the methods successfully with no error. When the Close method is called it returns the error mentioned.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:50:20+00:00Added an answer on May 29, 2026 at 9:50 am

    The most likely failure mode here is that one of your calls tripped a managed exception that wasn’t caught and caused the CLR to shut down. This might have happened in a thread that was started by the managed code so it won’t get reported back to you with an HRESULT. That leaves a trace, the Output window ought to contain a notification for it, a “first chance exception” for exception type 0xe0534f4d.

    Use a managed debugger to troubleshoot. VS has one: Project + Properties, Debugging, Debugger type setting. You can force a automatic break with Debug + Exceptions, tick the Thrown box for CLR exceptions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting the following error when trying to compile my program: calling fdopen: Bad
I have program that has a variable that should never change. However, somehow, it
I have a program that spits out both standard error and standard out, and
I have a program which needs to behave slightly differently on Tiger than on
I have a Windows program that calling a WCF service. This service after a
I have a program which draws some terrain and simulates water flowing over it
I have a program which embeds both python2 and python3 interpreters. The libpython shared
Working in Linux and using C++. I have a program which initiates a thread.
I have a program that uses an external API which uses its own state.
I created a simple program that demonstrates the runtime error I'm getting with my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.