baffled by exception

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Bonj (Bonj_at_discussions.microsoft.com)
Date: 10/12/04


Date: Tue, 12 Oct 2004 04:49:05 -0700

Hello.
Does anybody know if there is a difference between the way C# calls a COM
object, and the way C++ calls a COM object? And is there anyway to make the
latter emulate the former?

I have a COM object which seemingly can't be instantiated using C++, but can
using C# and VB, and it's driving me insane - I can't work out what's wrong
with it.
It just seems to throw an exception, citing 'User Breakpoint' as the cause
of the exception when any C++ code tried to instantiate it.
If I click 'continue' to the exception when it's in debug mode, it rethrows
it as:
System.Runtime.InteropServices.COMException (0xC0000096): Exception from
HRESULT: 0xC0000096.

But it still throws up the message box when the try..catch is round it!
This COM object, I fully own and the dongle to it is plugged in. Like I say,
I can instantiate this COM object in other languages and I can instantiate
other COM objects using these methods in C++.

Is it possible they could have not wanted you to use it from C++, and can
tell?
Any ideas?

Cheers!



Relevant Pages

  • baffled by exception
    ... It just seems to throw an exception, citing 'User Breakpoint' as the cause ... HRESULT: 0xC0000096. ... But it still throws up the message box when the try..catch is round it! ... I can instantiate this COM object in other languages and I can instantiate ...
    (microsoft.public.dotnet.languages.csharp)
  • baffled by exception
    ... It just seems to throw an exception, citing 'User Breakpoint' as the cause ... HRESULT: 0xC0000096. ... But it still throws up the message box when the try..catch is round it! ... I can instantiate this COM object in other languages and I can instantiate ...
    (microsoft.public.dotnet.languages.vc)
  • Re: UML "OR" Composition Question
    ... one must not instantiate X? ... E.g. one may start with a class Exception. ... that there are existing references to Exception. ...
    (comp.object)
  • Re: baffled by exception
    ... > latter emulate the former? ... and it's driving me insane - I can't work out what's> wrong ... > It just seems to throw an exception, citing 'User Breakpoint' as the cause> of the exception when any C++ code tried to instantiate it. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: baffled by exception
    ... > latter emulate the former? ... and it's driving me insane - I can't work out what's> wrong ... > It just seems to throw an exception, citing 'User Breakpoint' as the cause> of the exception when any C++ code tried to instantiate it. ...
    (microsoft.public.dotnet.languages.vc)