views:

602

answers:

2

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..

A: 

Hi. 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)?

Dirk
thankyou.. i was using uppercase D.
Grant
+1  A: 

Your interop code should look like this:

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