Marshal.ChangeWrapperHandleStrength(Object, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Changes the strength of an object's COM Callable Wrapper (CCW) handle.
public:
static void ChangeWrapperHandleStrength(System::Object ^ otp, bool fIsWeak);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static void ChangeWrapperHandleStrength (object otp, bool fIsWeak);
public static void ChangeWrapperHandleStrength (object otp, bool fIsWeak);
[System.Security.SecurityCritical]
public static void ChangeWrapperHandleStrength (object otp, bool fIsWeak);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member ChangeWrapperHandleStrength : obj * bool -> unit
static member ChangeWrapperHandleStrength : obj * bool -> unit
[<System.Security.SecurityCritical>]
static member ChangeWrapperHandleStrength : obj * bool -> unit
Public Shared Sub ChangeWrapperHandleStrength (otp As Object, fIsWeak As Boolean)
Parameters
- otp
- Object
The object whose CCW holds a reference counted handle. The handle is strong if the reference count on the CCW is greater than zero; otherwise, it is weak.
- fIsWeak
- Boolean
true
to change the strength of the handle on the otp
parameter to weak, regardless of its reference count; false
to reset the handle strength on otp
to be reference counted.
- Attributes
Remarks
ChangeWrapperHandleStrength is used for object pooling functionality and should never be called by user code directly.