Hooking d3d8 device

10/30/2010 20:15 sweetlady#1
Hello ppl, I don't know if anyone can help me out but I'm working on a bot and wanted to display my menu ingame using a d3d8 device hook. Thing is, all functions are hooking fine except reset. Was just wondering if anyone had an idea why. Because without reset you can't really draw anything. Here's my log file.

Code:
Adress of Reset: 0x298FF84
Adress of Present: 0x298FF7C
Adress of BeginScene: 0x298FF88
Adress of EndScene: 0x298FF80
Adress of DrawindexedPrimitive: 0x298FF74
Adress of SetStreamSource: 0x298FF78
BeginScene Hooked
EndScene Hooked
SetStreamSource Hooked
Present Hooked
DrawIndexedPrimitive Hooked
11/05/2010 06:03 sweetlady#2
Well, I'm not all that good at reversing but found this in d3d8.h module while searching for "reset":
Code:
6E7F8422       68 00007A6E     PUSH d3d8.6E7A0000 ; ASCII "Reset can only be called from the thread that the device was created from."
So I guess I have to find where the device is created in elementclient.exe to hook reset? Or Detour the whole device from there? :awesome:
11/24/2010 01:32 sweetlady#3
This thread can be removed as I've solved my problem.
11/24/2010 08:29 Interest07#4
Sadly I know nothing about anything graphical :o Glad to see you have helped yourself already though :)

Feel free to share any pertinent information with others :D
11/26/2010 04:40 sweetlady#5
Well, Interest, I've just taken Azorbix's d3d8 base on GD. Then in endscene or present you can draw anything you want. I've used the LPD3DXFONT to draw my text and I used SoBeit's menu from uc-forum.com.
11/26/2010 08:03 Interest07#6
Ahhh thanks, I might have a look into that :)