Oct 31, 2011 at 12:08pm
I found a neat windows function called BlockInput(), it's supposed to block your mouse/keyboard controls globally.
1 2 3 4 5 6 7 8 9
|
#include <windows.h>
#include <winable.h>
#include <time.h>
int main() {
BlockInput(true);
while (clock() < 5000) {}
BlockInput(false);
}
|
Unfortunately BlockInput(true) returns 0 which indicates that there's some sort of error. Any ideas what it could be? I use Windows 7.
Last edited on Oct 31, 2011 at 12:10pm
Oct 31, 2011 at 1:19pm
Thanks for the response. It appears that access to the function was denied because I didn't run the program as an administrator.