This function allocates a new string, copies cch characters from the passed string into it, and then appends a null character.
BSTR SysAllocStringLen( OLECHAR FAR* pch, unsigned int cch );
[in] Pointer to cch characters to copy, or NULL to keep the string uninitialized.
[in] Number of characters to copy from pch. A null character is placed afterwards, allocating a total of cch+1 characters.
Returns a pointer to a copy of the string indicates success. NULL indicates that 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 CE supports only Unicode strings.
Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.
OS Versions: Windows CE 2.0 and later.
Link Library: Oleaut32.lib.
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.