Marshal.ZeroFreeBSTR(IntPtr) Method

Definition

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

public:
 static void ZeroFreeBSTR(IntPtr s);
[System.Security.SecurityCritical]
public static void ZeroFreeBSTR (IntPtr s);
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.

Security

SecurityCriticalAttribute
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Applies to