SysStringByteLen

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

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


HRESULT SysStringByteLen(
  BSTR bstr 
);

bstr

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

Returns an HRESULT value.

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.

Headeroleauto.h
Libraryoleaut32.lib
Windows Embedded CEWindows CE 2.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show: