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 / May 2006

Tip: Looking for answers? Try searching our database.

.NET connection points without events

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marius Matioc - 04 May 2006 02:07 GMT
Hello,

I have a COM object and a .NET object that need to talk to each other.
The COM object creates the .NET object, but then the .NET object needs to
call methods in the COM object. It appears to me that the best way to do this
would be via connection points.
How do I do it on the .NET side? After decorating with ComSourceInterfaces,
how do I get to the interface? Note that these are not events, so I would
like to call the methods as if I had created the COM object.
Is there a way to EnumConnections?
Is there a completely different way of doing this?

Thanks,
Marius Matioc
yoga weazel - 10 May 2006 14:26 GMT
As long as you have the interface to the object you could always interogate
the COM objects Type and use the GetMethods()/GetMethod calls the get the
method(s) you wish to execute and then call Invoke on the
Reflection.MethodInfo instance(s).

> Hello,
>
[quoted text clipped - 10 lines]
> Thanks,
> Marius Matioc
Marius Matioc - 10 May 2006 20:09 GMT
Thanks for taking the time to answer.
I don't know how to get the interface of the COM object.
After decorating a class with "ComSourceInterfaces", how does one get an
interface pointer to that source interface?
Or is there another, better, way to use connection points in this case?

Marius

> As long as you have the interface to the object you could always interogate
> the COM objects Type and use the GetMethods()/GetMethod calls the get the
> method(s) you wish to execute and then call Invoke on the
> Reflection.MethodInfo instance(s).

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.