private static void* __CopyValue(HostOS.Internal native) { var ret = Marshal.AllocHGlobal(0); *(HostOS.Internal*) ret = native; return ret.ToPointer(); }
private HostOS(HostOS.Internal native, bool skipVTables = false) : this(__CopyValue(native), skipVTables) { __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; }
public static HostOS __CreateInstance(HostOS.Internal native, bool skipVTables = false) { return new HostOS(native, skipVTables); }