Hi,
If I have a multi-thread program, how can I know on which core each thread run ?
Is there any another solution for win XP in C# ?
I try this:
[DllImport("ntdll"), SuppressUnmanagedCodeSecurity]
public static extern int NtGetCurrentProcessorNumber();
and I get this exception:
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()
Thanks, Evyatar