Compartilhar via


SysStringByteLen (Compact 2013)

3/26/2014

This function retrieves the length (in bytes) of a string.

Syntax

HRESULT SysStringByteLen(
  BSTR bstr 
);

Parameters

  • bstr
    [in] Unicode string that was previously allocated. It cannot be NULL.

Return Value

Returns an HRESULT value.

Remarks

The returned value can be different from fstrlen(bstr) if the following occurred:

For a BSTR allocated with SysAllocStringLen, SysReAllocStringLen, or SysAllocStringByteLen, this function always retrieves the number of bytes specified in the len parameter at allocation time.

Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.

Requirements

Header

oleauto.h

Library

oleaut32.lib

See Also

Reference

Automation Functions
BSTR
SysAllocStringLen
SysReAllocStringLen
SysAllocStringByteLen