#include once "window9.bi"

Dim Shared As PROCESSENTRY32 g_ipl
Function InitProcess() As HANDLE export
	Return CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)
End Function

Function FirstProcess(byval h As HANDLE) As Long Export
	g_ipl.dwSize=sizeof(PROCESSENTRY32)
	Return Process32First(h, @g_ipl)
End Function

Function NextProcess(byval h As HANDLE) As Long Export
	Return Process32Next(h, @g_ipl)
End Function

Function GetNameProcess() As USTRING Export
	dim as USTRING sRet = g_ipl.szExeFile
	Return sRet
End Function

Function GetIDProcess() As integer Export
	Return g_ipl.th32ProcessID
End Function

