Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

SysStringByteLen Function

Returns the length (in bytes) of a BSTR. Not valid for 16-bit systems.

UINT SysStringByteLen(  
  BSTR  bstr  
);
bstr

A BSTR allocated previously.

The number of bytes in bstr, not including a terminating null character. If the bstr parameter is NULL then zero is returned.

The returned value may be different from strlen(bstr) if the BSTR contains embedded null characters. This function always returns the number of bytes specified in the len parameter of the SysAllocStringByteLen function used to allocate the BSTR.

// Display the status message.

TextOut(
   hdc,
   rcMsg.left + (m_dxFont / 2),
   rcMsg.top + ((rcMsg.bottom - rcMsg.top - m_dyFont) / 2),
   m_bstrMsg, SysStringByteLen(m_bstrMsg));
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.