--- 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 [C++]", "BSTR object [C++], length"] ms.assetid: 4f2e2c76-8894-4ef9-833f-4c6e796d0654 caps.latest.revision: 8 author: "mikeblome" ms.author: "mblome" manager: "ghogen" --- # _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)