SafeHandleMarshaller<T>.ManagedToUnmanagedRef Struct
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.
Marshals a SafeHandle as its underlying handle value as a ref
parameter in managed-to-unmanaged scenarios like P/Invokes.
public: where T : SafeHandlevalue class SafeHandleMarshaller<T>::ManagedToUnmanagedRef
public struct SafeHandleMarshaller<T>.ManagedToUnmanagedRef where T : SafeHandle
type SafeHandleMarshaller<'T (requires 'T :> SafeHandle)>.ManagedToUnmanagedRef = struct
Public Structure SafeHandleMarshaller(Of T).ManagedToUnmanagedRef
Type Parameters
- T
- Inheritance
Constructors
SafeHandleMarshaller<T>.ManagedToUnmanagedRef() |
Initializes a new instance of SafeHandleMarshaller<T>.ManagedToUnmanagedRef in a default state. |
Methods
Free() |
Frees any resources and reference counts owned by the marshaller. |
FromManaged(T) |
Initializes the marshaller from a managed handle. |
FromUnmanaged(IntPtr) |
Initializes the marshaller from an unmanaged handle. |
OnInvoked() |
Notifies the marshaller that the native call has been invoked. |
ToManagedFinally() |
Retrieves the managed handle from the marshaller. |
ToUnmanaged() |
Retrieves the unmanaged handle. |