conversion methods
 
 
 
conversion methods

This reference page is linked to from the following overview topics: Unicode.


Functions

wchar_t *  ToBSTR () const
  Return a BSTR of this string.
static MaxString  FromBSTR (const wchar_t *string, size_t length=(size_t)-1)
  Construct a MaxString out of a BSTR.
const MaxStringCast< wchar_t >  ToOLESTR (size_t *length=NULL) const
  Construct a OLE string.
static MaxString  FromOLESTR (const wchar_t *string, size_t length=(size_t)-1)
  Construct a MaxString out of a OLESTR.

Function Documentation

wchar_t* ToBSTR ( ) const

Return a BSTR of this string.

The string is allocated with SysAllocString, and the caller is responsible to free it using SysFreeString.

static MaxString FromBSTR ( const wchar_t *  string,
size_t  length = (size_t)-1 
) [inline, static]

Construct a MaxString out of a BSTR.

See also:
FromUTF16
{ return FromUTF16(string, length); }
const MaxStringCast< wchar_t > ToOLESTR ( size_t *  length = NULL ) const [inline]

Construct a OLE string.

Returns:
A MaxStringCast<wchar_t> which can be cast to a wchar_t for converting to an OLESTR
{
        return ToUTF16(length);
}
static MaxString FromOLESTR ( const wchar_t *  string,
size_t  length = (size_t)-1 
) [inline, static]

Construct a MaxString out of a OLESTR.

See also:
FromUTF16
{ return FromUTF16(string, length); }