BSTR SysAllocStringLen(
OLECHAR FAR* pch,
unsigned int cch
);
Allocates a new string, copies cch characters from the passed string into it, and then appends a null character.
Note: This function does NOT convert a char * string into a unicode BSTR. The BSTR returned with this function can only be used with 16 bit applications.
Points to a copy of the string, or Null if insufficient memory exists.
If pch is Null, a string of the requested length is allocated, but not initialized. The pch string can contain embedded null characters and does not need to end with a Null. Free the returned string later with SysFreeString.
Windows NT: Use version 3.1 and later.
Windows: Use Windows 95 and later.
Header: Declared in oleauto.h.
Import Library: Link with oleaut32.lib.