2 #include <proto/arossupport.h>
3 #include <proto/exec.h>
7 BSTR
CreateBSTR(CONST_STRPTR src
)
10 ULONG len
= strlen(src
);
11 ULONG size
= AROS_BSTR_MEMSIZE4LEN(len
);
13 dst
= AllocVec(size
, MEMF_ANY
);
18 CopyMem(src
, dst
, size
);
20 /* Our BSTR's are also NUL-terminated: len + 1 */
21 CopyMem(src
, dst
+ 1, len
+ 1);