Jump to content
YOUR-AD-HERE
HOSTING
TOOLS

Locked [VB.NET] Unkillable Process


H4ckCoder

Recommended Posts

[HIDE-THANKS]


Imports System.Runtime.InteropServices

Public Class ProtectMe
#Region "VarPtr Support by Francesco Balena & Code Architects"
' -----------------------------------------------------------
' VARPTR implementation in VB.NET
' Part of VB Migration Partner’s support library
' By Rottweiler
' -----------------------------------------------------------
Private Delegate Function VarPtrCallbackDelegate(ByVal address As Integer, ByVal unused1 As Integer, ByVal unused2 As Integer, ByVal unused3 As Integer) As Integer
Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal wndProc As VarPtrCallbackDelegate, ByRef var As Short, _
ByVal unused1 As Integer, ByVal unused2 As Integer, _
ByVal unused3 As Integer) As Integer
Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal wndProc As VarPtrCallbackDelegate, ByRef var As Integer, _
ByVal unused1 As Integer, ByVal unused2 As Integer, _
ByVal unused3 As Integer) As Integer
Private Shared Function VarPtrCallback(ByVal address As Integer, ByVal unused1 As Integer, ByVal unused2 As Integer, ByVal unused3 As Integer) As Integer
Return address
End Function
Private Shared Function VarPtr(ByRef var As Short) As Integer
Return CallWindowProc(AddressOf VarPtrCallback, var, 0, 0, 0)
End Function
Private Shared Function VarPtr(ByRef var As Integer) As Integer
Return CallWindowProc(AddressOf VarPtrCallback, var, 0, 0, 0)
End Function
#End Region


Private Shared Function GetCurrentProcess() As IntPtr
End Function


Private Shared Function ZwSetInformationProcess(ByVal _1 As IntPtr, ByVal _2 As IntPtr, ByVal _3 As IntPtr, ByVal _4 As IntPtr) As IntPtr
End Function

Public Shared Sub Protect()
ZwSetInformationProcess(GetCurrentProcess(), &H21&, VarPtr(&H8000F129), &H4&)
End Sub
End Class





This is the hidden content, please

[/HIDE-THANKS]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.