#Include once "window9.bi"

Dim Shared ip As PROCESSENTRY32
Function InitProcess()As HANDLE export
  Return CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)
End Function
Function FirstProcess(handle As HANDLE) As Bool Export
  ip.dwSize=sizeof(PROCESSENTRY32)
  Return Process32First (handle,@ip)
End Function
Function NextProcess(handle As HANDLE) As Bool Export
  Return Process32Next (handle,@ip)
End Function
Function GetNameProcess() As String Export
  Return ip.szExeFile
End Function
Function GetIDProcess() As integer Export
  Return ip.th32ProcessID
End Function

