[]
Root class for all Cpp interop object.
public class CppObject : DisposeBase, IDisposable
Initializes a new instance of the CppObject class.
protected CppObject()
Initializes a new instance of the CppObject class.
public CppObject(IntPtr pointer)
pointer System.IntPtrPointer to Cpp Object
Get a pointer to the underlying Cpp Object
public IntPtr NativePointer { get; set; }
Gets or sets a custom user tag object to associate with this instance..
public object Tag { get; set; }
The tag object.
Clean up any resources being used.
protected override void Dispose(bool disposing)
disposing boolInstantiate a ComObject from a native pointer.
public static T FromPointer<T>(IntPtr comObjectPtr) where T : CppObject
comObjectPtr System.IntPtrThe native pointer to a com object.
An instance of T binded to the native pointer
TThe ComObject class that will be returned
Initializes this instance with a pointer from a temporary object and set the pointer of the temporary
object to IntPtr.Zero.
protected void FromTemp(CppObject temp)
temp CppObjectThe instance to get the NativePointer.
Initializes this instance with a pointer from a temporary object and set the pointer of the temporary
object to IntPtr.Zero.
protected void FromTemp(IntPtr temp)
temp System.IntPtrThe instance to get the NativePointer.
Method called when the NativePointer is updated.
protected virtual void NativePointerUpdated(IntPtr oldNativePointer)
oldNativePointer System.IntPtrMethod called when NativePointer is going to be update.
protected virtual void NativePointerUpdating()
Return the unmanaged C++ pointer from a ICallbackable instance.
public static IntPtr ToCallbackPtr<TCallback>(ICallbackable callback) where TCallback : ICallbackable
callback ICallbackableThe callback.
A pointer to the unmanaged C++ object of the callback
TCallbackThe type of the callback.
Performs an explicit conversion from CppObject to System.IntPtr.
public static explicit operator IntPtr(CppObject cppObject)
cppObject CppObjectThe CPP object.
The result of the conversion.