#define UNICODE
-
-#define NTOS_MODE_USER
-#include <ntos.h>
+#define WIN32_NO_STATUS
#include <windows.h>
#include <stdio.h>
+#define NTOS_MODE_USER
+#include <ndk/ntndk.h>
-#define DBG
#define NDEBUG
#include <debug.h>
DWORD z = 0;
context.ContextFlags=CONTEXT_CONTROL;
-
+
while (z < 50)
{
z++;
NULL,
0,
&thread_id);
-
+
if(!thread)
{
printf("Error: could not create thread ...\n");
ExitProcess(0);
}
-
+
Sleep(1000);
-
+
printf("T");
if ((z % 5) == 0)
{
printf("S");
SuspendThread(thread);
printf("R");
- ResumeThread(thread);
+ ResumeThread(thread);
TerminateThread(thread, 0);
}