冰楓論壇

標題: 誰可以幫我解答 [打印本頁]

作者: lssce1122    時間: 2013-2-13 19:33
標題: 誰可以幫我解答
本帖最後由 lssce1122 於 2013-2-13 23:46 編輯

Public Function FindGame(ByVal strGameName As String) As Boolean
    Dim pe32        As PROCESSENTRY32
    Dim hSnapshot   As Long
    Dim bProcFound  As Object
    Dim bFoundGame  As Boolean

    hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0&)
    pe32.dwSize = Len(pe32)

    bProcFound = Process32First(hSnapshot, pe32)
    With bFoundGame
            If Right$(LCase$(Left$(pe32.szexeFile, InStr(1, pe32.szexeFile, Chr(0)) - 1)), Len(strGameName)) = LCase$(strGameName) Then
            dwProcId = pe32.th32ProcessID
            bFoundGame = True
            Else
            bFoundGame = False
        End If
        bProcFound = Process32Next(hSnapshot, pe32)
  End With
    CloseHandle hSnapshot
    FindGame = bFoundGame
End Function
這裡不知道哪裡錯了
作者: lssce1122    時間: 2015-7-3 22:53
給2年前的自己   ((  是你重複打了




歡迎光臨 冰楓論壇 (https://bingfong.com/) Powered by 冰楓