English
Source / code snippets

List processes system

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
System: Prozesse auflisten
Declare 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$
                    Sleep 100	 Hier die gefundenen Prozesse in Listbox o.ä. übernehmen

                EndIf

            Until err& = 0

            CloseHandle(handle&)

        EndIf

    EndIf

EndProc

cls
FillProcessList
WaitInput
4 href='./../../function-references/XProfan/end/'>end
 
07/15/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.613 Views

Untitledvor 0 min.
AndreasS11/27/18
Gary1234506/09/13
maxpayne200102/23/13
Dieter Zornow11/18/11
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie