Results 1 to 4 of 4
  1. #1
    98MustangGt's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    15
    Reputation
    10
    Thanks
    0

    SetStreamSource hook error

    dunno what im doing wrong,, got dip function to work,, can anyone help? im trying to follow a tutorial on chams w/o d3dstarterkit


    int TheHook(void)
    {
    DWORD hD3D, adr, *vtbl;
    hD3D=0;
    do {
    hD3D = (DWORD)GetModuleHandle("d3d9.dll");
    Sleep(10);
    } while(!hD3D);
    adr = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x 00\x00\x89\x86", "xx????xx????xx");
    if (adr)
    {
    memcpy(&vtbl,(void *)(adr+2),4);
    pReset = (oReset) DetourFunction((PBYTE)vtbl[16] , (PBYTE)Reset ,5);
    pEndScene = (oEndScene) DetourFunction((PBYTE)vtbl[42], (PBYTE)EndScene,5);
    pDIP = (oDIP) DetourFunction((PBYTE)vtbl[82], (PBYTE)myDIP,5);
    //pSetStreamSource = (oSetStreamSource) DetourFunction((PBYTE)vtbl[100], (PBYTE)SetStreamSource,5);
    }
    return 0;
    }

    // the function

    /*
    HRESULT WINAPI SetStreamSource(UINT StreamNumber,IDirect3DVertexBuffer9* pStreamData,UINT OffsetInBytes,UINT Stride)
    {

    if( StreamNumber == 0 ){m_Stride = Stride;}
    return m_pD3Ddev->SetStreamSource(StreamNumber, pStreamData,OffsetInBytes, Stride);
    }
    */

    //globals
    //oSetStreamSource pSetStreamSource;

    // base.h
    /pedef HRESULT (WINAPI* oSetStreamSource)(LPDIRECT3DDEVICE9 pDevice,UINT StreamNumber,IDirect3DVertexBuffer9* pStreamData,UINT OffsetInBytes,UINT Stride);
    Last edited by 98MustangGt; 10-26-2012 at 01:02 PM.

  2. #2
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    839
    Reputation
    44
    Thanks
    400
    My Mood
    Twisted
    Lol this mehod is so old and unneeded ^^
    Why not use pDevice if you have it in DIP?
    What about:
    Code:
    if(pDevice->GetStreamSource(0,&StreamBuffer,&OffsetInBytes,&m_Stride) == D3D_OK)
    	StreamBuffer->Release();

    Progress with my game - "Disbanded"
    • Fixed FPS lag on spawning entities due to the ent_preload buffer!
    • Edit the AI code to get some better pathfinding
    • Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
    • Added a new silencer for ALL weapons. Also fixed the rotation bugs
    • Added a ton of new weapons and the choice to choose a silencer for every weapon
    • Created a simple AntiCheat, noobs will cry like hell xD
    • The name will be Disbanded, the alpha starts on the 18th august 2014



    Some new physics fun (Serversided, works on every client)



    My new AI
    http://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    http://www.youtube.com/watch?v=Na2kUdu4d_k

  3. The Following User Says Thank You to Ch40zz-C0d3r For This Useful Post:

    [MPGH]Flengo (10-26-2012)

  4. #3
    98MustangGt's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    15
    Reputation
    10
    Thanks
    0
    ill try that and thx 4 the quick reply, gotta go for a few hours ill let u know later how it works 4 me

  5. #4
    98MustangGt's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    15
    Reputation
    10
    Thanks
    0
    Sry for dp, last was yesterday,,, im getting another problem now, i followed a tutorial fo chams, the tut was on a different game then i was working on,... so now,, my game screen is alll black, my menu is over it but text isnt drawn on menu anymore... lol i been trying to make these chams for to long, i got all models i wanted with d3dlogger

Similar Threads

  1. Zeas's BFP4f Hook V2 Error Help!!!
    By ofludur in forum Battlefield Play4Free Hacks
    Replies: 2
    Last Post: 08-05-2012, 04:26 PM
  2. Hellbreath Int Error?
    By RebornAce in forum General
    Replies: 10
    Last Post: 03-06-2009, 10:04 PM
  3. Connection error
    By DrKaOs in forum WarRock - International Hacks
    Replies: 6
    Last Post: 02-05-2006, 09:37 PM
  4. K Warrock error :(
    By i eat trees in forum WarRock - International Hacks
    Replies: 2
    Last Post: 01-26-2006, 09:40 PM