---
name: "SysAllocString"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/SysAllocString"
---

# SysAllocString(3w)

## NAME

**SysAllocString** (OLEAUT32.2)

## SYNOPSIS

BSTR SysAllocString\
  (\
   LPCOLESTR *str*\
  )

## DESCRIPTION

Create a **BSTR** from an **OLESTR**.

## PARAMS

*str* **\[In\]**  Source to create **BSTR** from.

## RETURNS

**Success:** A **BSTR** allocated with **[SysAllocStringLen(3w)](/SysAllocStringLen/3w.md)**.

**Failure:** **NULL**, if oleStr is **NULL**.

## NOTES

See **[BSTR(3w)](/BSTR/3w.md)**. **MSDN** (October **2001**) incorrectly states that **NULL** is returned if oleStr has a length of **0.** Native Win32 and this implementation both return a valid empty **BSTR** in this case.

## IMPLEMENTATION

Declared in **"oleauto.h"**.

Implemented in **"dlls/oleaut32/oleaut.c"**.

Debug channel **"ole"**.
