Feedback

  • Contents
 

ISOAPBase64::Encode Method

Synopsis

Encodes the supplied data into a string that is Base64 encoded.

Function Prototype

HRESULT Encode(

   [in] VARIANT vtData,

   [in,optional] VARIANT vtCharacterSet,

   [in,optional] VARIANT vtMaxLineWidth,

   [in,optional] VARIANT vtLineSeparator,

   [out, retval] BSTR* pbstrResult

);

C/C++ Syntax

HRESULT Encode(VARIANT vtData, VARIANT vtCharacterSet, VARIANT vtMaxLineWidth, VARIANT vtLineSeparator, BSTR* pbstrResult);

Parameters

vtData

The data to be encoded.   This may be a string, a SAFEARRAY of bytes, or an object supporting IStream or ISequentialStream.

vtCharacterSet

This optional input parameter is a VARIANT that identifies a character set.  Unicode (UTF-8) is used by default.  If the data to be encoded is a string, the string is converted to the specified character set before it is encoded.  The character set may be specified as string or as a numeric code page.

vtMaxLineWidth

This optional input parameter is a VARIANT that sets the maximum width of a line of encoded data in characters. The default is 0, which indicates no line breaks.

vtLineSeparator

This optional parameter specifies the characters used to separate lines (e.g. the characters that will be written to create a line break).  The default is CRLF (\r\n).

pbstrResult

The return value is a Base64 encoded string.