Udostępnij za pośrednictwem


SafeIUnknown Class

Definition

Resource management class intended to release native interfaces, such as those returned from Marshal.GetIUnknownForObject or Marshal.GetIDispatchForObject.

public ref class SafeIUnknown : System::Runtime::InteropServices::SafeHandle
[System.Diagnostics.DebuggerDisplay("{Value}")]
public class SafeIUnknown : System.Runtime.InteropServices.SafeHandle
[<System.Diagnostics.DebuggerDisplay("{Value}")>]
type SafeIUnknown = class
    inherit SafeHandle
Public Class SafeIUnknown
Inherits SafeHandle
Inheritance
SafeIUnknown
Attributes

Constructors

SafeIUnknown()

Microsoft internal use only.

SafeIUnknown(IntPtr)

Microsoft internal use only.

SafeIUnknown(SafeIUnknown)

Microsoft internal use only.

Properties

IsInvalid

Microsoft internal use only.

Value

The native interface managed by this class

Methods

FromObject(Object)

Helper method to facilitate the common method for retrieving a native IUnknown: Marshal.GetIUnknownForObject.

ReleaseHandle()

Microsoft internal use only.

ToObject()

Helper method to facilitate retrieving an instance of the type that represents the COM object whose IUnknown this class contains.

ToObject<T>()

Helper method to facilitate retrieving an instance of the type that represents the COM object whose IUnknown this class contains.

Applies to