title: How can I know/see on which core a thread run ? (In win XP)
body: <p>If I have a multi-thread program, how can I know on which core
  each thread run ? </p>
  
  <p>Is there any another solution for win XP  in C# ? </p>
  
  <p><strong>I try this:</strong></p>
  
  <pre><code>[DllImport("ntdll"), SuppressUnmanagedCodeSecurity]
  public static extern int NtGetCurrentProcessorNumber();
  </code></pre>
  
  <p>and I get this exception:</p>
  
  <p>System.EntryPointNotFoundException was unhandled
  Message="Unable to find an entry point named 'NtGetCurrentProcessorNumber' in DLL 'ntdll'."
  Source="XP_Multicore_try_0"
  TypeName=""
  StackTrace:
  at XP_Multicore_try_0.Program.NtGetCurrentProcessorNumber()
  at XP_Multicore_try_0.Program.loop() in C:\Documents and Settings\evyatarv\Desktop\XP_Multicore_try_0\XP_Multicore_try_0\Program.cs:line 24
  at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
  at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
  at System.Threading.ThreadHelper.ThreadStart()</p>
  
  <p>Thanks,
  Evyatar</p>