Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我正在尝试使用 WINAPI 'GetProcessID' 从进程句柄中获取 processID,但我收到以下错误...
无法在 DLL“kernel32.dll”中找到名为“GetProcessID”的入口点。
检查 MSDN 我看不到我哪里出错了..
您的互操作代码应如下所示:
[DllImportAttribute("kernel32.dll", EntryPoint="GetProcessId")] public static extern uint GetProcessId([In] System.IntPtr process);
大小写有时很重要,尤其是在 Windows API 中很重要。您是否在这里指的是 API 函数GetProcessId(小写最后一个字母d)?