Partager via


BstrFromVector (Compact 2013)

3/26/2014

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

Syntax

HRESULT BstrFromVector(
  SAFEARRAY FAR* psa,
  BSTR FAR* pbstr
);

Parameters

  • psa
    [in] Pointer to the vector to be converted to a BSTR.
  • pbstr
    [out] Pointer to a BSTR, each character of which is assigned to an element from the vector.

Return Value

Returns the HRESULT values shown in the following table.

Value

Description

S_OK

Success.

E_OUTOFMEMORY

Out of memory.

E_INVALIDARG

The psa parameter is NULL.

DISP_E_TYPEMISMATCH

The psa parameter is not a vector (not an array of bytes).

Requirements

Header

oleauto.h

Library

oleaut32.lib

See Also

Reference

Automation Functions