2,749
社区成员
发帖
与我相关
我的任务
分享Declare integer CreateToolhelp32Snapshot in win32api integer,integer
Declare integer Process32First in win32api integer,string @
Declare integer Process32Next in win32api integer,string @
Declare integer CloseHandle in win32api integer
CLEAR
lnHand = 0
lnHand = CreateToolhelp32Snapshot(3,0)
If lnHand>0
lctitle=SPACE(256)
If Process32First(lnHand,@lctitle) > 0
tln = 0
Do while Process32Next(lnHand,@lctitle)> 0
m.lnval=SUBSTR(lctitle,37,256)
m.lnval=left(m.lnval,At(Chr(0),m.lnval) - 1)
If Lower(m.lnval) == 'excel.exe'
tln = tln + 1
If tln == 1
Exit
Endif
Endif
Enddo
If tln == 0
Messagebox("程序已经被关闭",4096,"Message")
CloseHandle(lnHand)
Clear Dlls
Else
****没有关闭
Endif
Endif
CloseHandle(lnHand)
Endif