--- title: "_bstr_t::length | Microsoft Docs" ms.custom: "" ms.date: "11/04/2016" ms.reviewer: "" ms.suite: "" ms.technology: - "cpp-language" ms.tgt_pltfrm: "" ms.topic: "language-reference" f1_keywords: - "_bstr_t::length" dev_langs: - "C++" helpviewer_keywords: - "length method" - "BSTR object, length" ms.assetid: 4f2e2c76-8894-4ef9-833f-4c6e796d0654 caps.latest.revision: 8 author: "mikeblome" ms.author: "mblome" manager: "ghogen" translation.priority.ht: - "cs-cz" - "de-de" - "es-es" - "fr-fr" - "it-it" - "ja-jp" - "ko-kr" - "pl-pl" - "pt-br" - "ru-ru" - "tr-tr" - "zh-cn" - "zh-tw" --- # _bstr_t::length **Microsoft Specific** Returns the number of characters in the `_bstr_t`, not including the terminating null, of the encapsulated `BSTR`. ## Syntax ``` unsigned int length ( ) const throw( ); ``` ## Remarks **END Microsoft Specific** ## See Also [_bstr_t Class](../cpp/bstr-t-class.md)