Register for your free account! | Forgot your password?

You last visited: Today at 05:32

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[VB TuT]Suspender

Discussion on [VB TuT]Suspender within the Coding Tutorials forum part of the General Coding category.

Reply
 
Old   #1
 
elite*gold: 1
Join Date: Nov 2010
Posts: 581
Received Thanks: 388
[VB TuT]Suspender

Hello,
i will show u how to make a simple Suspender in Visual Basic 2010.


What we need :
Visual Basic 2008/2010 or Visual Studio 2008/2010.
Brain.exe


Step one:
Open Visual Basic and create a new Project, Windows Forms and call it how u want.

Step two:
We create 1 Button and 1 TextBox. We call the Button
"Suspend".
Then we make a right click on our Project and go on Add and click on Module.

Step three:
In Module.vb we gonna declare all functions to Suspend and to Resume a Process that our Programm can Suspend or Resume a Process.
PHP Code:
Public Enum ThreadAccess As Integer
        TERMINATE 
= (&H1)
        
SUSPEND_RESUME = (&H2)
        
GET_CONTEXT = (&H8)
        
SET_CONTEXT = (&H10)
        
SET_INFORMATION = (&H20)
        
QUERY_INFORMATION = (&H40)
        
SET_THREAD_TOKEN = (&H80)
        
IMPERSONATE = (&H100)
        
DIRECT_IMPERSONATION = (&H200)
    
End Enum

    
Public Declare Function OpenThread Lib "kernel32.dll" (ByVal dwDesiredAccess As ThreadAccessByVal bInheritHandle As BooleanByVal dwThreadId As UInteger) As IntPtr
    
Public Declare Function SuspendThread Lib "kernel32.dll" (ByVal hThread As IntPtr) As UInteger
    
Public Declare Function ResumeThread Lib "kernel32.dll" (ByVal hThread As IntPtr) As UInteger
    
Public Declare Function CloseHandle Lib "kernel32.dll" (ByVal hHandle As IntPtr) As Boolean 

Step four:
Then we go back to our Form1 and press right click on it and press
"View Code". Here we declare the SuspendProcess and ResumeProcess function in Private Sub.

SuspendProcess function:
PHP Code:
Private Sub SuspendProcess(ByVal process As System.Diagnostics.Process)
        For 
Each t As ProcessThread In process.Threads
            Dim th 
As IntPtr
            th 
OpenThread(ThreadAccess.SUSPEND_RESUMEFalset.Id)
            If 
th <> IntPtr.Zero Then
                SuspendThread
(th)
                
CloseHandle(th)
            
End If
        
Next
    End Sub 
ResumeProcess function:
PHP Code:
Private Sub ResumeProcess(ByVal process As System.Diagnostics.Process)
        For 
Each t As ProcessThread In process.Threads
            Dim th 
As IntPtr
            th 
OpenThread(ThreadAccess.SUSPEND_RESUMEFalset.Id)
            If 
th <> IntPtr.Zero Then
                ResumeThread
(th)
                
CloseHandle(th)
            
End If
        
Next
    End Sub 
Now we go back to our Form and double click on our Button.
Then we write the function that will suspend and resume our Process from the TextBox.
PHP Code:
Dim game As Process() = Process.GetProcessesByName(TextBox1.Text)
        If 
Button1.Text "Suspend" Then
            SuspendProcess
(game(0))
            
Button1.Text "Resume"
        
Else
            
ResumeProcess(game(0))
            
Button1.Text "Suspend"
        
End If 
When you press on Suspend the Button will get the name Resume and when you press Resume the Button will get the name Suspend again.
In the TextBox you write your Process name but without .exe in the end !


I forgot something: Double click on your Form and type in
PHP Code:
Process.EnterDebugMode() 

That code make that the process get suspended with full rights. If you don´t have this code then Game Processes wouldn´t get suspended and resumed only the windows Processes.

If you want to get the current Process List and suspend it from the List box then you make this =>
We add a ListBox and a new Button(we call the Button also
"Suspend") and double click on our Form and write the function that will get our current Process List:
PHP Code:
Dim Processe As Process
        
For Each Processe In Process.GetProcesses
            ListBox1
.Items.Add(Processe.ProcessName)
        
Next 
Then we go back to our Form and double click on the new Button that we added. Then we write the same code as for the TextBox only with ListBox:
PHP Code:
Dim game As Process() = Process.GetProcessesByName(ListBox1.Text)
        If 
Button1.Text "Suspend" Then
            SuspendProcess
(game(0))
            
Button1.Text "Resume"
        
Else
            
ResumeProcess(game(0))
            
Button1.Text "Suspend"
        
End If 
Now we are finished and so we can Debug our Programm =)
In the end you can design your Programm how you want if you want

I hope i explained it to you well and you understood everything well =)

~Have Fun~
CrashXx is offline  
Thanks
4 Users
Old 04/06/2011, 08:59   #2
 
bestora's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 1,191
Received Thanks: 177
mhhh Nice
For S4 is it Useless...
But you have copy it or?
bestora is offline  
Old 04/06/2011, 14:19   #3
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Does it work for games like Call of Duty or Counter-Strike (games wich run in fullscreen)?
Kraizy​ is offline  
Old 04/07/2011, 06:53   #4
 
bestora's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 1,191
Received Thanks: 177
ehm fullscreen I don't know... in CoD or CS
You can check it...
My CoD is broken xDDDDD
But games like S4 league, there work it!
bestora is offline  
Old 04/08/2011, 12:18   #5
 
elite*gold: 1
Join Date: Nov 2010
Posts: 581
Received Thanks: 388
It should work for every game, i didn´t tested it on offline games xD but it should work =)
CrashXx is offline  
Reply


Similar Threads Similar Threads
Suspender
01/13/2011 - S4 League Hacks, Bots, Cheats & Exploits - 7 Replies
I need Suspender. Give me Names pls
suspender
10/15/2010 - S4 League - 6 Replies
Hallo zusammen ich suche eine weg s4 league zu suspenden da die suspender dich runterlade nicht funktoinieren und ich manche sachen noch nicht verstehe also ich würds nett finden wenn mir einer erklären könnte wie ich jetz genau s4 supendet bekomme danke im voraus mfg linker
Suspender
10/03/2010 - S4 League - 22 Replies
Ok, i just downloaded process exploreer and foudn out it does not work for 32-bit.. So i am wondering what other suspender i can use that can acutal let me suspend during the gmae
suspender
09/09/2010 - S4 League - 0 Replies
who give me a working suspender i need it for mine gun
i need suspender
02/10/2008 - Soldier Front - 1 Replies
i need suspender guys for TRapp :)



All times are GMT +1. The time now is 05:34.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.