Login

VB6防破解之进程名字检测源码分享

下载次数:44更新时间: 2023-06-07 15:46:46 加入收藏 立即下载

Dim my As PROCESSENTRY32

Dim l  As Long

Dim l1 As Long

Dim mName As String

Dim i As Integer

l = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)

      If l Then

          my.dwSize = 1060

          If (Process32First(l, my)) Then         '遍历第一个进程

              Do

                            i = InStr(1, my.szExeFile, Chr(0))

                            mName = LCase(Left(my.szExeFile, i - 1))

                  If mName = namex Then

                            Jincheng = True

                            Exit Function

                    Else

                            Jincheng = False

                    End If

              Loop Until (Process32Next(l, my) < 1)             '遍历所有进程知道返回值为False

          End If

          l1 = CloseHandle(l)

End If

End Function

。。。。。。。。。


土粉评论

暂无评论