Table of Contents

Struct ComBstrMarshaller.ManagedToUnmanagedRef

Namespace
CsCom.Runtime
Assembly
CsCom.Runtime.dll

Passes a string by reference to a COM method, which can replace it. A replaced string was freed by the callee, so its wrapper is detached.

public struct ComBstrMarshaller.ManagedToUnmanagedRef
Inherited Members

Methods

Free()

Keeps the string alive until the call returns.

public readonly void Free()

FromManaged(ComBstr?)

Takes the string.

public void FromManaged(ComBstr? managed)

Parameters

managed ComBstr

FromUnmanaged(nint)

Takes the BSTR pointer returned by the callee.

public void FromUnmanaged(nint unmanaged)

Parameters

unmanaged nint

ToManaged()

Gets the original wrapper if the string was not replaced, otherwise a wrapper that owns the new string.

public readonly ComBstr? ToManaged()

Returns

ComBstr

ToUnmanaged()

Gets the BSTR pointer.

public readonly nint ToUnmanaged()

Returns

nint