2 #define WIN32_NO_STATUS
11 static volatile DWORD z
;
12 static volatile DWORD x
=0;
14 static NTSTATUS WINAPI
24 printf("I should have been suspended for years :-)\n");
27 if(y
==3) ExitProcess(0);
33 main(int argc
, char *argv
[])
39 context
.ContextFlags
=CONTEXT_CONTROL
;
42 thread
=CreateThread(NULL
,
44 (LPTHREAD_START_ROUTINE
)thread_1
,
51 printf("Error: could not create thread ...\n");
57 SuspendThread(thread
);
63 if(x
>100 && GetThreadContext(thread
, &context
))
66 printf("EIP: %lx\n", context
.Eip
);
67 #elif defined(_M_AMD64)
68 printf("RIP: %p\n", context
.Rip
);
70 printf("Calling resumethread ... \n");