DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Pascal and Delphi (http://www.daniweb.com/forums/forum124.html)
-   -   Please Translate C++ To Delphi (http://www.daniweb.com/forums/thread194496.html)

Leila1 May 28th, 2009 7:02 pm
Please Translate C++ To Delphi
 
Hi All User

Please Translate C++ To Delphi

Thank You Very Much

<snip>

Salem May 29th, 2009 2:26 am
Re: Please Translate C++ To Delphi
 
What does it do?

ithelp May 29th, 2009 2:48 am
Re: Please Translate C++ To Delphi
 
C++ and delphi are not compatible , better learn the algorithm and code it in delphi afresh.

Leila1 Jun 26th, 2009 6:39 pm
Re: Please Translate C++ To Delphi
 
Hi All User

Please Translate C++ To Delphi

Thank You Very Much

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;
}

Duoas Jul 6th, 2009 1:01 pm
Re: Please Translate C++ To Delphi
 
What are you writing? An OS?

We're not a translation service. You may want to try the Looking to Hire forum.

Salem Jul 6th, 2009 2:22 pm
Re: Please Translate C++ To Delphi
 
It looked more like a malware writing kit to me.


All times are GMT -4. The time now is 6:49 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC