Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ----------------------------------------------------------------------------
- // <auto-generated>
- // This is autogenerated code by CppSharp.
- // Do not edit this file or all your changes will be lost after re-generation.
- // </auto-generated>
- // ----------------------------------------------------------------------------
- using System;
- using System.Runtime.InteropServices;
- using System.Security;
- public enum TestState
- {
- TestStateA = 0,
- TestStateB = 1,
- TestStateC = 2
- }
- public unsafe partial class TestStateCreateInfo : IDisposable
- {
- [StructLayout(LayoutKind.Explicit, Size = 16)]
- public partial struct __Internal
- {
- [FieldOffset(0)]
- internal int testStateCount;
- [FieldOffset(8)]
- internal global::System.IntPtr pTestStates;
- [SuppressUnmanagedCodeSecurity]
- [DllImport("Test", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
- EntryPoint="??0TestStateCreateInfo@@QEAA@AEBU0@@Z")]
- internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
- }
- public global::System.IntPtr __Instance { get; protected set; }
- protected int __PointerAdjustment;
- internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::TestStateCreateInfo> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::TestStateCreateInfo>();
- protected void*[] __OriginalVTables;
- protected bool __ownsNativeInstance;
- internal static global::TestStateCreateInfo __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
- {
- return new global::TestStateCreateInfo(native.ToPointer(), skipVTables);
- }
- internal static global::TestStateCreateInfo __CreateInstance(global::TestStateCreateInfo.__Internal native, bool skipVTables = false)
- {
- return new global::TestStateCreateInfo(native, skipVTables);
- }
- private static void* __CopyValue(global::TestStateCreateInfo.__Internal native)
- {
- var ret = Marshal.AllocHGlobal(sizeof(global::TestStateCreateInfo.__Internal));
- *(global::TestStateCreateInfo.__Internal*) ret = native;
- return ret.ToPointer();
- }
- private TestStateCreateInfo(global::TestStateCreateInfo.__Internal native, bool skipVTables = false)
- : this(__CopyValue(native), skipVTables)
- {
- __ownsNativeInstance = true;
- NativeToManagedMap[__Instance] = this;
- }
- protected TestStateCreateInfo(void* native, bool skipVTables = false)
- {
- if (native == null)
- return;
- __Instance = new global::System.IntPtr(native);
- }
- public TestStateCreateInfo()
- {
- __Instance = Marshal.AllocHGlobal(sizeof(global::TestStateCreateInfo.__Internal));
- __ownsNativeInstance = true;
- NativeToManagedMap[__Instance] = this;
- }
- public TestStateCreateInfo(global::TestStateCreateInfo _0)
- {
- __Instance = Marshal.AllocHGlobal(sizeof(global::TestStateCreateInfo.__Internal));
- __ownsNativeInstance = true;
- NativeToManagedMap[__Instance] = this;
- *((global::TestStateCreateInfo.__Internal*) __Instance) = *((global::TestStateCreateInfo.__Internal*) _0.__Instance);
- }
- public void Dispose()
- {
- Dispose(disposing: true);
- }
- public virtual void Dispose(bool disposing)
- {
- if (__Instance == IntPtr.Zero)
- return;
- global::TestStateCreateInfo __dummy;
- NativeToManagedMap.TryRemove(__Instance, out __dummy);
- if (__ownsNativeInstance)
- Marshal.FreeHGlobal(__Instance);
- __Instance = IntPtr.Zero;
- }
- public int TestStateCount
- {
- get
- {
- return ((global::TestStateCreateInfo.__Internal*) __Instance)->testStateCount;
- }
- set
- {
- ((global::TestStateCreateInfo.__Internal*)__Instance)->testStateCount = value;
- }
- }
- public global::TestState* PTestStates
- {
- get
- {
- return ((global::TestStateCreateInfo.__Internal*) __Instance)->pTestStates;
- }
- set
- {
- ((global::TestStateCreateInfo.__Internal*)__Instance)->pTestStates = value;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement