Re: baffled by exception

From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 10/12/04


Date: Tue, 12 Oct 2004 08:38:09 -0400

Bonj,

    This seems highly unlikely to me, as the mechanism in .NET ultimately
uses the same mechanism that C++ uses. Can you show how you are doing it in
.NET and how you are doing it in C++? Perhaps you are not setting up the
environment or the apartment correctly, and this could be the source of your
problems.

    Hope this helps.

-- 
               - Nicholas Paldino [.NET/C# MVP]
               - mvp@spam.guard.caspershouse.com
"Bonj" <Bonj@discussions.microsoft.com> wrote in message 
news:D7DD04FA-CC5B-4B6B-94D6-D88A48BDE2E4@microsoft.com...
> 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

  • 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.vc.language)
  • Re: Multidimensional ArrayList how to?
    ... throws the exception, I've got the impression ... are you populating the ArrayListmembers? ... showing here is the creation of the array. ... until you explicitly instantiate them. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: vm02 update
    ... the finalizers are run and the memory immediately reclaimed. ... Um, let us know when there's an update, so we can be insane, too:-) ... I have to write a bunch of exception classes and fill them in the VM instead of the error messages I had. ...
    (comp.sys.apple2.programmer)