VirtualProtect Question

Results 1 to 3 of 3
  1. #1
    127.0.0.1 goldenfox is offline
    MemberRank
    Jan 2007 Join Date
    202Posts

    VirtualProtect Question

    Well, I'm new to coding C++ and I'm currently learning by reading and studying other coders work specifically for the gameserver 0.96.40 (97D). I would like to ask the coders here regarding VirtualProtect function.

    Please see the following codes

    HotIc3 PKClear code
    Code:
        
    if (VirtualProtect(LPVOID(0x00400000), 1085439, PAGE_EXECUTE_READWRITE, &OldProtect))
        {
    WoLf /POST code
    Code:
        lpAddress1  = (LPVOID) (0x0001000+0x400000) ; //fix96
        lpAddress2  = (LPVOID) (0x6F11000+0x400000) ; //fix96
    
                VirtualProtect ( lpAddress1, 0x108000+0x9000, PAGE_EXECUTE_READ, &dwOld1 );
                VirtualProtect ( lpAddress2, 0x2000, PAGE_EXECUTE_READ, &dwOld2 );
    Another 0.96.40 code floating around the net
    Code:
    if(VirtualProtect(LPVOID(0x401000),3543191,PAGE_EXECUTE_READWRITE,&OldProtect))
        {

    Based on the sample code above, I would like to know where do I get the lpAddress and dwSize values using my version of gameserver.exe?

    Thanks a lot.


  2. #2
    Fuck. SheenBR is offline
    ModeratorRank
    Feb 2008 Join Date
    BrazilLocation
    2,434Posts

    Re: VirtualProtect Question

    VirtualProtect Function (Windows)


    Changes the protection on a region of committed pages in the virtual address space of the calling process.

    To change the access protection of any process, use the VirtualProtectEx function.

  3. #3
    Kingdom of Shadows [RCZ]ShadowKing is offline
    MemberRank
    Jul 2007 Join Date
    1,644Posts

    Re: VirtualProtect Question

    lpAddress = start offset of the section you want to change
    dwSize = the size in bytes of the section(lpAddress + dwSize = EndOffset)



Advertisement