Table of Contents

Method AddRefAndGetNativeContext

Namespace
Ubiquity.NET.InteropHelpers
Assembly
Ubiquity.NET.InteropHelpers.dll

AddRefAndGetNativeContext()

Adds a ref count to this handle AND converts the allocated GCHandle for use in native code

public nint AddRefAndGetNativeContext()

Returns

nint

context value for us in native code to refer to the GCHandle held by this instance

Remarks

A native call back that receives the returned context can reconstitute the GCHandle via FromIntPtr(nint) and from that it can get the original instance the handle refers to via Target