Share via


MimeOleEncodeHeader function

Do not use. Encodes a message header string.

Syntax

HRESULT MimeOleEncodeHeader(
  _In_    HCHARSET      hCharset,
  _In_    LPPROPVARIANT pData,
  _Out_   LPSTR         *ppszEncoded,
  _Inout_ LPRFC1522INFO pRfc1522Info
);

Parameters

hCharset [in]

Type: HCHARSET

Specifies the handle of the character set to use to encode the header.

pData [in]

Type: LPPROPVARIANT

Specifies a pointer to the PROPVARIANT structure that contains the header to encode (either pData->pszVal or pData->pwszVal).

ppszEncoded [out]

Type: LPSTR*

Receives a pointer to an LPSTR that contains the encoded header. The client is responsible for freeing this pointer by calling IMalloc::Free.

pRfc1522Info [in, out]

Type: LPRFC1522INFO

Receives a pointer to the RFC1522INFO structure that contains RFC 1522 encoding information for the header.

Return value

Type: HRESULT

Returns one of the following values.

Return code Description
S_OK
Indicates success.
E_INVALIDARG
Indicates that pData or ppszEncoded is NULL or that pData->vt is not equal to VT_LPSTR ro VT_LPWSTR.
MIME_E_INVALID_HANDLE
Indicates that hCharset is an invalid handle.
E_FAIL
Indicates that hCharset is NULL and an appropriate default character set does not exist.
E_OUTOFMEMORY
Indicates that an attempt to allocate memory failed.

Remarks

See EncodeHeader for more information.

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
Library
Inetcomm.lib
DLL
Inetcomm.dll (version 6.0 or later)