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 


ALT+TAB protection implementation

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

Joined: 12 Dec 2012
Posts: 340
Location: Somewhere....

PostPosted: Mon Sep 16, 2013 2:28 pm    Post subject: ALT+TAB protection implementation Reply with quote

any ideas how to add it to my game programmatically?, so that user can't minimize the game

one of the ideas i think about, is to create
a thread that calls SetForegroundWindow or SetActiveWindow constantly, but i guess this is not much effective, right?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25823
Location: The netherlands

PostPosted: Mon Sep 16, 2013 2:35 pm    Post subject: Reply with quote

That might work, perhaps in combination with a check if it's already the focused windows or not, and only every few milliseconds instead of constantly.

Also, expect extremely bad reviews about your game if you do that. (It was already bad behavior in 2004 with doom3, but these days you'll get burned on the stake for it)

Why do you need to do that anyway ? The average user will be pissed of because he can't properly use skype, fraps, browser and other tools he/she might switch to during gameplay, and an experienced cheat maker will just disable it or use network scanning from another system, to create a trainer, and give that to other people so they don't even have to alt tab

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping


Last edited by Dark Byte on Mon Sep 16, 2013 2:42 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 340
Location: Somewhere....

PostPosted: Mon Sep 16, 2013 2:41 pm    Post subject: Reply with quote

i'm just getting info about this, not making a game actually, but i saw some games that doesn't check for the window focus or even forcing it as foreground (as you said it's easy to be evaded or disabled), so games does something that makes the window never listens to the two key presses somehow, how would this be done?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25823
Location: The netherlands

PostPosted: Mon Sep 16, 2013 2:47 pm    Post subject: Reply with quote

Could be the old DirectInput8 with an exclusive lock and they forgot to forward those unhandled keys
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue Sep 24, 2013 2:45 pm    Post subject: Reply with quote

Some ways I've dealt with in bypassing game protections:
- SetForegroundWindow / GetForegroundWindow
- SetFocus / GetFocus
- SetWindowPos
- IsIconic
- GetWindowRect
- GetWindowLongPtr / SetWindowLongPtr
- SetWindowsHook / SetWindowsHookEx

If you plan to force fullscreen mode and are using Direct3D, if you do not need to ever call Reset you can use that to track when the device is lost (typically from alt+tab) and kill the game then too.

_________________
- 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