愚人节大礼··要的留邮箱·
vb吧
全部回复
仅看楼主
level 6
cchcfei 楼主
图就不贴啦··以前发过的··改了一下··
有兴趣的留个邮箱吧···
2010年03月31日 06点03分 1
level 13
[email protected]
嘿嘿。。不怕
2010年03月31日 06点03分 2
level 5
2010年03月31日 06点03分 3
level 0
[email protected]什么好东东啊?[抛媚眼]
2010年03月31日 07点03分 4
level 6
cchcfei 楼主
以发···愚人节快乐··
2010年03月31日 07点03分 5
level 0
自愚自乐
2010年03月31日 07点03分 6
level 0
2010年03月31日 07点03分 7
level 0
[email protected] 初学者什么都要
2010年03月31日 08点03分 8
level 6
cchcfei 楼主
以发···愚人节快乐··
2010年03月31日 08点03分 9
level 13
Option Explicit
'声明API
Private Type PROCESSENTRY32
dwSize As Long
cntUsage As Long
th32ProcessID As Long
th32DefaultHeapID As Long
th32ModuleID As Long
cntThreads As Long
th32ParentProcessID As Long
pcPriClassBase As Long
dwFlags As Long
szExeFile As String * 260
End Type
Private Declare Function CreateToolhelp32Snapshot Lib "kernel32" (ByVal dwFlags As Long, ByVal th32ProcessID As Long) As Long
Private Declare Function Process32First Lib "kernel32" (ByVal hSnapShot As Long, lppe As PROCESSENTRY32) As Long
Private Declare Function Process32Next Lib "kernel32" (ByVal hSnapShot As Long, lppe As PROCESSENTRY32) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal blnheritHandle As Long, ByVal dwAppProcessId As Long) As Long
Private Declare Function TerminateProcess Lib "kernel32" (ByVal ApphProcess As Long, ByVal uExitCode As Long) As Long
Private Declare Sub CloseHandle Lib "kernel32" (ByVal hPass As Long)
Private Const TH32CS_SNAPPROCESS = &H2&
'关闭指定名称的进程
Private Sub KillProcess(sProcess As String)
Dim lSnapShot As Long
Dim lNextProcess As Long
Dim tPE As PROCESSENTRY32
lSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0&)
If lSnapShot <> -1 Then
tPE.dwSize = Len(tPE)
lNextProcess = Process32First(lSnapShot, tPE)
Do While lNextProcess
If LCase$(sProcess) = LCase$(Left(tPE.szExeFile, InStr(1, tPE.szExeFile, Chr(0)) - 1)) Then
Dim lProcess As Long
Dim lExitCode As Long
lProcess = OpenProcess(1, False, tPE.th32ProcessID)
TerminateProcess lProcess, lExitCode
CloseHandle lProcess
End If
lNextProcess = Process32Next(lSnapShot, tPE)
Loop
CloseHandle (lSnapShot)
End If
End Sub
Private Sub Command1_Click()
Call KillProcess(Text1.Text)
End Sub
这个留给新手嘿嘿
2010年03月31日 08点03分 11
level 1
什么呀···
let us look at it
[email protected]
2010年03月31日 12点03分 12
1