public Pointera(ObjectWrapper obj, IntPtr basePtr, int[] offsets, EThreadPriority threadPriority = EThreadPriority.Normal) { _object = obj; _basePtr = basePtr; _offsets = offsets; _threadPriority = threadPriority; _listener = new Thread(ListenerThread) { IsBackground = true }; _listener.Start(); }
/// <summary> /// 更改由指定句柄所表示的线程的优先级。 /// </summary> /// <param name="threadHandle">指定线程的句柄。</param> /// <param name="priority">需要设置的线程优先级。</param> /// <returns>如果这个方法的操作成功则为true,反之为false。</returns> public static bool ChangeThreadPriority(IntPtr threadHandle, EThreadPriority priority) { return(SetThreadPriority(threadHandle.ToInt64(), (long)priority) != 0 ? true : false); }