| |
|
|
| Andreas Miethe (09.02.13)
In el Zusammenhang igual todavía algo. Um el a testen muss el Explorer neu comenzó voluntad. Es así : KompilierenMarcaSeparación
Proc KillProcess
Var Kernel& = Importdll("Kernel32.dll","")
Def &TH32CS_SNAPPROCESS 2
STRUCT PROCESSENTRY32 = \
dwSize&,\
cntUsage&,\
th32ProcessID&,\
th32DefaultHeapID&,\
th32ModuleID&,\
cntThreads&,\
th32ParentProcessID&,\
pcPriClassBase&,\
dwFlags&,\
szExeFile$(~MAX_PATH)
PARAMETERS Filename$
Var TH& = CreateToolhelp32Snapshot(&TH32CS_SNAPPROCESS,0)
Var PE# = New(PROCESSENTRY32)
Var PID& = 0
Var phandle& = 0
PE#.dwSize& = Sizeof(PE#)
Process32First(th&,PE#)
While Process32Next(th&,PE#)
If Upper$(PE#.szExeFile$) = Upper$(Filename$)
Pid& = PE#.th32ProcessID&
pHandle& = OpenProcess($400 | $10 | 1,0,PID&)
TerminateProcess(pHandle&,0)
CloseHandle(pHandle&)
Break
EndIf
EndWhile
Dispose PE#
CloseHandle(th&)
Freedll Kernel&
EndProc
KillProcess("expl xe" )
Quelle: [...] |
|
|
| |
|
|