Windows API、VB.Net GetModuleFileNameEx,找不到入口点
Windows API, VB.Net GetModuleFileNameEx, Entry Point Not Found
我正在尝试 运行 下面的代码:
Public Class Form1
Public Declare Function GetModuleFileNameEx Lib "PSAPI.DLL" (ByVal hProcess As Integer, ByVal hModule As Integer, ByRef lpFilename As String, ByVal nSize As Integer) As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim _intLen As Integer
Dim lpFilename As String
Dim nSize As Integer
lpFilename = ""
'get process file path
_intLen = GetModuleFileNameEx(10000, 0, lpFilename, nSize)
End Sub
End Class
但我不断收到 entrypointnotfound 异常:
有什么想法吗?
确定找到解决方案:
Public Class Form1
Public Declare Function GetModuleFileNameExW Lib "PSAPI.DLL" (ByVal hProcess As Integer, ByVal hModule As Integer, ByRef lpFilename As String, ByVal nSize As Integer) As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim _intLen As Integer
Dim lpFilename As String
Dim nSize As Integer
lpFilename = ""
'get process file path
_intLen = GetModuleFileNameExW(10000, 0, lpFilename, nSize)
End Sub
End Class
我正在尝试 运行 下面的代码:
Public Class Form1
Public Declare Function GetModuleFileNameEx Lib "PSAPI.DLL" (ByVal hProcess As Integer, ByVal hModule As Integer, ByRef lpFilename As String, ByVal nSize As Integer) As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim _intLen As Integer
Dim lpFilename As String
Dim nSize As Integer
lpFilename = ""
'get process file path
_intLen = GetModuleFileNameEx(10000, 0, lpFilename, nSize)
End Sub
End Class
但我不断收到 entrypointnotfound 异常:
有什么想法吗?
确定找到解决方案:
Public Class Form1
Public Declare Function GetModuleFileNameExW Lib "PSAPI.DLL" (ByVal hProcess As Integer, ByVal hModule As Integer, ByRef lpFilename As String, ByVal nSize As Integer) As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim _intLen As Integer
Dim lpFilename As String
Dim nSize As Integer
lpFilename = ""
'get process file path
_intLen = GetModuleFileNameExW(10000, 0, lpFilename, nSize)
End Sub
End Class