GetThreadId P/Invoke

Announcements and discussion for PInvoke

Moderators: Luke Jefferson, Robert

GetThreadId P/Invoke

Postby ZenLulz » Tue Jan 08, 2013 2:17 pm

Dear community,

Another missed function :

Code: Select all
/// <summary>
        /// Retrieves the thread identifier of the specified thread.
        /// </summary>
        /// <param name="hThread">
        /// A handle to the thread. The handle must have the THREAD_QUERY_INFORMATION or THREAD_QUERY_LIMITED_INFORMATION access right.
        /// For more information about access rights, see Thread Security and Access Rights.
        /// </param>
        /// <returns>
        /// If the function succeeds, the return value is a thread id to the specified handle.
        /// If the function fails, the return value is zero. To get extended error information, call GetLastError.
        /// </returns>
        [DllImport("kernel32.dll", SetLastError = true)]
        public static extern int GetThreadId(IntPtr hThread);


It can be added to the wiki.
ZenLulz
 
Posts: 2
Joined: Tue Jan 01, 2013 8:47 pm
Location: Switzerland

Return to PInvoke.Net

Who is online

Users browsing this forum: No registered users and 0 guests