#include <windows.h>
#include <stdio.h>
#include <rtapi.h>
void main(void) {
DWORD dwSections = RT_KLOCK_ALL;
if (!RtLockKernel( dwSections)) {
printf("\nFailure on RtLockKernel.\t");
printf("Error=%d\n", RtGetLastError());
}
else {
printf("\nSuccess on RtLockKernel\n");
if (!RtUnlockKernel( dwSections)){
printf("\nFailure on RtUnlockKernel.\t");
printf("Error=%d\n", RtGetLastError());
}
else {
printf("\nSuccess on RtUnlockKernel\n");
}
}
ExitProcess(0);
}