Exemplo n.º 1
0
        /// <summary>
        /// Wake the thread from an alertable state and resume the thread.
        /// </summary>
        /// <returns>The previous suspend count for the thread.</returns>
        public int AlertResume()
        {
            OptionalInt32 suspend_count = new OptionalInt32();

            NtSystemCalls.NtAlertResumeThread(Handle, suspend_count).ToNtException();
            return(suspend_count.Value);
        }
        /// <summary>
        /// Wake the thread from an alertable state and resume the thread.
        /// </summary>
        /// <param name="throw_on_error">True to throw on error.</param>
        /// <returns>The previous suspend count for the thread.</returns>
        public NtResult <int> AlertResume(bool throw_on_error)
        {
            OptionalInt32 suspend_count = new OptionalInt32();

            return(NtSystemCalls.NtAlertResumeThread(Handle, suspend_count).CreateResult(throw_on_error, () => suspend_count.Value));
        }