国产成人AV一区二区三区在线_国产成人精品无码免费看_国产成人无码无卡在线观看_国产精品成人A区在线观看_国产日韩精品欧美一区_国产亚洲精品自在久久蜜TV_久草热久草热线频97精品_久久久噜噜噜久久中文福利_久久婷婷五月综合色国产免费观看_日日狠狠久久偷偷色综合0,九一桃色在线观看,久久97精品久久久久久久不卡,国产成人精品亚洲精品

vb如何使程序得到保護(hù)

訪客2024-12-26 20:59:331

就是使vb程序無法被普通的任務(wù)管理器結(jié)束任務(wù)和taskkill殺死,。雙程序互相保護(hù)也行,,有辦法嗎,?

,。

你這個要hook。復(fù)雜,。

你的防taskkill要hook鉤子,。復(fù)雜,。

互相保護(hù)簡單。代碼:

'查找是否運(yùn)行:

Public Function CheckExeIsRun(exeName) As Boolean

On Error GoTo Err

Dim WMI

Dim Obj

Dim Objs

CheckExeIsRun = False

Set WMI = GetObject("WinMgmts:")

Set Objs = ***.instancesof("Win32_Process")

For Each Obj In Objs

If (InStr(UCase(exeName), UCase(***.description)) <> 0) Then

CheckExeIsRun = True

If Not Objs Is Nothing Then Set Objs = Nothing

If Not WMI Is Nothing Then Set WMI = Nothing

Exit Function

End If

Next

If Not Objs Is Nothing Then Set Objs = Nothing

If Not WMI Is Nothing Then Set WMI = Nothing

Exit Function

Err:

If Not Objs Is Nothing Then Set Objs = Nothing

If Not WMI Is Nothing Then Set WMI = Nothing

End Function

'創(chuàng)建timer1

private sub timer1_timer

if checkexeisrun("工程名" & ".exe") then

else

shell"文件路徑"

end if

'再創(chuàng)建一個文件,,把對象設(shè)置為雙方,,一個退出,就用另一個重啟,。

'采納謝謝,!

文章評論