Results 1 to 8 of 8
  1. #1
    lilneo's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Canada
    Posts
    217
    Reputation
    8
    Thanks
    28

    [Request]What is the D3D Device Pointer

    Can anyone tell me what the D3D Device Pointer is of this D3D Test Environment, I've found a few but they don't work. And I need someone who knows for sure that it's the pointer, so I can verify I was correct.

    Thanks in advance

    Edit: Realized after I posted how scummy this looks, you don't have to run the file... Just want the d3d device pointer.

    ~lilneo

  2. #2
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by lilneo View Post
    Can anyone tell me what the D3D Device Pointer is of this D3D Test Environment, I've found a few but they don't work. And I need someone who knows for sure that it's the pointer, so I can verify I was correct.

    Thanks in advance

    Edit: Realized after I posted how scummy this looks, you don't have to run the file... Just want the d3d device pointer.

    ~lilneo
    Probably will need at least 1 scan

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  3. #3
    lilneo's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Canada
    Posts
    217
    Reputation
    8
    Thanks
    28
    Then scan it T.T, it's just the d3d9 test environment Void posted a while back.
    ~lilneo

  4. #4
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    This works for all DirectX 9 devices - I've posted it before.

    [php]
    bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
    {
    for( ; *szMask; ++szMask, ++pData, ++bMask)
    if(*szMask == 'x' && *pData != *bMask)
    return false;
    return (*szMask) == NULL;
    }


    DWORD FindPattern(DWORD dValor,DWORD dLer,BYTE *bMaskara,char * szMaskara)
    {
    for (DWORD i=0; i < dLer; i++)
    if (bCompare((PBYTE)(dValor + i), bMaskara, szMaskara))
    return (DWORD)(dValor + i);
    return false;
    }

    DWORD dwDXDevice = FindPattern((DWORD)GetModuleHandle("d3d9.dll"), 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x 00\x00\x89\x86", "xx????xx????xx");

    [/php]
    The virtual table functions can be found by adding 2 to the device pointer (ie, (dwDXDevice + 2))

    Not sure who made the bCompare and FindPattern functions, but credits to them.

    --

    How are you trying to hook it - that may be your problem.

  5. #5
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Its on the environment itself. The address is right there where u run the environment. You don't even need to search for it if you don't want to.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  6. #6
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    The way I do it is set a breakpoint on IDirect3D::CreateDevice and check the stack window in olly for the device, since one of the parameters is the device itself.

  7. #7
    lilneo's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Canada
    Posts
    217
    Reputation
    8
    Thanks
    28
    Quote Originally Posted by freedompeace View Post
    This works for all DirectX 9 devices - I've posted it before.

    [php]
    bool bCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
    {
    for( ; *szMask; ++szMask, ++pData, ++bMask)
    if(*szMask == 'x' && *pData != *bMask)
    return false;
    return (*szMask) == NULL;
    }


    DWORD FindPattern(DWORD dValor,DWORD dLer,BYTE *bMaskara,char * szMaskara)
    {
    for (DWORD i=0; i < dLer; i++)
    if (bCompare((PBYTE)(dValor + i), bMaskara, szMaskara))
    return (DWORD)(dValor + i);
    return false;
    }

    DWORD dwDXDevice = FindPattern((DWORD)GetModuleHandle("d3d9.dll"), 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x 00\x00\x89\x86", "xx????xx????xx");

    [/php]
    The virtual table functions can be found by adding 2 to the device pointer (ie, (dwDXDevice + 2))

    Not sure who made the bCompare and FindPattern functions, but credits to them.

    --

    How are you trying to hook it - that may be your problem.
    I am using Void's hooking code, https://www.mpgh.net/forum/31-c-c/125...3ddevice9.html

    Quote Originally Posted by why06 View Post
    Its on the environment itself. The address is right there where u run the environment. You don't even need to search for it if you don't want to.
    It said Device... I didn't think it meant the pointer?


    Quote Originally Posted by Void View Post
    The way I do it is set a breakpoint on IDirect3D::CreateDevice and check the stack window in olly for the device, since one of the parameters is the device itself.
    But how do you find IDirect3D::CreateDevice? Or are you using the command line? Like
    Code:
    bp IDrect3D::CreateDevice
    Okay, so I tried the hook with the "d3ddev" given inside the app, and it just crashes too.
    ~lilneo

  8. #8
    lilneo's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Canada
    Posts
    217
    Reputation
    8
    Thanks
    28
    Okay so the pointer was posted with the initial post of this environment, failme. It was also the pointer in Void's hooking code. The pointer is 0x40CE08, is anyone able to tell me how I could get to this pointer?

    Also, when I use the code Void posted, to hook the test environment. It says Hooked, then crashes.

    ~lilneo

Similar Threads

  1. [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
  2. 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
  3. [CoD:MW2] Getting the D3D Device pointer
    By Hell_Demon in forum Reverse Engineering
    Replies: 0
    Last Post: 05-18-2010, 04:56 AM
  4. [Olly]Getting the D3D9 device pointer in MW2
    By Hell_Demon in forum C++/C Programming
    Replies: 6
    Last Post: 04-23-2010, 04:19 PM
  5. request what means the hack??
    By vyt13 in forum Combat Arms Europe Hacks
    Replies: 3
    Last Post: 02-20-2009, 03:10 PM