GetProcessId P/Invoke

Announcements and discussion for PInvoke

GetProcessId P/Invoke

Postby ZenLulz » Tue Jan 01, 2013 7:51 pm

Dear community,

The function DWORD WINAPI GetProcessId(HANDLE); is missing in your wiki.

This is the corresponding P/Invoke function :

Code: Select all
        /// <summary>
        /// Retrieves the process identifier of the specified process.
        /// </summary>
        /// <param name="hProcess">A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights.</param>
        /// <returns>If the function succeeds, the return value is an open handle to the specified process. If the function fails, the return value is NULL. To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.</returns>
        [DllImport("kernel32.dll", SetLastError = true)]
        public static extern int GetProcessId(IntPtr hProcess);

Feel free to add it. :)
Posts: 2
Joined: Tue Jan 01, 2013 7:47 pm
Location: Switzerland

Return to PInvoke.Net

Who is online

Users browsing this forum: No registered users and 0 guests