NntpStoreArticle
INT NntpStoreArticle(
HCLIENT hClient,  
LONG nArticleId,  
LPCTSTR lpszFileName  
);

The NntpStoreMessage function retrieves an article from the current newsgroup and stores it in a local file.

Parameters

hClient
Handle to the client session.
nArticleId
Number of the article to retrieve. This value must be greater than zero.
lpszFileName
Pointer to a null-terminated string which specifies the file that the article is to be stored in. If the file does not exist, it will be created. If the file does exist, it will be overwritten with the contents of the article.

Return Value

If the function succeeds, the return value is zero. If the function fails, the return value is NNTP_ERROR. To get extended error information, call NntpGetLastError.

Remarks

The NntpStoreArticle function provides a method of retrieving and storing an article on the local system. The contents of the article is stored as a text file, using the specified file name. This function always causes the caller to block until the entire message has been retrieved, even if the client has been put in asynchronous mode.

If event handling is enabled, the NNTP_EVENT_PROGRESS event will fire periodically during the transfer of the article to the local system. An application can determine how much of the article has been retrieved by calling the NntpGetTransferStatus function.

To retrieve the message into a global memory buffer so that it can be passed to the MIME library, use the NntpGetArticle function.

Requirements

Client: Requires Windows Vista, Windows XP or Windows 2000 Professional.
Server: Requires Windows Server 2008, Windows Server 2003 or Windows 2000 Server.
Header: Include cstools6.h.
Library: Use csnwsav6.lib.
Unicode: Implemented as Unicode and ANSI versions.

See Also

NntpGetArticle, NntpGetArticleHeaders, NntpGetTransferStatus


Copyright © 2008 Catalyst Development Corporation. All rights reserved.