| |
|
|
Frank Abbing | CompileMarkSeparationDeclare Entry#,err&,handle&,cpid&,text$,text2$
Struct PROCESSENTRY32=dwSize&,
cntUsage&,
th32ProcessID&,
th32DefaultHeapID&,
th32ModuleID&,
Threads&,
th32ParentProcessID&,
pcPriClassBase&,
dwFlags&,
szExeFile$(260)
Dim Entry#,PROCESSENTRY32
Entry#.dwSize& = SizeOf(Entry#)
Def CreateToolhelp32Snapshot(2) !Kernel32, CreateToolhelp32Snapshot
Def Process32First(2) !Kernel32, Process32First
Def Process32Next(2) !Kernel32, Process32Next
Def CloseHandle(1) !Kernel32, CloseHandle
Def GetCurrentProcessID(0) !Kernel32, GetCurrentProcessId
Proc FillProcessList
cpid&=GetCurrentProcessID()
handle& = CreateToolhelp32Snapshot(2,0)
If handle&
err& = Process32First(handle&, Entry#)
If err&
text$=Str$(Entry#.th32ProcessID&)
text2$=Entry#.szExeFile$
Print PID: +text$+ | Prozessname: +text2$
Repeat
err& = Process32Next(handle&, Entry#)
If err&
text$=Str$(Entry#.th32ProcessID&)
text2$=Entry#.szExeFile$
Print PID: +text$+ | Prozessname: +text2$
EndIf
Until err& = 0
CloseHandle(handle&)
EndIf
EndIf
ENDPROC
|
|
|
| |
|
|
|
| super code - the has me very helped! for me personally have I from it the following derivational: CompileMarkSeparation |
|
|
| |
|
|
|
Frank Abbing | well freut me Yes. |
|
|
| |
|
|