Groups | Blog | Home
all groups > dotnet interop > june 2004 >

dotnet interop : What COM-object is my Interop using?


Joakim Olesen
6/25/2004 11:07:49 AM
I have an Interop class that works properly. However, I don't know wich
COM-object it calls (I'm not the one that created the Interop class).

How can I find out? I've tried to look at the code generated by ildasm.exe
and remotesoft salamander, but I can't find the call to the COM-object. All
I can find is the method signature for the Interop method, wich casts the
string arguments using ([MarshalAs(UnmanagedType.BStr)]


Joakim

Robert Jordan
6/27/2004 7:17:14 PM
[quoted text, click to view]

take a look at which interfaces the interop assembly defines
and dump the GUID-attribute:

Debug.WriteLine(typeof(ISomeInterface).GUID);

or inspect the GUID-property of an object of those interfaces:

Debug.WriteLine(someObject.GetType().GUID);

Joakim Olesen
6/28/2004 10:24:06 AM
"
[quoted text, click to view]
"

Doesn't that only return the GUID of the interop class? Or does it actually
return the GUID of the COM class? If so, how do I find out the file name
(dll-file) that this COM class is located in?

Joakim



"Robert Jordan" <robertj@gmx.net> skrev i en meddelelse
news:cbmver$ido$01$1@news.t-online.com...
[quoted text, click to view]

Robert Jordan
7/3/2004 12:19:20 PM
[quoted text, click to view]

No, it's the "real" COM GUID. The DLL you look up from
AddThis Social Bookmark Button