Please Translate C++ To Delphi

Hi All Professional Programer

Please Translate C++ To Delphi

Thank You Very Much

[code]int Generate_Reloction_Map(BYTE* Reloc_Seg, DWORD Func_RVA, int Func_Size, DWORD* Reloc_Map)
{
BYTE* Reloc_Ptr = Reloc_Seg;
int _rel_Cnt = 0;
while (*(DWORD*)Reloc_Ptr)
{
DWORD Reloc_RVA = ((DWORD*)Reloc_Ptr)[0];
DWORD Block_Size = ((DWORD*)Reloc_Ptr)[1];
for (int i = 0; i < (Block_Size - 8) / 2; i++)
{

if ((Reloc_RVA + (((WORD*)(Reloc_Ptr + 8))[i] & 0xFFF) >= Func_RVA) &&
(Reloc_RVA + (((WORD*)(Reloc_Ptr + 8))[i] & 0xFFF) < Func_RVA + Func_Size))
{
if (Reloc_Map)
Reloc_Map[_rel_Cnt] = Reloc_RVA + (((WORD*)(Reloc_Ptr + 8))[i] & 0xFFF);
_rel_Cnt++;
}
}
Reloc_Ptr += Block_Size;
}
return _rel_Cnt;
}[/code]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories