public static SetThreadContext ( |
||
threadHandle | A handle to the thread whose context is to be set. | |
context | A pointer to a |
|
return | void |
public static void SetThreadContext(SafeMemoryHandle threadHandle, ThreadContext context)
{
// Check if the handle is valid
HandleManipulator.ValidateAsArgument(threadHandle, "threadHandle");
// Set the thread context
if(!NativeMethods.SetThreadContext(threadHandle, ref context))
throw new Win32Exception("Couldn't set the thread context.");
}