次の方法で共有


IMimeMessageTree::BindToObject method

Obtains an interface in the message tree for the specified body.

Syntax

HRESULT BindToObject(
  [in]  const HBODY  hBody,
  [in]        REFIID riid,
  [out]       void   **ppvObject
);

Parameters

hBody [in]

Type: const HBODY

Specifies a handle to a message body.

riid [in]

Type: REFIID

Specifies the interface ID to return.

Value Meaning
IID_IMimeAddressTable
Indicates the IMimeAddressTable interface for a body.
IID_IMimeBody
Indicates the IMimeBody interface for a body.
IID_IMimeHeaderTable
Indicates the IMimeHeaderTable interface for a body.
IID_IMimeMessage
Indicates the IMimeMessage interface for a body that is a message attachment; for example, where Content-Type is "message/rfc822".
IID_IMimePropertySet
Indicates the IMimePropertySet interface for a body.
IID_IStream
Indicates the IET_BINARY body data. This is equivalent to calling the following method.
GetData(IET_BINARY,&pStream);
IID_IUnicodeStream
Indicates the IET_UNICODE body data. This is equivalent to calling the following method.
GetData(IET_UNICODE,&pStream);

ppvObject [out]

Type: void**

Receives the address of a pointer to the requested object. The client is responsible for releasing the object.

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 ppvObject is NULL.
MIME_E_NO_DATA
Indicates that hBody is equal to HBODY_ROOT (0xffffffff) and there is no root body.
MIME_E_INVALID_HANDLE
Indicates that hBody is an invalid handle.
E_NOINTERFACE
Indicates that the interface ID specified by riid is not supported.

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)