精彩代码片段
private void SetState(int bit, bool value) {
if (value) {
threadState |= bit;
}
else {
threadState &= (~bit);
}
}
UnsafeNativeMethods.cs
封装了Win32的方法