Прочетете на английски Редактиране

Споделяне чрез


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.

C#
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static void ChangeWrapperHandleStrength(object otp, bool fIsWeak);
C#
public static void ChangeWrapperHandleStrength(object otp, bool fIsWeak);
C#
[System.Security.SecurityCritical]
public static void ChangeWrapperHandleStrength(object otp, bool fIsWeak);

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.

Applies to

Продукт Версии
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1