VectorFromBstr

This function returns a vector, assigning each character in the BSTR to an element of the vector.

At a Glance

Header file: Oleauto.h
Windows CE versions: 2.0 and later

Syntax

HRESULT VectorFromBstr(BSTR bstr, SAFEARRAY FAR * FAR * ppsa);

Parameters

bstr

Unicode string to be converted to a vector.

ppsa

On exit, pointer to a one-dimensional safe array that contains the characters in the BSTR.

Return Values

One of the values obtained from the returned HRESULT and described in the following table is returned.

Value Description
S_OK Success.
E_OUTOFMEMORY Out of memory.
E_INVALIDARG BSTR is NULL.

Remarks

Passing into this function any invalid and, under some circumstances, NULL pointers will result in unexpected termination of the application.