
Kodlar
PHP Code:
Public Class Form1
Private Sub SuspendProcess(ByVal process As System.Diagnostics.Process)
For Each t As ProcessThread In process.Threads
Dim th As IntPtr
th = OpenThread(ThreadAcces.SUSPEND_RESUME, False, t.Id)
If th IntPtr.Zero Then
SuspendThread(th)
CloseHandle(th)
End If
Next
End Sub
Private Sub ResumeProcess(ByVal process As System.Diagnostics.Process)
For Each t As ProcessThread In process.Threads
Dim th As IntPtr
th = OpenThread(ThreadAcces.SUSPEND_RESUME, False, t.Id)
If th IntPtr.Zero Then
ResumeThread(th)
CloseHandle(th)
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim game As Process() = Process.GetProcessesByName(TextBox1.Text)
If Button1.Text = "Calışıyor." Then
SuspendProcess(game(0))
Button1.Text = "Durduruldu."
Else
ResumeProcess(game(0))
Button1.Text = "Calışıyor."
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
MsgBox("Eğer fixlenirse Lutfen mesaj atınız...")
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Ve Modul Kodu
PHP Code:
Module Module1
Public Enum ThreadAcces As Integer
TERMINATE = (&H1)
SUSPEND_RESUME = (&H2)
GET_CONTEXT = (&H3)
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 dwDesiredAcces As ThreadAcces, ByVal bInheritHandle As Boolean, ByVal 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
End Module
Şimdiden herkeze teşekkurler...
__________________