[help] Process protection Class 09-04-2011, 07:17 AM
#1
Hi Friends
Need your help i was trying to add a feature process protection it work perfect in framework 4 but when i try in framework 2.0 i am getting error on StopProcessProtection in event handler can u correct me what is wrong
error
Process protection
Even Any one know How to bypass the process protection please share with me i will be thankful to you
Need your help i was trying to add a feature process protection it work perfect in framework 4 but when i try in framework 2.0 i am getting error on StopProcessProtection in event handler can u correct me what is wrong
error
Code:
Method 'Private Function StopProcessProtection() As Boolean' does not have the same signature as delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'.Process protection
Code:
Imports System.Runtime.InteropServices
Public Class clsProcessProtect
<DllImport("ntdll")> _
Private Shared Function NtSetInformationProcess(ByVal hProcess As IntPtr, ByVal processInformationClass As Integer, ByRef processInformation As Integer, ByVal processInformationLength As Integer) As Integer
End Function
Dim psStop As New EventHandler(AddressOf StopProcessProtection)
Const iStop = 0
Const iStart = 1
Const ProcessPriorityClass = 29
Public Sub New()
End Sub
Public Sub Start()
StartProcessProtection(iStart)
AddHandler AppDomain.CurrentDomain.ProcessExit, psStop
AddHandler AppDomain.CurrentDomain.DomainUnload, psStop
AddHandler Application.ApplicationExit, psStop
End Sub
Private Function StartProcessProtection(ByRef psInfo As Integer) As Boolean
Try
NtSetInformationProcess(Process.GetCurrentProcess().Handle, ProcessPriorityClass, psInfo, Marshal.SizeOf(psInfo))
Return True
Catch ex As Exception
MessageBox.Show(ex.Message & vbNewLine & ex.InnerException.ToString())
End Try
End Function
Private Function StopProcessProtection() As Boolean
Try
StartProcessProtection(iStop)
Catch ex As Exception
MessageBox.Show(ex.Message & vbNewLine & ex.InnerException.ToString())
End Try
End Function
End ClassEven Any one know How to bypass the process protection please share with me i will be thankful to you


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)


i tried by changeling change of your constants,
