Antonello,
You are probably expecting that
will take the address of @P[1] and treat that like a DWORD PTR and you want to dereference that pointer and get the DWORD value at that location.
However the DWORD( something ) code in VO can mean 2 things:
- derefence a pointer
- convert the value to a DWORD
X# is doing the second in this case and therefore gives you the address as a DWORD. Each time you run the app that address is different.
I would recommend to do something like this instead (untested)
Code: Select all
LOCAL dwptr as DWORD PTR
dwptr := @p[1] // you can probably also do dwptr := @p
System.Console.WriteLine( AsString( dwptr[1]))
Robert