DWORD(@ptrVal) VS DWORD(_CAST, ptrVal)
Posted: Thu Jan 23, 2020 6:45 pm
I had an access violation resulting from using DWORD(ptrVal) because I did not cast the ptrVal to DWORD using _CAST.
While the CLVO group I saw using the address of ptrVal like DWORD(@ptrVal) which also works. So, is it the same as DWORD(_CAST, ptrVal) ?
My quick test below shows the same result. Is one better than the other?
While the CLVO group I saw using the address of ptrVal like DWORD(@ptrVal) which also works. So, is it the same as DWORD(_CAST, ptrVal) ?
My quick test below shows the same result. Is one better than the other?
Code: Select all
function start()
LOCAL y as ptr
y := 0x00000004
? "y: ", y
? "dword(@y)", dword(@y)
? "dword(_cast, y)", dword(_cast, y)
wait
return nil