IMimeBody::CopyTo method

Copies everything from the current body object to the specified body object.

Syntax

HRESULT CopyTo(
  [in] IMimeBody *pBody
);

Parameters

pBody [in]

Type: IMimeBody*

Specifies a pointer to the IMimeBody object to copy the current body object to. If this method fails, the state of pBody is undefined.

Return value

Type: HRESULT

Returns one of the following values.

Return code Description
S_OK
Indicates success.
E_FAIL
Indicates that an unknown error has occurred.
E_INVALIDARG
Indicates that pBody is NULL.
E_OUTOFMEMORY
Indicates that an attempt to allocate memory failed.
E_NOINTERFACE
Indicates that pBody is not an object implemented by MimeOLE.

Remarks

After this method, pBody is an exact replica of the current body object. pBody has no association with the message that the current body object is part of.

Requirements

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