Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Source code] - Window Mode Hook(d3d9)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
peter4d5
Cheater
Reputation: 0

Joined: 21 Dec 2010
Posts: 37

PostPosted: Sat Feb 11, 2012 8:09 pm    Post subject: [Source code] - Window Mode Hook(d3d9) Reply with quote

Hi...

For the one who like d3d hook, i found this link, first, my idea only to modify for d3d8,sorry for url - www=xxx

Quote:
/ / xxx . uc-forum . com/ forum/ showthread .php?t= 57588]



Quote:

//Window Mode Toggler By Sparten (2008)
//Just a small project that will force modt d3d9 game to toggle window mode
//its no big deal as it just emulates what normaly happens when a game lose its device



and after quick scan his stuff, seems that he use timing when d3d lost device (in reset hook) creat new device with new property...
It's cool idea, and make me get idea that why not add more interesting property... eg. change resolution....

This idea need more DirectX Programing Knowledge, may be after hard google and some trial...may be lucky,
but i have many projects to do, waste time if i keep it only myself. So, it's better to share everyone.

peter4d5

_________________
my name is peter4d5
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Sun Feb 12, 2012 1:13 am    Post subject: Reply with quote

He'd doing a standard way of hooking onto another application. However hes kind of using a hackish method to force the game to update the window status by using the arrow keys to invalidate the device.

You can instead, hook onto Direct3DCreate8 / Direct3DCreate9 and then either wrap the entire interface or hook onto the interfaces 'CreateDevice'. Inside the CreateDevice call you can force the window mode on startup of the game rather then using a hackish mode. (Alter the presentation params as needed.)

Be sure to hook the new devices Reset since the presentation params passed to Reset can undo your window mode. Just alter the params in that as well before allowing the real reset to be called to keep it in a window.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites