CMailMessage::ImportMessage Method  
 
BOOL ImportMessage(
  LPCTSTR lpszFileName  
);
BOOL ImportMessage(
  LPCTSTR lpszMessage,  
  INT nLength  
);

The ImportMessage method imports the message from a file or a string buffer in memory, replacing the current message contents.

Parameters

lpszFileName
A pointer to a string which specifies the name of the file that contains the message to be imported.
lpszMessage
A pointer to a string which contains the message to be imported.
nLength
An integer value which specifies the number of bytes to read from the string buffer. If this argument is -1, then the entire contents of the string up to the terminating null character will be imported.

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.

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

See Also

ExportMessage, ParseBuffer