System.Runtime.InteropServices.Marshal.ZeroFreeBSTR Method

Frees a BSTR pointer that was allocated using the Marshal.SecureStringToBSTR(System.Security.SecureString) method.

Syntax

public static void ZeroFreeBSTR (IntPtr s)

Parameters

s
The address of the BSTR to free.

Remarks

The Marshal.ZeroFreeBSTR(IntPtr) method first sets the contents of the BSTR to zero, and then frees the BSTR.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0