verzeihung, ist so ein automatismus bei mir.
danke, aber ich bin immernoch auf dem holzweg. ich benutze jetzt
SetRights("SeDebugPrivilege")
aber hinten kommt immer noch ein "Unknown Process" raus. ich hab das als erste zeile in die GetProcessFileName2(PID) Procedure gepackt, testweise in meine helper function die ich aufrufe, ohne erfolg. habe auch MSDN bemüht, aber die c++ samples sind mir zu hoch.
bin noch über #PROCESS_ALL_ACCESS bei OpenProcess_() gestolpert, keine änderung.
PBOSL Process
Re: PBOSL Process
iMac 27" quad i7 radeon 4850 8gig ram
PB 4.4 in parallelsVM @ 2 cores 3072megs ram 32megs vram win7
PB 4.4 in parallelsVM @ 2 cores 3072megs ram 32megs vram win7
Re: PBOSL Process
Versuch mal das hier :
Code: Alles auswählen
Structure PROCESSINFO
SnapShot.i
ProcessEntry.PROCESSENTRY32
firstrun.i
EndStructure
Global _ExamineProcessInfo.PROCESSINFO
Procedure.i NextProcess()
If _ExamineProcessInfo\firstrun
_ExamineProcessInfo\firstrun = #False
ProcedureReturn #True
EndIf
If Process32Next_(_ExamineProcessInfo\SnapShot, _ExamineProcessInfo\ProcessEntry)
ProcedureReturn #True
EndIf
ProcedureReturn #False
EndProcedure
Procedure.s GetProcessName()
ProcedureReturn PeekS(@_ExamineProcessInfo\ProcessEntry\szExeFile)
EndProcedure
Procedure.i GetProcessPID()
ProcedureReturn _ExamineProcessInfo\ProcessEntry\th32ProcessID
EndProcedure
Procedure.i ExamineProcess()
Protected result.i
If _ExamineProcessInfo\SnapShot
CloseHandle_(_ExamineProcessInfo\SnapShot)
EndIf
_ExamineProcessInfo\firstrun = #True
_ExamineProcessInfo\SnapShot = CreateToolhelp32Snapshot_(#TH32CS_SNAPPROCESS,#Null)
If _ExamineProcessInfo\SnapShot
ClearStructure(_ExamineProcessInfo\ProcessEntry, PROCESSENTRY32)
_ExamineProcessInfo\ProcessEntry\dwSize = SizeOf(PROCESSENTRY32)
result = Process32First_(_ExamineProcessInfo\SnapShot, _ExamineProcessInfo\ProcessEntry)
EndIf
ProcedureReturn result
EndProcedure
If ExamineProcess()
While NextProcess()
ip = GetProcessPID()
name$ = GetProcessName()
Debug Str(ip)+" "+ name$
Wend
EndIf
Re: PBOSL Process
wow, ich danke dir. klappt hervorragend!
iMac 27" quad i7 radeon 4850 8gig ram
PB 4.4 in parallelsVM @ 2 cores 3072megs ram 32megs vram win7
PB 4.4 in parallelsVM @ 2 cores 3072megs ram 32megs vram win7