CNewsFeed::GetItemProperty Method  
 
INT GetItemProperty(
  UINT nItemId,  
  LPCTSTR lpszProperty,  
  LPCTSTR lpszAttribute,  
  LPTSTR lpszValue,  
  INT nMaxLength  
);
INT GetItemProperty(
  UINT nItemId,  
  LPCTSTR lpszProperty,  
  LPCTSTR lpszAttribute,  
  CString& strValue  
);

The GetItemProperty method is used to return the value of a property for the specified item in the news feed channel.

Parameters

nItemId
An integer value which identifies the news feed item. The first item identifier in the news feed has a value of one, and that value is incremented for each additional item in the feed. If this parameter is zero or specifies a value larger than the number of items in the feed, this method will fail.
lpszProperty
A null-terminated string which specifies the name of the item property. This parameter cannot point to an empty string or specify a NULL pointer.
lpszAttribute
A null-terminated string which specifies the name of an attribute for the property. If this parameter is an empty string or NULL pointer, the method will return the value of the property, rather than an attribute of the specified property.
lpszValue
A null-terminated string buffer which will contain the value of the specified item property or attribute. This string should be large enough to contain the property value. If this parameter is a NULL pointer, it will be ignored and the method will only return the length of value for the specified property.
nMaxLength
The maximum number of characters that may be copied into the property value buffer. If the value of this parameter is zero, then the lpszValue parameter is ignored and the method will only return the length of the value for the specified property.

Return Value

If the method succeeds, the return value is the length of the property value string. A return value of zero indicates that the property does not contain any value. If the method fails, the return value is RSS_ERROR. To get extended error information, call GetLastError.

Remarks

The GetItemProperty method is primarily used with custom item properties that may be used with extensions to the news feed. The standard properties for an item such as the title, link and description can be obtained using GetItem and related methods. However, if items in the feed contain custom properties that are not part of the standard RSS format, this method can be used to obtain those values.

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