SysStringByteLen
This function returns the length (in bytes) of a BSTR.
HRESULT SysStringByteLen(
BSTR bstr
);
Parameters
- bstr
[in] Unicode string that was allocated previously. It cannot be NULL.
Return Values
The number of bytes in bstr, not including a terminating null character, indicates success.
Remarks
The returned value may be different from fstrlen(bstr) if the BSTR was allocated with SysAllocStringLen, SysReAllocStringLen or SysAllocStringByteLen, and the passed-in characters included a null character in the first len characters. For a BSTR allocated with SysAllocStringLen, SysReAllocStringLen, or SysAllocStringByteLen, this function always returns 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
OS Versions: Windows CE 2.0 and later.
Header: Oleauto.h.
Link Library: Oleaut32.lib.
See Also
BSTR | SysAllocStringLen | SysReAllocStringLen | SysAllocStringByteLen
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.