This function allocates a new string and copies the passed string into it. SysAllocString returns null if there is insufficient memory or if a null pointer is passed in.
BSTR SysAllocString( OLECHAR FAR* sz );
- [in] Null-terminated string to copy. The sz parameter must be a Unicode string in 32-bit applications, and an ANSI string in 16-bit applications.
A pointer to a BSTR that contains the string indicates success. NULL indicates that insufficient memory exists or the sz parameter was NULL.
Windows CE supports only Unicode strings.
Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.
You can free strings created with SysAllocString using SysFreeString.
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.