# SetThreadContext

```csharp
[DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
public static extern unsafe BOOL SetThreadContext(
    HANDLE hThread,
    CONTEXT* lpContext);
```

[context](https://www.pinvoke.dev/debug/context "mention")
