SetVariableValuePtrMethod
Sets the value of a
Pointer variable
Syntax
SetVariableValuePtr(Value)
Parameters
Value
Pointer that the variable will be set to
Example 1: Playing with pointers
Dim x = uc.DefineVariable("x As Int16 = -1")
Dim MyPointer = uc.DefineVariable("xPtr As Pointer")
MyPointer.SetVariableValuePtr(x.ValueAddr())
Console.WriteLine(uc.EvalStr("ValueAt(Int16u, xPtr)"))
var x = uc.DefineVariable("x As Int16 = -1");
var MyPointer = uc.DefineVariable("xPtr As Pointer");
MyPointer.SetVariableValuePtr(x.ValueAddr());
Console.WriteLine(uc.EvalStr("ValueAt(Int16u, xPtr)"));
MyPointer.SetVariableValuePtr(x.ValueAddr());
WriteLn(uc.EvalStr('ValueAt(Int16u, xPtr)'));
auto x = uc.DefineVariable("x As Int16 = -1");
auto MyPointer = uc.DefineVariable("xPtr As Pointer");
MyPointer.SetVariableValuePtr(x.ValueAddr());
cout << uc.EvalStr("ValueAt(Int16u, xPtr)") << endl;
auto x = uc.DefineVariable("x As Int16 = -1");
auto MyPointer = uc.DefineVariable("xPtr As Pointer");
MyPointer.SetVariableValuePtr(x.ValueAddr());
Console::WriteLine(uc.EvalStr("ValueAt(Int16u, xPtr)"));
DLL import code
<DllImport(uCalcDLL, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.Cdecl, EntryPoint:="SetVariableValuePtr")> _
Private Sub SetVariableValuePtr__(ByVal ItemHandle As IntPtr,ByVal Value As IntPtr)
End Sub
[DllImport(uCalcDLL, CharSet=CharSet.Ansi, CallingConvention=CallingConvention.Cdecl, EntryPoint="SetVariableValuePtr")]
protected static extern void SetVariableValuePtr_(IntPtr ItemHandle, IntPtr Value);
{DLLImport}procedure SetVariableValuePtr__(ItemHandle: System.Pointer;Value: System.Pointer); cdecl; external uCalcDLL name 'SetVariableValuePtr';
typedef void (* __SetVariableValuePtr)(void *ItemHandle, void * Value);
[DllImport(uCalcLib, CharSet=CharSet::Ansi, CallingConvention=CallingConvention::Cdecl, EntryPoint = "SetVariableValuePtr")]
static void SetVariableValuePtr_(void * ItemHandle, void * Value);