Skip to content

Commit

Permalink
[kbdsample]: Final touches
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinDrab committed Oct 20, 2020
1 parent 95504bd commit c897529
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kbdsample/kbdsample.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ int main(int argc, char* argv[])
if (ret != 0)
fprintf(stderr, "[ERROR]: Unable to hook the driver %u\n", ret);
}
} else fprintf(stderr, "[ERROR]: Error %u\n", ret);
} else if (ret != 0)
fprintf(stderr, "[ERROR]: Error %u\n", ret);

if (ret == 0) {
fprintf(stderr, "[INFO]: Hooking the primary keyboard device...\n");
Expand All @@ -139,6 +140,7 @@ int main(int argc, char* argv[])
fprintf(stderr, "[INFO]: Connecting to the request queue...\n");
ret = IRPMonDllConnect();
if (ret == 0) {
fprintf(stderr, "[INFO]: We are now set! Press CTRL+C to stop monitoring and exit the application peacefully\n");
while (!_terminate) {
// Attempt to get a request from the queue
ret = IRPMonDllGetRequest(buffer, bufferSize);
Expand Down

0 comments on commit c897529

Please sign in to comment.