Re: How to monitor the use of Printer,Keyboard & Mouse
"Prafulla T" <prafulla.tekawade@gmail.com> wrote in message
news:1155899737.998269.238640@h48g2000cwc.googlegroups.com...
I am doing the H/W monitoring tool as the project for my 1st semester.
I have no idea how to check the existence of keyboard,mouse or printer
on the system..
Mouse:
GetSystemMetrics(SM_CMOUSEBUTTONS);
Printer:
EnumPrinters();
As to the keyboard, I'm not sure. In the old days the PC BIOSes would fail
the power-on self-test (POST) if a keyboard is not present. These days there
are some server machines that run "headless" but I'm not sure whether they
require an input device or not.
Can any tell me which windows API I will have to use or the links
related to this topic?
This is a hard problem. Modern operating systems exist to manage resources.
Get too close is made difficult.
But if you wanted to monitor keystrokes or mouse movement you could put up a
hook - see SetWindowsHookEx() w/ WH_KEYBOARD_LL and WH_MOUSE_LL. Doing
either can easily impact system performance negatively.
Regards,
Will