Also, just out of interest, I'm not using a type library. Apparently, an
MSDN article states that RCW honours the results of
QueryInterface(), in which case, why the hell doesn't it find my IDataObject
interface!
"Robin Tucker" <id*************************@reallyidont.com> wrote in
message news:bk*******************@news.demon.co.uk...
I have an existing COM object that supports IDataObject (written in C++).
I want to use GetFormats and GetData on this object in VB.NET, but I
blooming well can't.
If I write:
Dim theObject As IDataObject
theObject = GetObject ( "C:\GAS.TGW" )
(its an image file type), I can load the object no problem with:
Dim theObject As Object
theObject = GetObject ( "C:\GAS.TGW" )
Everything is fine then but of course I cannot cast to the IDataObject
interface.
I get a nice specified cast is not valid exception, even though I know it
is, because I'm damned well using it in an unmanaged C++ program.
So, can I do basic things like this with .NET or did Microsoft
deliberately screw all of our existing technologies with these latest tools.