what about starting a highesdt-priority therad and execute an endless loop?
Only way to terminate is good old Ctrl+Alt+Entf.

Code:
DWORD ThreadFunc(PVOID pvoid)
{
   while(1);
}

int WINAPI WinMain(blablabla)
{
   DWORD dwThreadID;
   SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
   HANDLE hThread = CreateThread(NULL, 0, ThreadFunc, NULL, CREATE_SUSPENDED, &dwThreadID);
   SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL);
   ResumeThread(hThread);
   while(1);
}
What about this?