1 Star 0 Fork 0

章鱼DS / PiZYDS-极杀-BestKiller

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
Module6.bas 1007 Bytes
Copy Edit Web IDE Raw Blame History
章鱼DS authored 2017-04-07 18:58 . PiZYDS-极杀-BestKiller V3.1.0
Attribute VB_Name = "GetPath"
'https://zhidao.baidu.com/question/319190532.html
Private Declare Function GetModuleFileNameExA Lib "psapi.dll" (ByVal hProcess As Long, ByVal hModule As Long, ByVal lpFilename As String, ByVal nSize As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Function GetProcessFilePath(PID As Long) As String 'PID 是你要获取文件路径的进程的PID,这个可以在任务管理器中查到
Dim PH As Long
Dim FileName As String * 1024
PH = OpenProcess(&H1E00FF Or &H10F00, False, PID)
Call GetModuleFileNameExA(PH, 0, FileName, 1024)
GetProcessFilePath = Trim(FileName)
CloseHandle PH
End Function
Public Function GetPrPath(processName As String)
GetPrPath = GetProcessFilePath(GetPsPid(processName))
PrPid = GetPsPid(processName)
'MsgBox GetPrPath
End Function

Comment ( 0 )

Sign in for post a comment

Visual Basic
1
https://git.oschina.net/PillarsZhang/PiZYDS-BestKiller.git
git@git.oschina.net:PillarsZhang/PiZYDS-BestKiller.git
PillarsZhang
PiZYDS-BestKiller
PiZYDS-极杀-BestKiller
master

Search

152606 8668e384 1899542 133635 2cd7d36e 1899542