This allows you to define a data type that functions at the same level as the intrinsic types that come with uCalc.
<DllImport(uCalcDLL, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.Cdecl, EntryPoint:="DefineDataType")> _
Private Function DefineDataType__(ByVal uCalcHandle As IntPtr,ByVal TypeSize As Int32 , ByVal AllocArrayValue As IntPtr , ByVal AllocScalar As IntPtr , ByVal AllocScalarByPtr As IntPtr , ByVal DeleteArray As IntPtr , ByVal DeleteScalar As IntPtr , ByVal ResetScalar As IntPtr , ByVal ResetArray As IntPtr , ByVal SetValueArray As IntPtr , ByVal SetValueScalar As IntPtr , ByVal SwapValues As IntPtr , ByVal ToString As IntPtr) As IntPtr
End Function
[DllImport(uCalcDLL, CharSet=CharSet.Ansi, CallingConvention=CallingConvention.Cdecl, EntryPoint="DefineDataType")]
protected static extern IntPtr DefineDataType_(IntPtr uCalcHandle, Int32 TypeSize , IntPtr AllocArrayValue , IntPtr AllocScalar , IntPtr AllocScalarByPtr , IntPtr DeleteArray , IntPtr DeleteScalar , IntPtr ResetScalar , IntPtr ResetArray , IntPtr SetValueArray , IntPtr SetValueScalar , IntPtr SwapValues , IntPtr ToString );
{DLLImport}function DefineDataType__(uCalcHandle: System.Pointer;TypeSize: Int32 ; AllocArrayValue: System.Pointer ; AllocScalar: System.Pointer ; AllocScalarByPtr: System.Pointer ; DeleteArray: System.Pointer ; DeleteScalar: System.Pointer ; ResetScalar: System.Pointer ; ResetArray: System.Pointer ; SetValueArray: System.Pointer ; SetValueScalar: System.Pointer ; SwapValues: System.Pointer ; ToString: System.Pointer): System.Pointer; cdecl; external uCalcDLL name 'DefineDataType';
typedef uCalcPtr (* __DefineDataType)(void *uCalcHandle, int32_t TypeSize , void * AllocArrayValue , void * AllocScalar , void * AllocScalarByPtr , void * DeleteArray , void * DeleteScalar , void * ResetScalar , void * ResetArray , void * SetValueArray , void * SetValueScalar , void * SwapValues , void * ToString);
[DllImport(uCalcLib, CharSet=CharSet::Ansi, CallingConvention=CallingConvention::Cdecl, EntryPoint = "DefineDataType")]
static uCalcPtr DefineDataType_(void * uCalcHandle, Int32 TypeSize , void * AllocArrayValue , void * AllocScalar , void * AllocScalarByPtr , void * DeleteArray , void * DeleteScalar , void * ResetScalar , void * ResetArray , void * SetValueArray , void * SetValueScalar , void * SwapValues , void * ToString);