conversion methods

conversion methods

Module description

Functions

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

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 
)
inlinestatic

Construct a MaxString out of a BSTR.

See also
FromUTF16
346 { return FromUTF16(string, length); }
static MaxString FromUTF16(const wchar_t *string, size_t length=(size_t)-1)
Construct a MaxString from a UTF16 encoded wide string.
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
511 {
512  return ToUTF16(length);
513 }
MaxStringCast< wchar_t > ToUTF16(size_t *length=NULL) const
Cast this object to a UTF16 or UNICODE encoded string.
static MaxString FromOLESTR ( const wchar_t *  string,
size_t  length = (size_t)-1 
)
inlinestatic

Construct a MaxString out of a OLESTR.

See also
FromUTF16
354 { return FromUTF16(string, length); }
static MaxString FromUTF16(const wchar_t *string, size_t length=(size_t)-1)
Construct a MaxString from a UTF16 encoded wide string.