Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / July 2004

Tip: Looking for answers? Try searching our database.

What COM-object is my Interop using?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joakim Olesen - 25 Jun 2004 10:07 GMT
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 - 27 Jun 2004 18:17 GMT
> 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).
[quoted text clipped - 3 lines]
> I can find is the method signature for the Interop method, wich casts the
> string arguments using ([MarshalAs(UnmanagedType.BStr)]

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);

rob
Joakim Olesen - 28 Jun 2004 09:24 GMT
"
> take a look at which interfaces the interop assembly defines
> and dump the GUID-attribute:
>
> Debug.WriteLine(typeof(ISomeInterface).GUID);
"

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

> > 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).
[quoted text clipped - 14 lines]
>
> rob
Robert Jordan - 03 Jul 2004 11:19 GMT
> "
>
[quoted text clipped - 8 lines]
> 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?

No, it's the "real" COM GUID. The DLL you look up from
the registry. The path is HKEY_CLASSES_ROOT\CLSID\.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.