This is a discussion on How to get a reference to primary thread from process ? within the Mobile Software Development forums, part of the Software Development category; I have a Process. Now I want a reference to this process' primary thread. Process.Threads can give me a ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| I have a Process. Now I want a reference to this process' primary thread. Process.Threads can give me a ProcessThreadCollection, but I still don't know which one is the primary thread. From ProcessThreadCollection doc: "The primary thread is not necessarily at index zero in the array". So the question is: How can I get it, when I have the process? Thanks in Advance, Last edited by theone : 07-30-2007 at 03:49 AM. |
| Sponsored Links |
| |||
| Hi theOne The static method "Thread.CurrentThread", called from your primary thread, should do the trick. ![]() ![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Describe the difference between a Thread and a Process? | vadivelanvaidyanathan | ASP and ASP.NET Programming | 6 | 10-29-2008 04:03 AM |
| How to wait a program control until a thread completes it process? | $enthil | C# Programming | 4 | 11-16-2007 03:08 AM |
| Process & Thread | Sathish Kumar | C# Programming | 4 | 08-22-2007 04:47 AM |
| Describe the difference between a Thread and a Process? | kingmaker | C# Programming | 1 | 07-30-2007 12:21 AM |
| What are the primary considerations when implementing a user defined key? | oxygen | Java Programming | 1 | 07-26-2007 04:52 AM |