Compartir a través de


SysAllocString (Compact 2013)

3/26/2014

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.

Syntax

BSTR SysAllocString(
  OLECHAR FAR* sz
);

Parameters

  • 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.

Return Value

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

Remarks

Windows Embedded Compact and Windows Embedded Compact 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.

Requirements

Header

oleauto.h

Library

oleaut32.lib

See Also

Reference

Automation Functions
SysFreeString