SysStringByteLen (Windows CE 5.0)
This function retrieves the length (in bytes) of a string.
HRESULT SysStringByteLen(BSTRbstr );
Parameters
- bstr
[in] Unicode string that was previously allocated. It cannot be NULL.
Return Values
Returns an HRESULT value.
Remarks
The returned value can be different from fstrlen(bstr) if the following occurred:
- If BSTR was allocated with SysAllocStringLen, SysReAllocStringLen or SysAllocStringByteLen
- If 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 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
OS Versions: Windows CE 2.0 and later.
Header: Oleauto.h.
Link Library: Oleaut32.lib.
See Also
Automation Functions | BSTR | SysAllocStringLen | SysReAllocStringLen | SysAllocStringByteLen
Send Feedback on this topic to the authors