ImapGetResultString Function  
 
INT WINAPI ImapGetResultString(
  HCLIENT hClient,  
  LPTSTR lpszResult,  
  INT nMaxLength  
);

The ImapGetResultString function returns the last message sent by the server along with the result code.

Parameters

hClient
Handle to the client session.
lpszResult
The buffer that will contain the result string returned by the server.
nMaxLength
The maximum number of characters that may be copied into the result string buffer, including the terminating null character.

Return Value

If the function succeeds, the return value is the length of the result string. If a value of zero is returned, this means that no result string was sent by the server. If the function fails, the return value is IMAP_ERROR. To get extended error information, call ImapGetLastError.

Remarks

The ImapGetResultString function is most useful when an error occurs because the server will typically include a brief description of the cause of the error. This can then be parsed by the application or displayed to the user. The result string is updated each time the client sends a command to the server and then calls ImapGetResultCode to obtain the result code for the operation.

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

See Also