Share via


SysStringLen (Compact 2013)

3/26/2014

This function retrieves the length of a string.

Syntax

UINT SysStringLen(
  BSTR bstr 
); 

Parameters

  • bstr
    [in] Unicode string that was allocated previously.

Return Value

The number of characters in bstr, not including a terminating null character, indicates success.

If the bstr parameter is null, zero is returned.

Remarks

The returned value may be different from _fstrlen(bstr) if the following occurred:

For a BSTR allocated with SysAllocStringLen, SysAllocStringLen, or SysAllocStringByteLen, the SysStringLen function retrieves the number of characters specified in the cch parameter at allocation time.

Windows Embedded Compact and Windows Embedded Compact support only only Unicode strings.

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