You must start the process first.
Like in the MS sample for threads : ProcessThread.ProcessorAffinity
InvalidOperationException when processor affinity is being set.
Narendra V
1
Reputation point
After creation of the process as shown below . I am getting the following exception "System.InvalidOperationException: 'No process is associated with this object.'". Please let me know
how to resolve this exception.
Process cmdline = new Process();
cmdline.ProcessorAffinity = (IntPtr)0x0001;
Developer technologies C#
11,567 questions
2 answers
Sort by: Most helpful
-
Castorix31 90,521 Reputation points
2022-04-29T13:57:10.437+00:00 -
Narendra V 1 Reputation point
2022-05-01T02:38:34.433+00:00 Can you please explain what is normal here and why exception is being thrown?