Results 1 to 1 of 1
  1. #1
    Dwar
    Dwar is offline
    Veteran Dwar's Avatar
    Join Date
    2010 Mar
    Posts
    2,221
    Thanks
    211
    Thanked 2,224 Times in 289 Posts
    Rep Power
    10

    [Snippet] Calculating DMA

    DWORD GHL::GetPointer(LPVOID lpAddress, const DWORD *dwOffsetArray, const unsigned int uiArraySize)
    {
    DWORD dwOldProtect, dwTemp;
    for (unsigned int i = 0; i<uiArraySize; i++)
    {
    VirtualProtect(lpAddress, uiArraySize, PAGE_EXECUTE_READWRITE, &dwOldProtect);

    __try
    {
    dwTemp = *(DWORD*)(lpAddress);
    }
    __except (EXCEPTION_EXECUTE_HANDLER)
    {
    dwTemp = NULL;
    lpAddress = NULL;
    return 0;
    }

    VirtualProtect(lpAddress, uiArraySize, dwOldProtect, &dwOldProtect);
    lpAddress = (LPVOID)(dwTemp + dwOffsetArray[i]);
    }
    return (DWORD)lpAddress;
    }

    Author: PoZHx
    Please, post your questions on forum, not by PM or mail

    I spend my time, so please pay a little bit of your time to keep world in equilibrium

Visitors found this page by searching for:

c# DMA

dma c#c dmaC# calculating DMAdma with c#calculating dmadma c c dma trainer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •