daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest May 19th, 2017 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
  2.  
  3. Private myProcesses As Process()
  4. Private processHandle As IntPtr
  5.  
  6. If Process.GetProcessesByName("S4Client").Length > 0 Then
  7.             myProcesses = Process.GetProcessesByName("S4Client")
  8.             processHandle = OpenProcess(&H1F0FFF, 0, myProcesses(0).Id)
  9.  
  10.             If myProcesses.Length = 0 Then
  11.                 Exit Sub
  12.             End If
  13.  
  14.             If processHandle = IntPtr.Zero Then
  15.                 Exit Sub
  16.             End If
  17.         End If
  18.     End Sub
RAW Paste Data
Top