[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.CppObject

Class CppObject

Namespace
GrapeCity.Documents.DX
Assembly
GcDocs.DX.Windows.dll

Root class for all Cpp interop object.

public class CppObject : DisposeBase, IDisposable
Inheritance
CppObject
Implements
Derived
Inherited Members

Constructors

CppObject()

Initializes a new instance of the CppObject class.

protected CppObject()

CppObject(IntPtr)

Initializes a new instance of the CppObject class.

public CppObject(IntPtr pointer)

Parameters

pointer IntPtr

Pointer to Cpp Object

Properties

NativePointer

Get a pointer to the underlying Cpp Object

public IntPtr NativePointer { get; set; }

Property Value

IntPtr

Tag

Gets or sets a custom user tag object to associate with this instance..

public object Tag { get; set; }

Property Value

object

The tag object.

Methods

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

FromPointer<T>(IntPtr)

Instantiate a ComObject from a native pointer.

public static T FromPointer<T>(IntPtr comObjectPtr) where T : CppObject

Parameters

comObjectPtr IntPtr

The native pointer to a com object.

Returns

T

An instance of T binded to the native pointer

Type Parameters

T

The ComObject class that will be returned

FromTemp(CppObject)

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)

Parameters

temp CppObject

The instance to get the NativePointer.

FromTemp(IntPtr)

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)

Parameters

temp IntPtr

The instance to get the NativePointer.

NativePointerUpdated(IntPtr)

Method called when the NativePointer is updated.

protected virtual void NativePointerUpdated(IntPtr oldNativePointer)

Parameters

oldNativePointer IntPtr

NativePointerUpdating()

Method called when NativePointer is going to be update.

protected virtual void NativePointerUpdating()

ToCallbackPtr<TCallback>(ICallbackable)

Return the unmanaged C++ pointer from a ICallbackable instance.

public static IntPtr ToCallbackPtr<TCallback>(ICallbackable callback) where TCallback : ICallbackable

Parameters

callback ICallbackable

The callback.

Returns

IntPtr

A pointer to the unmanaged C++ object of the callback

Type Parameters

TCallback

The type of the callback.

Operators

explicit operator IntPtr(CppObject)

Performs an explicit conversion from CppObject to IntPtr.

public static explicit operator IntPtr(CppObject cppObject)

Parameters

cppObject CppObject

The CPP object.

Returns

IntPtr

The result of the conversion.