Results 1 to 15 of 16

Threaded View

  1. #1
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,721
    My Mood
    Doh

    D3D Device Pointer Finder

    One Simple function to find d3d8 to d3d9 device pointer...
    Code:
    DWORD_PTR * FindDevice(VOID)
    {
        DWORD Base = (DWORD)LoadLibraryW(L"d3d8.dll");
    
        for(DWORD i = 0; i < 0x128000; i++ )
        {
          if ( (*(BYTE *)(Base+i+0x00))==0xC7
            && (*(BYTE *)(Base+i+0x01))==0x06
            && (*(BYTE *)(Base+i+0x06))==0x89
            && (*(BYTE *)(Base+i+0x07))==0x86
            && (*(BYTE *)(Base+i+0x0C))==0x89
            && (*(BYTE *)(Base+i+0x0D))==0x86 )
            return (DWORD_PTR *)(Base + i + 2);
        }
        return NULL;
    }
    How To Use:

    Code:
         DWORD_PTR * VtablePtr = FindDevice();
    
         if (VtablePtr = NULL )
         {
             MessageBoxW(L"Device Not Found !",0,0,0);
             ExitProcess(0); //or it will crash anyway
         }
    
          DWORD_PTR * VTable ;
        *(DWORD_PTR *)&VTable = *(DWORD_PTR *)VtablePtr;
    
         //and then
         Vtable[35];//endscene
    Credits: Croner (another forum...but this looked useful so i posted it)
    Last edited by supercarz1991; 11-18-2010 at 12:29 AM.

    commando: You're probably the best non-coder coder I know LOL


  2. The Following User Says Thank You to supercarz1991 For This Useful Post:

    Turbulence (03-22-2011)

Similar Threads

  1. [Help] Finding crossfire D3D device pointer
    By lauwy in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 3
    Last Post: 12-20-2010, 10:22 PM
  2. [Request]What is the D3D Device Pointer
    By lilneo in forum C++/C Programming
    Replies: 7
    Last Post: 10-27-2010, 11:49 PM
  3. [OllyDBG]D3D Device pointer
    By Hell_Demon in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 4
    Last Post: 09-30-2010, 06:46 AM
  4. How to find the D3D device pointer?
    By Mr.Magicman in forum Combat Arms Help
    Replies: 0
    Last Post: 05-24-2010, 09:56 AM
  5. [CoD:MW2] Getting the D3D Device pointer
    By Hell_Demon in forum Reverse Engineering
    Replies: 0
    Last Post: 05-18-2010, 04:56 AM