コード例 #1
0
 /// <summary>
 /// Suspends execution of a given thread.
 /// </summary>
 /// <param name="hThread">Handle to the thread that will be suspended.</param>
 /// <returns>Returns (DWORD)-1 on failure, otherwise the suspend count of the thread.</returns>
 public static uint SuspendThread(IntPtr hThread)
 {
     return(Imports.SuspendThread(hThread));
 }
コード例 #2
0
 /// <summary>
 /// Resumes execution of a given thread.
 /// </summary>
 /// <param name="hThread">Handle to the thread that will be suspended.</param>
 /// <returns>Returns (DWORD)-1 on failure, otherwise the previous suspend count of the thread.</returns>
 public static uint ResumeThread(IntPtr hThread)
 {
     return(Imports.ResumeThread(hThread));
 }
コード例 #3
0
 /// <summary>
 /// Sets the context of a given thread.
 /// </summary>
 /// <param name="hThread">Handle to the thread for which the context will be set.</param>
 /// <param name="ctx">CONTEXT structure to which the thread's context will be set.</param>
 /// <returns>Returns true on success, false on failure.</returns>
 public static bool SetThreadContext(IntPtr hThread, CONTEXT ctx)
 {
     return(Imports.SetThreadContext(hThread, ref ctx));
 }