I think it depends a lot on the context, because the word itself, just means deslocado
, compensado
, equilibrado
...
Given the context you mentioned, memory addressing, you would consider offset
as the offset of the desired address. So, I think your thinking: "It's a calculation of the distance of the address to where you want to allocate such a variable" is correct.
Offset, as already answered, is where process information is allocated to a position. In written form this is, but for the subject, I prefer to give examples and show images:
To base ourselves better, let's assume that a game has the following architecture:
Let'sassumethefollowingoffsets:
ClientDll=0x12EA567;//Emrelaçãoaopontoinicial,esseseriaomoduloemquevamostrabalharLocalplayer=0x4BCD3F;//EmrelaçãoaoClientDllVida=0x100;//EmrelaçãoaoLocalplayer
Howdoyougetthelifeofthelocalplayer?Simple!Addall:
VidaDoJogador=ClientDll+Localplayer+Vida;
Noticethatwhatwedidistogetinformationthatiscontainedinaprocessfromanaddresswegetfromtheoffsets.
Real-code(C++&WinAPI):
intVidaDoJogador=0;DWORDendereço=ClientDll+Localplayer+Vida;ReadProcessMemory(processo,(void*)endereço,&VidaDoJogador,sizeof(VidaDoJogador),0);
Whereprocesso
is HANDLE
of the process.
Offsets are very dynamic and can change whenever the source code of the process changes. I recommend giving a read in Pattern Scanner, where instead of creating variables for offsets and having to keep changing it always finds them for you, according to the static values close to it.