Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Game Development › DirectX/D3D Development › All hooks work, except for Reset (D3D9)

All hooks work, except for Reset (D3D9)

Posts 1–7 of 7 · Page 1 of 1
DI
diesel3009
All hooks work, except for Reset (D3D9)
Hi all,

I did a vTable hook, by changing the functions the vTable points to, to my own. Everything is working fine, all hooks are working (Begin/EndScene, DIP, CreateQuery, ...), except for Reset. I hook Reset the same way I do with the rest. I have no clue why it isn't working!

I searched all day and couldn't find a solution, that's why I'm here now . I found out that this might be Windows 8 related? Cause that's the OS I'm using.

Any help is appreciated. Thanks!
#1 · 13y ago
AT
atom0s
Without seeing code not much anyone can do but guess the issues. So here's a quick guess list:

- Are you sure the vtable offset is correct that you are attempting to hook?
- Are you sure the calling convention on your hook callback is correct?
- Are you sure the application/game isn't undoing the Reset hook?
- Are you sure the hook is properly being placed onto the vtable? (i.e. did you debug and confirm the pointer has changed to your function)

As for 'not working', does this mean its never called? Does it crash?
#2 · 13y ago
DI
diesel3009
Thanks for the quick reply!

The same for the other hooks. The thing is, the other hooks work just fine, except for this one.
I tried putting the replacing original VTable with new VTable part in a loop, but it didn't change a thing. So I don't think the game is undoing it (and since the other hooks keep on working fine...)

Thanks!
#3 · edited 13y ago · 13y ago
AT
atom0s
You aren't overwriting Resets pointer in the vtable anywhere in that code..
#4 · 13y ago
DI
diesel3009
Oh, I'm sorry. I commented out the reset pointer because it wasn't working and forgot to copy it too. The code actually includes this as well:

newVTable[16] = (DWORD)hReset;

I'm not at home right now, but above the mentioned code I also save the original pointers in oFunction, so that's not the problem either.

My reset function never gets called.
Also, pDevice->TestCooperativeLevel() never returns D3DERR_DEVICELOST. Could this be related?

Thanks
#5 · 13y ago
AT
atom0s
If the device has no reason to call reset it wont get called.

TestCooperativeLevel should return D3DERR_DEVICENOTRESET if the device needs to be reset. If it returns D3DERR_DEVICELOST then the device can't be reset yet since the application hasn't regained focus/control of the device.

Outsideof that, D3DERR_DEVICELOST will be returned from Present if it has lost access to the rendering device. This typically happens with fullscreen games being minimized, the screensaver on the machine starts, etc.
#6 · 13y ago
DI
diesel3009
You're probably right. Reset doesn't get called because the game doesn't have to. TestCooperativeLevel() always returns D3D_OK. This leaves me confused though, why the text I'm drawing disappears after a split second after hooking. I thought this was due to the reset hook not working, but apparently it's another reason.

I create my font in BeginScene (if font == NULL).
In EndScene:
Code:
    static DWORD renderState = 0;
    pDevice->GetRenderState( D3DRS_ZFUNC, &renderState );
    pDevice->SetRenderState( D3DRS_ZFUNC, D3DCMP_ALWAYS );

    //Drawing here

    pDevice->SetRenderState( D3DRS_ZFUNC, renderState );
In Reset I release the font and make it NULL so it gets created again. DrawTextA keeps returning 12 (even when you don't see the text anymore), and font never equals NULL, so I don't see the problem.

Maybe the game draws over my font? But the funny thing is, if I create the font in the beginning of EndScene, and release it at the end, then everything is working fine??

Thanks for your help so far!

Edit:
I'm releasing and recreating the font everytime in BeginScene now. Not that efficient but at least it works. Thanks!
#7 · edited 13y ago · 13y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • All Currently Working Hacks For BlackshotBy Dylan in Blackshot Hacks & Cheats
    12Last post 13y ago
  • [BIG HACK PACK]All hack working for now :D.By Gigit in Combat Arms Europe Hacks
    33Last post 17y ago
  • [RELEASE]Working bypass for almost all hacks.By DonMadawg in Combat Arms Discussions
    62Last post 17y ago
  • [RELEASE] ALL SCOPES INTO 1 (except for nx reflex,p90 and aug)By kentonyu in Combat Arms Mods & Rez Modding
    29Last post 16y ago
  • SPAM BOT FOR ALL GAMES (WORKS!!!)By legend4123 in Combat Arms Hacks & Cheats
    12Last post 16y ago

Tags for this Thread

None