FunctionAddressMethod
Returns the callback address of a defined function (or operator)
Example 1: Defining another Abs function using the same callback address of existing one
uc.Define("Function: MyAbs(x)", uc.GetItemOf("Abs").FunctionAddress())
Console.WriteLine(uc.Eval("MyAbs(-123)"))
uc.Define("Function: MyAbs(x)", uc.GetItemOf("Abs").FunctionAddress());
Console.WriteLine(uc.Eval("MyAbs(-123)"));
uc.Define('Function: MyAbs(x)', (void *)uc.GetItemOf('Abs').FunctionAddress());
WriteLn(uc.Eval('MyAbs(-123)'));
uc.Define("Function: MyAbs(x)", (void *)uc.GetItemOf("Abs").FunctionAddress());
cout << uc.Eval("MyAbs(-123)") << endl;
uc.Define("Function: MyAbs(x)", (void *)uc.GetItemOf("Abs").FunctionAddress());
Console::WriteLine(uc.Eval("MyAbs(-123)"));
DLL import code
<DllImport(uCalcDLL, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.Cdecl, EntryPoint:="FunctionAddress")> _
Private Function FunctionAddress__(ByVal ItemHandle As IntPtr) As IntPtr
End Function
[DllImport(uCalcDLL, CharSet=CharSet.Ansi, CallingConvention=CallingConvention.Cdecl, EntryPoint="FunctionAddress")]
protected static extern IntPtr FunctionAddress_(IntPtr ItemHandle);
{DLLImport}function FunctionAddress__(ItemHandle: System.Pointer): System.Pointer; cdecl; external uCalcDLL name 'FunctionAddress';
typedef uCalcCallback (* __FunctionAddress)(void *ItemHandle);
[DllImport(uCalcLib, CharSet=CharSet::Ansi, CallingConvention=CallingConvention::Cdecl, EntryPoint = "FunctionAddress")]
static uCalcCallback FunctionAddress_(void * ItemHandle);