INT StoreArticle( |
|
LONG nArticleId, |
|
|
LPCTSTR lpszFileName |
|
); |
The StoreMessage method retrieves an article from the
current newsgroup and stores it in a local file.
Parameters
- nArticleId
- Number of the article to retrieve. This value must be greater
than zero.
- lpszFileName
- Pointer to a string which specifies the file
that the article will 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 method succeeds, the return value is zero. If the method
fails, the return value is NNTP_ERROR. To get extended error
information, call GetLastError.
Remarks
The StoreArticle method 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 method
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 GetTransferStatus method.
To retrieve the message into a global memory buffer so that it can
be passed to the MIME library, use the GetArticle method.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Import Library: csnwsv11.lib
Unicode: Implemented as Unicode and ANSI versions
See Also
GetArticle,
GetArticleHeaders,
GetTransferStatus
|