Windows apps
Collapse the table of content
Expand the table of content

SysStringLen Function

Returns the length of a BSTR.

UINT SysStringLen(
  BSTR  bstr


A BSTR allocated previously.

The number of characters 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 characters specified in the cch parameter of the SysAllocStringLen function used to allocate the BSTR.

// Display the status message.
   rcMsg.left + (m_dxFont / 2), + ((rcMsg.bottom - - m_dyFont) / 2),
   m_bstrMsg, SysStringLen(m_bstrMsg));
© 2017 Microsoft