BstrFromVector function

Returns a BSTR, assigning each element of the vector to a character in the BSTR.

Syntax


HRESULT BstrFromVector(
  _In_  SAFEARRAY *psa,
  _Out_ BSTR      *pbstr
);

Parameters

psa [in]

The vector to be converted to a BSTR.

pbstr [out]

A BSTR, each character of which is assigned to an element from the vector.

Return value

This function can return one of these values.

Return codeDescription
S_OK

Success.

E_OUTOFMEMORY

Out of memory.

E_INVALIDARG

The psa parameter is null.

DISP_E_TYPEMISMATCH

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

 

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

 

 

Show: