Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Answers
C# GetThreadContext
Thomas Sieverding
17y
6.7k
1
Reply
Hi, I need the Context Switch of a thread and I could find the thread ID, but there is no way to reach the Context in
C#
! so I tried to use the GetThreadContext function of kernel32.dll and it was like this in MSDN:
BOOL GetThreadContext(
HANDLE hThread,
LPCONTEXT lpContext
);
And
[DllImport("kernel32.dll", SetLastError=true)]
static extern int GetThreadContext ( int hThread, ref CONTEXT lpContext)
but I can not use it cause I don't know what I should pass to the LPCONTEXT parameter!
Could anyone explain it for me with an example please?
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Sorting Columns in Ascending and Descding order
Urgent - Please help with formating date in Visual C# app