Re: baffled by exception
From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 10/12/04
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: baffled by exception"
- Previous message: Bonj: "baffled by exception"
- In reply to: Bonj: "baffled by exception"
- Next in thread: Bonj: "Re: baffled by exception"
- Reply: Bonj: "Re: baffled by exception"
- Messages sorted by: [ date ] [ thread ]
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!
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: baffled by exception"
- Previous message: Bonj: "baffled by exception"
- In reply to: Bonj: "baffled by exception"
- Next in thread: Bonj: "Re: baffled by exception"
- Reply: Bonj: "Re: baffled by exception"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|