Re: Invalid callback object instance
- From: Mattias Sjögren <mattias.dont.want.spam@xxxxxxxx>
- Date: Thu, 04 Jan 2007 21:20:55 +0100
Aaron,
This all works great so long as the application is written in C++. I'm
having a problem with a sample app I wrote in C#, however. The object
I receive as the first parameter (caller) is not valid. The debugger
shows that it has the correct type, but if you try to access it you
wind up with invalid cast exceptions.
Did you import a type library that defines teh ICallback interface, or
did you write yoru own definition of it in managed code?
Does the callback happen on the same thread or a different one?
Do you have the source code for the COM library?
Mattias
--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
.
- Follow-Ups:
- Re: Invalid callback object instance
- From: aaron . m . johnson
- Re: Invalid callback object instance
- References:
- Invalid callback object instance
- From: aaron . m . johnson
- Invalid callback object instance
- Prev by Date: Re: Visual component written in unmanaged C++
- Next by Date: Re: Problem marshalling memory allocated in C++ DLL
- Previous by thread: Invalid callback object instance
- Next by thread: Re: Invalid callback object instance
- Index(es):
Relevant Pages
|
Loading