473,396 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

info on RSS api

is there a better newsgroup to ask questions about the RSS api?

if so, please direct me because i cant find anything more specific than this.

My question:
How do the events work thought COM interop? I'm trying to 'GetWatcher' on a
Feed and I cannot cast this (object) to anything usefull without an exception.

Any help would be great. Thanks.
Feb 9 '06 #1
6 1262
In article <3E**********************************@microsoft.co m>,
Br****************@discussions.microsoft.com says...
My question:
How do the events work thought COM interop? I'm trying to 'GetWatcher' on a
Feed and I cannot cast this (object) to anything usefull without an exception.


For COM interop, your best bet is the microsoft.public.dotnet.interop
group. However, the big question is are you trying to expose a .NET
event to COM, or trying to consume a COM event from inside .NET?

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Feb 12 '06 #2
im trying to consume a com event from .net.

"Patrick Steele" wrote:
In article <3E**********************************@microsoft.co m>,
Br****************@discussions.microsoft.com says...
My question:
How do the events work thought COM interop? I'm trying to 'GetWatcher' on a
Feed and I cannot cast this (object) to anything usefull without an exception.


For COM interop, your best bet is the microsoft.public.dotnet.interop
group. However, the big question is are you trying to expose a .NET
event to COM, or trying to consume a COM event from inside .NET?

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele

Feb 12 '06 #3
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
Feb 13 '06 #4
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

Feb 13 '06 #5
In article <4F**********************************@microsoft.co m>,
Br****************@discussions.microsoft.com says...
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.


Ok. After doing some research it appears you're using some new API
released by Microsoft for RSS feeds. You didn't originally say which
RSS API you were using so I didn't have enough details.

From looking at the MSDN documentation, it's difficult to tell what that
method is returning. Do you have VB6 installed? If so, add a reference
to the API and see what the VB6 object browser says it returns (I don't
have VB6 installed on my current machine right now).

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Feb 18 '06 #6
The method returns an interface called IFeedFolderEvents_Event. If you check
out my blog you will find an example of event handlers for the feeds API.

http://www.dotnetjunkies.com/WebLog/...23/135536.aspx

--
Wim De Cleen
http://www.dotnetjunkies.com/WebLog/wimdc/
"Patrick Steele [MVP]" wrote:
In article <4F**********************************@microsoft.co m>,
Br****************@discussions.microsoft.com says...
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.


Ok. After doing some research it appears you're using some new API
released by Microsoft for RSS feeds. You didn't originally say which
RSS API you were using so I didn't have enough details.

From looking at the MSDN documentation, it's difficult to tell what that
method is returning. Do you have VB6 installed? If so, add a reference
to the API and see what the VB6 object browser says it returns (I don't
have VB6 installed on my current machine right now).

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele

Feb 25 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: ivan_oj28 | last post by:
Hi, I am developing an application where I need to read the caller id from an incoming call. The only info (for now) I need is the caller id info, so that I can display the propper caller info on...
10
by: Frank | last post by:
Using Python 2.2.2, I want to catch all exceptions from "socket.gethostbyaddr(ip)" From IDLE, I can generate: >>> socket.gethostbyaddr('1.2') Traceback (most recent call last): File...
5
by: Lloyd Dupont | last post by:
I'm trying to print some of my document. The problem is, the rendering of the document is not done through GDI+ at all but through plain old GDI, and I need it like that as I am using Uniscribe to...
0
by: jokerman | last post by:
I want to grab the amount of images in each <subnumber> section. How? I have this code in Flash; var pArray = new Array(); var tArray = new Array(); var myXML:XML = new XML();...
1
by: oddbande | last post by:
We have just upgraded a test enviroment to db2 9, and have set both the notifylevel and diaglevel to 3. But even so I get a lot of these messages in my db2diag.log: ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.