无法找到名为“GetProcessID”的入口点 在DLL“kernel32.dll”中

发布于 2024-08-02 02:38:30 字数 149 浏览 1 评论 0 原文

您好,我尝试使用 WINAPI“GetProcessID”从进程句柄中获取 processID,但出现以下错误...

无法在 DLL“kernel32.dll”中找到名为“GetProcessID”的入口点。

检查MSDN我看不出我哪里出了问题..

Hi im trying to get a processID out of a process handle using the WINAPI 'GetProcessID' but i am getting the following error...

Unable to find an entry point named 'GetProcessID' in DLL 'kernel32.dll'.

Checking MSDN i cant see where i have gone wrong..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

稀香 2024-08-09 02:38:30

您的互操作代码应如下所示:

[DllImportAttribute("kernel32.dll", EntryPoint="GetProcessId")]
public static extern  uint GetProcessId([In] System.IntPtr process);

Your interop code should look like this:

[DllImportAttribute("kernel32.dll", EntryPoint="GetProcessId")]
public static extern  uint GetProcessId([In] System.IntPtr process);
蹲在坟头点根烟 2024-08-09 02:38:30

有时大小写很重要,尤其是在 Windows API 中。 您在这里指的是 API 函数 GetProcessId(最后一个字母小写d)?

Case matters sometimes, and in particular, it matters in the Windows APIs. Are you refering to the API function GetProcessId here (lower-case last letter d)?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文