Código
'**************************************************************** ' Procedure : SuspendProcess ' Author : seba123neo ' Date : 20/10/2009 ' Purpose : Suspend/Resume Process '**************************************************************** Option Explicit 'NTDLL.DLL Private Declare Function NtSuspendProcess Lib "ntdll.dll" (ByVal hProc As Long) As Long Private Declare Function NtResumeProcess Lib "ntdll.dll" (ByVal hProc As Long) As Long Private Enum TYPESUSPEND Suspend = 0 Release = 1 End Enum Private Const SYNCHRONIZE = &H100000 Private Const STANDARD_RIGHTS_REQUIRED = &HF0000 Private Const PROCESS_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &HFFF) Private Declare Function OpenProcess Lib "Kernel32.dll" (ByVal dwDesiredAccessas As Long, ByVal bInheritHandle As Long, ByVal dwProcId As Long) As Long Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long Private Sub Command1_Click() Call SuspendProcess(1384, Suspend) End Sub Private Sub Command2_Click() Call SuspendProcess(1384, Release) End Sub Private Sub SuspendProcess(ByVal pPID As Long, ByVal pTypeSuspend As TYPESUSPEND) Dim vHandle As Long vHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pPID) If vHandle <> 0 Then Select Case pTypeSuspend Case 0: NtSuspendProcess vHandle Case 1: NtResumeProcess vHandle End Select End If CloseHandle vHandle End Sub
saludos.