Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SysAllocString

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function allocates a new string and copies the passed string into it. This function returns null if there is insufficient memory or if a null pointer is passed in.


BSTR SysAllocString(
  OLECHAR FAR* sz
);

sz

[in] Null-terminated string to copy. The string must be a Unicode string in 32-bit applications, and an ANSI string in 16-bit applications.

Returns the allocated string to indicate success, or NULL to indicate that insufficient memory exists or that the sz parameter was NULL.

Windows Embedded CE and Windows Mobile support 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.

Headeroleauto.h
Libraryoleaut32.lib
Windows Embedded CEWindows CE 2.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2014 Microsoft