@@ -734,6 +734,64 @@ public NtToken OpenToken()
734734 return NtToken . OpenThreadToken ( this ) ;
735735 }
736736
737+ /// <summary>
738+ /// Queue a special user APC to the thread.
739+ /// </summary>
740+ /// <param name="apc_routine">The APC callback pointer.</param>
741+ /// <param name="normal_context">Context parameter.</param>
742+ /// <param name="system_argument1">System argument 1.</param>
743+ /// <param name="system_argument2">System argument 2.</param>
744+ /// <param name="throw_on_error">True to throw on error.</param>
745+ /// <returns>The NT status code.</returns>
746+ [ SupportedVersion ( SupportedVersion . Windows10_RS5 ) ]
747+ public NtStatus QueueSpecialUserApc ( IntPtr apc_routine , IntPtr normal_context , IntPtr system_argument1 , IntPtr system_argument2 , bool throw_on_error )
748+ {
749+ return NtSystemCalls . NtQueueApcThreadEx ( Handle , new IntPtr ( 1 ) , apc_routine , normal_context , system_argument1 , system_argument2 ) . ToNtException ( throw_on_error ) ;
750+ }
751+
752+ /// <summary>
753+ /// Queue a special user APC to the thread.
754+ /// </summary>
755+ /// <param name="apc_routine">The APC callback pointer.</param>
756+ /// <param name="normal_context">Context parameter.</param>
757+ /// <param name="system_argument1">System argument 1.</param>
758+ /// <param name="system_argument2">System argument 2.</param>
759+ /// <returns>The NT status code.</returns>
760+ [ SupportedVersion ( SupportedVersion . Windows10_RS5 ) ]
761+ public void QueueSpecialUserApc ( IntPtr apc_routine , IntPtr normal_context , IntPtr system_argument1 , IntPtr system_argument2 )
762+ {
763+ QueueSpecialUserApc ( apc_routine , normal_context , system_argument1 , system_argument2 , true ) ;
764+ }
765+
766+ /// <summary>
767+ /// Queue a special user APC to the thread.
768+ /// </summary>
769+ /// <param name="apc_routine">The APC callback pointer.</param>
770+ /// <param name="normal_context">Context parameter.</param>
771+ /// <param name="system_argument1">System argument 1.</param>
772+ /// <param name="system_argument2">System argument 2.</param>
773+ /// <param name="throw_on_error">True to throw on error.</param>
774+ /// <returns>The NT status code.</returns>
775+ [ SupportedVersion ( SupportedVersion . Windows10_RS5 ) ]
776+ public NtStatus QueueSpecialUserApc ( ApcCallback apc_routine , IntPtr normal_context , IntPtr system_argument1 , IntPtr system_argument2 , bool throw_on_error )
777+ {
778+ return QueueSpecialUserApc ( Marshal . GetFunctionPointerForDelegate ( apc_routine ) , normal_context , system_argument1 , system_argument2 , throw_on_error ) ;
779+ }
780+
781+ /// <summary>
782+ /// Queue a special user APC to the thread.
783+ /// </summary>
784+ /// <param name="apc_routine">The APC callback pointer.</param>
785+ /// <param name="normal_context">Context parameter.</param>
786+ /// <param name="system_argument1">System argument 1.</param>
787+ /// <param name="system_argument2">System argument 2.</param>
788+ /// <returns>The NT status code.</returns>
789+ [ SupportedVersion ( SupportedVersion . Windows10_RS5 ) ]
790+ public void QueueSpecialUserApc ( ApcCallback apc_routine , IntPtr normal_context , IntPtr system_argument1 , IntPtr system_argument2 )
791+ {
792+ QueueSpecialUserApc ( apc_routine , normal_context , system_argument1 , system_argument2 , true ) ;
793+ }
794+
737795 /// <summary>
738796 /// Queue a user APC to the thread.
739797 /// </summary>
0 commit comments