Unable to find an entry point named 'GetProcessID' in DLL 'kernel32.dll'
Question
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..
Solution
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)?
OTHER TIPS
Your interop code should look like this:
[DllImportAttribute("kernel32.dll", EntryPoint="GetProcessId")]
public static extern uint GetProcessId([In] System.IntPtr process);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow