@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The GetCurrentThread API !!!!C# Signature: [DllImport("kernel32.dll")] static extern IntPtr GetCurrentThread(); !!!!User-Defined Types: None. !!!!Notes: This does not return a real handle, but a fixed value which is interpreted as the current, calling thread by any function which requires a thread handle. To get the real handle, you need to call GetCurrentThreadId, then OpenThread with the returned value along with the necessary permissions and what-not. Then close the handle when you're done with it. !!!!Tips & Tricks: Please add some! !!!!Sample Code: IntPtr currThread = GetCurrentThread(); !!!!Alternative Managed API: idThead = Process.GetCurrentProcess().Threads[0].Id; Documentation: GetCurrentThread@msdn on MSDN
Edit kernel32.getcurre...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.