Locked Home » Forums » Legacy & Archived » Archived Content » Legacy General Discussion

GW2 GPU stand-by : Legacy General Discussion

Posted: October 30th, 2012
Total Posts:1 Joined:2012
I really don't know where to put this... it's not a bot nor a hack nor a exploit. I don't feel like putting it directly into GW2 forum, since using AutoIt is... suspicious to say the least.

Also, i'm not giving an executable, but the script itself, so you can check it's not a n00b virus/keylogger whatever.

I made a script that's able to suspend the Direct3D thread of GW2. This means that it will stop rendering to give your GPU a break (in case you're a lazy !@#$%^* like me and you don't want to log out).

The problem is that you need one info: The Direct3D thread Id of the process. Each time you run GW2, it gets a new TID, so you will have to seek for it.

To find out the TID I use "process explorer" from microsoft (it's free). Register to unlock hidden link (Google it if you think it's a virus and go to the microsoft page, it's the first result). When you open it you will see a tree (list) of processes, find the Gw2.exe and doubleclick on it. Go to tab "Threads" and find the thread that it's start address is something like d3d9.dll. If you follow that row to the right, you will find the TID you need.
From this window you can manually suspend that thread, but I made a shortcut to a key with my script (and its way faster).

Once you run the script, it will ask you for the TID. Then if you press F11, it will suspend the D3D thread and hide the window. If you press F11 again, it should pop up again and resume the thread.
If you leave the TID as 0, it will just hide the window (for those who play at work *giggle*), but it will continue rendering the graphics, so your GPU will still burn.

Here's the AutoIt code:

Code: Register to unlock hidden link

HotKeySet("{F11}", "toogle")
$tid = InputBox("", "TID", "0")

Global $hidden = False

While True
	Sleep(1000)
WEnd

Func toogle()
	If $hidden Then
		If $tid <> 0 Then
			_ThreadResume($tid)
		EndIf
		WinSetState("Guild Wars 2", "", @SW_SHOW)
	Else
		Send("!{TAB}")
		WinSetState("Guild Wars 2", "", @SW_HIDE)
		If $tid <> 0 Then
			_ThreadSuspend($tid)
		EndIf
	EndIf
	$hidden = Not $hidden
EndFunc

Func _ThreadResume($TID)
	$Handle = DllCall("kernel32.dll","ptr", "OpenThread","dword", "0x0002","int", "0","dword",$TID)
	$i_sucess = DllCall("kernel32.dll","dword","ResumeThread","ptr",$Handle[0])
	DllCall("kernel32.dll", "ptr", "CloseHandle", "ptr", $Handle)
EndFunc
Func _ThreadSuspend($TID)
	$Handle = DllCall("kernel32.dll","ptr", "OpenThread","dword", "0x0002","int", "0","dword",$TID)
	$i_sucess = DllCall("kernel32.dll","dword","SuspendThread","ptr",$Handle[0])
	DllCall("kernel32.dll", "ptr", "CloseHandle", "ptr", $Handle)
EndFunc
I hope it's usefull :o

Note: If you try to pause the process itself (all the threads) you will get disconnected out of server. Pausing the D3D thread doesn't cause you to disconnect.
Ready to join the community? Click here and see all of the benefits!
blue large dotWho is online
Users browsing this forum: No registered users and 42 guests