Struct ComSafeArrayMarshaller<T>.ManagedToUnmanagedRef
- Namespace
- CsCom.Runtime
- Assembly
- CsCom.Runtime.dll
Passes an array by reference to a COM method, which can change it in place or replace it. A replaced array was destroyed by the callee, so its wrapper is detached.
public struct ComSafeArrayMarshaller<T>.ManagedToUnmanagedRef
- Inherited Members
Methods
Free()
Keeps the array alive until the call returns.
public readonly void Free()
FromManaged(ComSafeArray<T>?)
Takes the array.
public void FromManaged(ComSafeArray<T>? managed)
Parameters
managedComSafeArray<T>
FromUnmanaged(nint)
Takes the SAFEARRAY pointer returned by the callee.
public void FromUnmanaged(nint unmanaged)
Parameters
unmanagednint
ToManaged()
Gets the original wrapper if the array was not replaced, otherwise a wrapper that owns the new array.
public readonly ComSafeArray<T>? ToManaged()
Returns
- ComSafeArray<T>
ToUnmanaged()
Gets the SAFEARRAY pointer.
public readonly nint ToUnmanaged()