CNewsFeed::RefreshFeed Method  
 
BOOL RefreshFeed(
  LPRSSCHANNEL lpChannel  
);

The RefreshFeed method reloads the news feed and updates the items in the channel.

Parameters

lpChannel
A pointer to an RSSCHANNEL structure which contains information about the news feed channel such as the feed title, hyperlink and description. If the parameter is not NULL, the structure is initialized by the method. If the parameter is NULL, it is ignored and no information is returned.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

When the RefreshFeed method is called, the news feed is reloaded from the original source and the items in the channel are updated. For news feeds that are frequently updated, the nTimeToLive member of the RSSCHANNEL structure can provide a hint to the application as to how frequently the feed should be refreshed.

If the news feed was originally opened using an http or https URL, this method will download the updated feed from the server and store it temporarily on the local system. Accessing a remote feed requires that the application has permission to establish a connection with the server and will cause the application to block until the feed has been downloaded, the operation times out or an error occurs. The same timeout period and options will be used as when the feed was originally opened.

The RefreshFeed method should only be used if the feed was opened using the OpenFeed method, otherwise the method will fail with an error indicating that the operation is not supported.

The data referenced in the RSSCHANNEL structure should be considered read-only and never modified by the application. The members of this structure returned by previous calls to either the OpenFeed or RefreshFeed methods will no longer be valid and should not be referenced. Likewise, the members of an RSSCHANNELITEM structure will no longer be valid after this method returns.

It is important that the application does not make any assumptions about the number of news items in the channel, or the content associated with those items after the RefreshFeed function has been called. For example, never assume that the number of items in the channel remains the same, or that the item IDs for each item remains the same. If you need to find a specific item in the news feed, use the FindItem method.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csrssv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also