Results 1 to 11 of 11
  1. #1
    DevilGhost's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    66
    Reputation
    10
    Thanks
    0
    My Mood
    Dead

    Question D3D + D3D Hooking the fact is i need some HELP

    Hey,so i have been trying to make D3D hack for like 1 week i searched and searched and searched i found topblast menu
    and hans menu and i learned alot i gathered some bases so see an example working for D3D and it had quite errors the most New ones but i fixed some and had some Left that I couldnt fix...
    PS: Full credits goes to jored..
    The one who says learn C++ or D3D is only saying that 2 himself
    the one who say leecher is wrong cuz i have given Full Credits To Jored
    Can Some One tell me How to Hook D3D..I havent asked for An undetected Hook..i have only asked HOW

    So i got this Code:
    dllmain.cpp
    Code:
    #include "stdafx.h"
    #include <stdio.h>
    #include <d3dx9.h>
    #include <Windows.h>
    #include <d3d9.h>
    #pragma comment (lib, "d3d9.lib")
    	
    		HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32)
    {
    	if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex, NULL)) )
    		return E_FAIL;
    	
    	WORD colour16 =	((WORD)((colour32>>28)&0xF)<<12)
    			|(WORD)(((colour32>>20)&0xF)<<8)
    			|(WORD)(((colour32>>12)&0xF)<<4)
    			|(WORD)(((colour32>>4)&0xF)<<0);
    
    	D3DLOCKED_RECT d3dlr;    
    	(*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
    	WORD *pDst16 = (WORD*)d3dlr.pBits;
    
    	for(int xy=0; xy < 8*8; xy++)
    		*pDst16++ = colour16;
    
    	(*ppD3Dtex)->UnlockRect(0);
    
    	return S_OK;
    
    }
    		HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseIndex, 
    UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
    {
    
    LPDIRECT3DVERTEXBUFFER9 Stream_Data;
    UINT Offset,iStride;
    
    if(pDevice->GetStreamSource(0, &Stream_Data, &Offset, &iStride) == D3D_OK)
    Stream_Data->Release();
    
    DWORD WINAPI thread( LPVOID param )
    {
    	while(True)
    	{
    		LPDIRECT3DTEXTURE9 Red,Yellow,Green,Blue,Purple,Pink,Orange,White,Black;
    
    GenerateTexture(pDevice, &Red, D3DCOLOR_ARGB (255,255,0 ,0 ));
    GenerateTexture(pDevice, &Yellow, D3DCOLOR_ARGB (255,255,255,0 ));
    GenerateTexture(pDevice, &Green, D3DCOLOR_ARGB (255,0 ,255,0 ));
    GenerateTexture(pDevice, &Blue, D3DCOLOR_ARGB (255,0 ,0 ,255));
    GenerateTexture(pDevice, &Purple, D3DCOLOR_ARGB (255,102,0 ,153));
    GenerateTexture(pDevice, &Pink, D3DCOLOR_ARGB (255,255,20 ,147));
    GenerateTexture(pDevice, &Orange, D3DCOLOR_ARGB (255,255,165,0 ));
    GenerateTexture(pDevice, &Black, D3DCOLOR_ARGB (255,0 ,0 ,0 ));
    GenerateTexture(pDevice, &White, D3DCOLOR_ARGB (255,255,255,255));
    if (chams) 
    {
    if (iStride == 40)
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    pDevice->SetTexture(0, Red);
    pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    pDevice->SetTexture(0, Blue );
    }
    	
    if (iStride == 32)
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    pDevice->SetTexture(0, Red);
    pDrawIndexedPrimitive(pDevice, Type, BaseIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    pDevice->SetTexture(0, Blue );
    
    {
    
    if(naked)
    {
    if(iStride==44) 
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    }
    if(iStride==40) 
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    }
    if(iStride==32) 
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    }
    if (swire)
    {
    if (iStride==44) 
    {
    pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
    }
    if (iStride==40) 
    {
    pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
    }
    if (iStride==32) 
    {
    pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
    }
    }
    }
    {
    if (fullwire)
    {
    if (iStride==44) 
    {
    pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
    }
    if (iStride==40) 
    {
    pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
    }
    if (iStride==32) 
    {
    pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
    }
    if (iStride==28) 
    {
    pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
    }
    if (iStride==16) 
    {
    pDevice->SetRenderState( D3DRS_FILLMODE, D3DFILL_WIREFRAME );  
    }
    if(fbright)
    {
    if(iStride==44)
    {
    pDevice->SetRenderState(D3DRS_LIGHTING, false);
    pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255));
    }
    if(iStride==40)
    {
    pDevice->SetRenderState(D3DRS_LIGHTING, false); 
    pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255)); 
    }
    if(iStride==32)
    {
    pDevice->SetRenderState(D3DRS_LIGHTING, false); 
    pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255)); 
    }
    }
    
    if(asus)
    
    if(iStride==28)
    {
    pDevice->SetRenderState( D3DRS_SRCBLEND, 3 );
    pDevice->SetRenderState( D3DRS_DESTBLEND, 4 );
    pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, true );
    }
    if(iStride==44)
    {
    pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, true );
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    }
    if(iStride==40)
    {
    pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, true );
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    }
    
    
    if(xray)
    {
    if(iStride==28)     
    {
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);   
    }
    }
    
    if(nofog) 
    { 
    pDevice->SetRenderState(D3DRS_FOGENABLE, false); 
    }
    Sleep(50);
    }
    }
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    DisableThreadLibraryCalls(hDll);
    
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
    
    MessageBoxA(0, "Credits- STILL TRYING GUYS>>","Hope CF SECTION HELPS!!", 0);
    
    
    CreateThread(0,0,(LPTHREAD_START_ROUTINE)Wait,0,0, 0);
    }
    return 1;
    }
    PS AGAIN i will state the errors...i dont want some one to fix it and give it to me i only want some 1 to explain to me i want to learn!!!!

    1>------ Build started: Project: D1Dd, Configuration: Debug Win32 ------
    1> dllmain.cpp
    1>c:\users\mpc\documents\visual studio 2010\projects\d1dd\d1dd\dllmain.cpp(41): error C2601: 'thread' : local function definitions are illegal
    1> c:\users\mpc\documents\visual studio 2010\projects\d1dd\d1dd\dllmain.cpp(32): this line contains a '{' which has not yet been matched
    1>c:\users\mpc\documents\visual studio 2010\projects\d1dd\d1dd\dllmain.cpp(210): fatal error C1075: end of file found before the left brace '{' at 'c:\users\mpc\documents\visual studio 2010\projects\d1dd\d1dd\dllmain.cpp(78)' was matched
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    would be greatful if some 1 helped and stopped saying Rude Words that means he is Rude..and should post here
    BE NICE OR DONT POST

    Hoping for some KIND memebers to help
    Last edited by DevilGhost; 12-10-2011 at 01:49 AM.

  2. #2
    [I]Tfrix's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    In My Room
    Posts
    213
    Reputation
    10
    Thanks
    100
    My Mood
    Fine
    Add

    #include <d3dx9.h>

    and your organization is wrong.. i mean { <- this things arnt good xD i thing you got it

  3. #3
    DevilGhost's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    66
    Reputation
    10
    Thanks
    0
    My Mood
    Dead
    Quote Originally Posted by [I]Tfrix View Post
    Add

    #include <d3dx9.h>

    and your organization is wrong.. i mean { <- this things arnt good xD i thing you got it
    Edited / msg 2 short

  4. #4
    [I]Tfrix's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    In My Room
    Posts
    213
    Reputation
    10
    Thanks
    100
    My Mood
    Fine
    i dont got any idea :P

  5. #5
    joered's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Netherlands
    Posts
    345
    Reputation
    17
    Thanks
    332
    its joered not jored

    do some research about vtable hooking there are enough tutorials here. Also do some research about midfunction hooking by Shad0w_


    “Imagination, devotion, perseverance, together with divine grace, will assure your success.”

    ―Haile Selassie





    Work from back in the days:

    Soldierfront Public d3d - Detected since 2011

    Crossfire VIP:

  6. #6
    giniyat101's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    Not telling.
    Posts
    1,935
    Reputation
    130
    Thanks
    1,380
    My Mood
    Dead
    why u made a thread?
    you can make those hacks in DIP hook...


     



    [img]https://i43.photobucke*****m/albums/e367/DeteSting/Steam-update.gif[/img]

  7. #7
    xceman's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    35
    Reputation
    10
    Thanks
    2
    My Mood
    Doh
    The errors tell you the problem

    Ya there are many errors as i see....

    if (iStride == 32)

    Check this code.It has double {,{
    You don't close function :S
    So it will be
    if (iStride == 32)
    {
    //function
    }

    Else it won't work

    Just work like this!Cause i see more than them
    And the code which you saying,is your main or a part of code?
    Last edited by xceman; 12-10-2011 at 03:41 AM.

  8. #8
    DevilGhost's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    66
    Reputation
    10
    Thanks
    0
    My Mood
    Dead
    Quote Originally Posted by joered View Post
    its joered not jored

    do some research about vtable hooking there are enough tutorials here. Also do some research about midfunction hooking by Shad0w_
    Aww.. hey joered didnt know u online these days.. any way what is vtable hooking

  9. #9
    DevilGhost's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    66
    Reputation
    10
    Thanks
    0
    My Mood
    Dead
    Quote Originally Posted by giniyat101 View Post
    why u made a thread?
    you can make those hacks in DIP hook...
    I already put the DIP functions

  10. #10
    DevilGhost's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    66
    Reputation
    10
    Thanks
    0
    My Mood
    Dead
    Quote Originally Posted by joered View Post
    its joered not jored

    do some research about vtable hooking there are enough tutorials here. Also do some research about midfunction hooking by Shad0w_
    and i wanted to know is this detected??

  11. #11
    joered's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Netherlands
    Posts
    345
    Reputation
    17
    Thanks
    332
    mhmm as i see your not experienced enough for hooking and d3d stuff if u want to learn coding and dont want to read books go start with the memory hacks first. And vtable hooking isnt patched


    “Imagination, devotion, perseverance, together with divine grace, will assure your success.”

    ―Haile Selassie





    Work from back in the days:

    Soldierfront Public d3d - Detected since 2011

    Crossfire VIP:

Similar Threads

  1. need some help with D3D
    By matthy in forum WarRock Hack Source Code
    Replies: 4
    Last Post: 08-20-2011, 12:29 PM
  2. Kinda need some help( i think its the graphic card)
    By PX[Asia] in forum Alliance of Valiant Arms (AVA) Hacks & Cheats
    Replies: 15
    Last Post: 06-06-2010, 04:48 AM
  3. [Help] the dogs bollocks (my frst mod need some help)
    By GUNZnKNIVES in forum CrossFire Mods & Rez Modding
    Replies: 6
    Last Post: 05-17-2010, 07:10 PM
  4. I Need some help with the hacks..
    By xcv123 in forum Combat Arms Help
    Replies: 7
    Last Post: 09-05-2009, 10:04 AM
  5. Need some help gettin the Korean Language pack
    By Kingleo33 in forum WarRock Korea Hacks
    Replies: 7
    Last Post: 05-21-2008, 05:14 PM