SysAllocStringLen Function
Allocates a new string, copies cch characters from the passed string into it, and then appends a null terminator.
BSTR SysAllocStringLen( const OLECHAR *pch, unsigned int cch );
The pch string can contain embedded null characters and does not need to end with a NULL. Free the returned string later with SysFreeString. If pch is not NULL, then the memory allocated to pch must be at least cch characters long.
Note |
|---|
This function does not convert a char * string into a Unicode BSTR. |
Show:
Note