Variables constantly changing :/

BlitzMax Forums/BlitzMax Programming/Variables constantly changing :/

SuperStrict

Import "-lpsapi"

Extern "win32"
	Function EnumProcesses(pProcessIDs:Byte Ptr, cb:Int, cbNeeded:Int Var) = "EnumProcesses@12"
End Extern

Enumerate()

End


Function Enumerate()
	
	Local ProcessIDs:Int[]=New Int[100]
	
	Local cb:Int
	Local cbNeeded:Int
	Local lret:Int
	
	Local NumProcessesFound:Int
	
	Local Counter:Int
	
	'Local hProcess:Int
	Local hp:Int=0
	
	cb=400
	cbNeeded=0
	
	DebugLog hp
	
	lret = EnumProcesses(ProcessIDs, cb, cbNeeded)
	
	DebugLog hp
	DebugLog cb
	DebugLog cbNeeded
	DebugLog "Processes : " + cbNeeded / 4
	
	For Local p:Int = EachIn ProcessIDs
		DebugLog Hex(p)
	Next		
End Function

[edit]
Budman beat me too it. ;o)
[/edit]