SysStringByteLen Function

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

UINT SysStringByteLen(  
  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.

   rcMsg.left + (m_dxFont / 2), + ((rcMsg.bottom - - m_dyFont) / 2),
   m_bstrMsg, SysStringByteLen(m_bstrMsg));