Yes, I understand how to add events, but I'm having a problem with the RSS
api while trying to get the class that exposes the event. If I call (C#):
_folder.GetWatcher(...);
it returns a __ComObject that can't be cast to anything I would expect (like
the FeedFolderWatcherClass). In the debugger it also doesn't show any
events/properties on the __ComObject.
So, specifically, I'm wondering how to deal with feed/folder events for the
RSS platform using ComInterop and C#. An example of working code doing this
would be a great addition to msdn docs, for example.
"Patrick Steele [MVP]" wrote:
In article <CE**********************************@microsoft.co m>,
Br****************@discussions.microsoft.com says... im trying to consume a com event from .net.
Is this in VB.NET or C#? In VB.NET, you should be able to declare the
object that sources events as a "WithEvents" variable. Or you could use
the AddHandler/RemoveHandler keywords.
In C#, you should be able to add a handler just like any other C# event
-- use the += syntax along with creating a new delegate with a method of
a matching signature.
Do you have some sample code that could show the problem? What COM
object are you trying to use? Is it a custom COM object you developed
or is it something public?
--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele