AppDomain.GetCurrentThreadID vs Thread.ManagedThreadID for Windows API calls?

前端 未结 5 1638
独厮守ぢ
独厮守ぢ 2021-01-11 10:23

I\'m trying to create a hook to monitor the current position of the mouse cursor. Nothing important, I just need to count some pixels during interface design and wanted to l

5条回答
  •  暖寄归人
    2021-01-11 10:50

    For future readers: There are also System.Threading.Thread.BeginThreadAffinity() / EndThreadAffinity() functions that purportedly stop the VM from switching between different physical threads. I don't believe these guarantee stability, but I think they're more likely to be stable.

提交回复
热议问题