CA_FreeBSTR
void CA_FreeBSTR (BSTR BSTR);
Purpose
Frees BSTRs allocated through the following sources:
- BSTRs allocated with CA_VariantGetBSTR, CA_CStringToBSTR, and CA_VariantConvertToType.
- BSTR array elements of arrays allocated with CA_SafeArrayTo1DArray, CA_SafeArrayTo2DArray, CA_SafeArrayTo1DArrayBuf, CA_SafeArrayTo2DArrayBuf, CA_VariantGet1DArray, CA_VariantGet2DArray, CA_VariantGet1DArrayBuf, and CA_VariantGet2DArrayBuf.
![]() |
Note This function calls the system function SysFreeString to free the BSTR. |
Parameters
Input | ||
Name | Type | Description |
BSTR | BSTR | The BSTR to be freed. If you pass NULL, the function performs no action. |
Return Value
None.
Additional Information
Library: ActiveX Library
Include file: cviauto.h
LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later
Example
Refer to userint\activex\richTextbox.cws for an example of using the CA_FreeBSTR function.