Marshal.ZeroFreeBSTR(IntPtr) Method

Definition

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

public:
 static void ZeroFreeBSTR(IntPtr s);
public static void ZeroFreeBSTR (IntPtr s);
[System.Security.SecurityCritical]
public static void ZeroFreeBSTR (IntPtr s);
static member ZeroFreeBSTR : nativeint -> unit
[<System.Security.SecurityCritical>]
static member ZeroFreeBSTR : nativeint -> unit
Public Shared Sub ZeroFreeBSTR (s As IntPtr)

Parameters

s
IntPtr

The address of the BSTR to free.

Attributes

Remarks

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

Applies to