3ds Max C++ API Reference
Loading...
Searching...
No Matches
conversion methods

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.
 

Detailed Description

Function Documentation

◆ ToBSTR()

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.

◆ FromBSTR()

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.

◆ ToOLESTR()

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.

◆ FromOLESTR()

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); }