得到线程上下文
#include <windows.h> #include <stdio.h> DWORD WINAPI ThreadProc( LPVOID lpParameter // thread data ) { for (;;) { } return 0; } int main() { HANDLE hThread = CreateThread(NULL,0,ThreadProc,NULL,0,NULL); SuspendThread(hThread); CONTEXT context; context.ContextFlags = (CONTEXT_FULL); GetThreadContext(hThread,&context); printf("context.Eip: %x\n",context.Eip); return 0; }