CPopClient::StoreMessage Method  
 
INT StoreMessage(
  UINT nMessageId,  
  LPCTSTR lpszFileName  
);

The StoreMessage method stores a message in the specified file.

Parameters

nMessageId
Number of the message to retrieve. This value must be greater than zero. The first message in the mailbox is message number one.
lpszFileName
Pointer to a string which specifies the file that the message will be stored in. If an empty string or NULL pointer is passed as an argument, the message is copied to the system clipboard.

Return Value

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

Remarks

The StoreMessage method provides a method of retrieving and storing a message on the local system. The contents of the message 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.

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: cspopv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also