IPOP3Transport::CommandTOP method

[IPOP3Transport::CommandTOP is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Sends the TOP command to the server for the specified message or messages.

Syntax

HRESULT CommandTOP(
  [in] POP3CMDTYPE cmdtype,
  [in] DWORD       dwPopId,
  [in] DWORD       cPreviewLines
);

Parameters

cmdtype [in]

Type: POP3CMDTYPE

Specifies a POP3CMDTYPE value that indicates how to apply the command.

dwPopId [in]

Type: DWORD

Specifies a DWORD that contains the ID of the message to retrieve. This parameter can be NULL when the cmdtype is POP3CMD_GET_MARKED or POP3CMD_GET_ALL.

cPreviewLines [in]

Type: DWORD

Specifies a DWORD that contains the number of lines in the message body in addition to the header to retrieve from the server.

Return value

Type: HRESULT

Returns one of the following values.

Return code Description
S_OK
Indicates success.
E_INVALIDARG
Indicates that cmdtype is POP3_NONE or is invalid.
E_OUTOFMEMORY
Indicates that an attempt to allocate memory failed.
IXP_E_NOT_INIT
Indicates that a connection to the server has not been established.
IXP_E_BUSY
Indicates that the server connection is busy.
IXP_E_POP3_POPID_OUT_OF_RANGE
Indicates that dwPopId is invalid.
IXP_E_POP3_NEED_STAT
Indicates that status has not been requested from the server during this session.
IXP_E_POP3_NO_MESSAGES
Indicates that there are no messages.
IXP_E_POP3_NO_MARKED_MESSAGES
Indicates that no messages are marked for this command.
IXP_E_SOCKET_WRITE_ERROR
Indicates that a transmission error occurred.

Requirements

Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Product
Outlook Express 6.0
Header
Imnxport.h
IDL
Imnxport.idl
DLL
Inetcomm.dll (version 6.0 or later)