InvalidOperationException: 未能设置指定的 COM 单元状态。 StackTrace: 在 System.Threading.Thread.SetApartmentState(ApartmentState state) 在 DynamicClass.InputLockHelper.<>c__DisplayClass2.<EnableLock>b__0() 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 在 System.Threading.ThreadHelper.ThreadStart()